The Content Delivery API provides highly available, low-latency endpoints for retrieving entity data, well-suited for powering websites, mobile apps, and store locators. Use it to retrieve specific fields, filter entities by field values, and find entities within a radius of an address.
Get All Entities
Retrieve a list of every entity in an account:
GET https://cdn.yextapis.com/v2/accounts/me/entities?api_key=API_KEY&v=YYYYMMDDThe response is paginated to 10 entities per page by default. Use the limit parameter to return up to 50 entities per page. If another page exists, the response includes a nextPageToken; pass that value in your next request using the pageToken parameter to retrieve it.
Filter Entities
Use the entityTypes and filter parameters together to narrow results.
entityTypes accepts a comma-separated list of entity type IDs. Find an entity type's ID under Knowledge Graph > Configuration > Entity Types, on the Settings tab for that type.
filter accepts a URL-encoded JSON object describing one or more conditions. For example, the following returns all location entities where closed is true:
GET https://cdn.yextapis.com/v2/accounts/me/entities?api_key=API_KEY&v=YYYYMMDD&entityTypes=location&filter={"closed":{"$eq":true}}Some filters accept multiple values. For example, this filter returns entities where firstName is either "Timothy" or "Robert":
{"firstName": {"$in": ["Timothy", "Robert"]}}Combine multiple filters with $and or $or. For example, this filter returns entities where name is either "Captain Nick's" or "Robert's" and attire is "Dressy":
{"$and": [{"name": {"$in": ["Captain Nick's", "Robert's"]}}, {"attire": {"$eq": "DRESSY"}}]}Retrieve Specific Fields
Use the fields parameter to return only certain fields for every entity, along with each entity's meta object. For example, this request returns only the name and keywords fields:
GET https://cdn.yextapis.com/v2/accounts/me/entities?api_key=API_KEY&v=YYYYMMDD&fields=name,keywordsGet a Single Entity
Append an entity's id to the path to retrieve just that entity:
GET https://cdn.yextapis.com/v2/accounts/me/entities/{entityId}?api_key=API_KEY&v=YYYYMMDDSearch by Location
Use the Entities: GeoSearch endpoint to return entities within a given radius of an address, ordered by proximity. Specify the search location as either:
- Latitude and longitude, separated by a comma, for example,
40.740957,-73.987565. - A freeform address, for example,
61 Ninth Ave, New York, NY 10011, or a partial address such as a city or ZIP code. A partial address centers the search on a point within that area rather than restricting results to it exactly.
For example, to find entities within 10 miles of ZIP code 10010:
GET https://cdn.yextapis.com/v2/accounts/me/entities/geosearch?api_key=API_KEY&v=YYYYMMDD&location=10010&radius=10The response includes a geo object describing the search center and a distances array showing each returned entity's distance from that point.