Yelp API avatar

Yelp API

Pricing

Pay per usage

Go to Apify Store
Yelp API

Yelp API

Connect and Manage Yelp business listings, track Yelp listing sync and reply to Yelp reviews through the Listings API.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

12 days ago

Last modified

Categories

Features

Limited permissions

Share

Create, update and monitor Yelp business listings and reviews through the Listings API.

This Actor calls the Yelp endpoints of the Listings API v4. Requests are authenticated with the Authorization: API <YOUR_API_KEY> request header and go to https://listingsapi.com/api/v4.

What this Actor does

  • Returns a Yelp OAuth link that connects every business a merchant has claimed on Yelp in one approval
  • Lists Yelp connections and reports matching progress for each one
  • Matches the merchant's Yelp businesses to your locations by name, address and phone, and lets you confirm the pairs
  • Links a single Yelp business to a single location when you already know which one it is
  • Finds a location's Yelp business through the Listings API's Yelp search, with no merchant login, and shows which fields differ
  • Reads the Yelp connection status and the linked Yelp business ID for every location
  • Reads Yelp listing sync status and the live Yelp URL once the listing is synced
  • Reads Yelp reviews and owner replies, posts a public reply, and replaces an existing reply

Who this is for

  • Multi-location brands that need every store linked to the correct Yelp business
  • Agencies onboarding client Yelp accounts without logging into biz.yelp.com for each one
  • Teams that want Yelp listing status and review data in a dataset rather than a dashboard
  • Anyone replying to Yelp reviews from their own tooling

What you need

A Listings API account with the Yelp add-on, and an API key.

Yelp is an add-on on the Enterprise plan; see pricing or contact support@listingsapi.com. The account needs yelp_listings_api for linking and listing sync, and yelp_review_respond_api for replies. Without either, connectYelp returns SY90003.

Access levelCovers
ReadEvery GET operation in the table below
WriteEvery POST operation in the table below

Yelp accepts listings in 21 countries. A location in any other country reports CANNOT_SUBMIT for Yelp.

Input

FieldTypeRequiredDescription
apiKeystringYesYour Listings API key. Stored as a secret.
operationstringYesWhich endpoint to call. See the operations table.
pathParamsobjectNoValues for placeholders in the path, for example { "locationId": "TG9jYXRpb246MTgwMDI4OQ==" }.
queryobjectNoQuery string values such as locationId, status, page, perPage, first or after.
bodyobjectNoJSON request body for the POST operations. Sent unchanged.
paginatebooleanNoKeep requesting pages while pageInfo.hasNextPage is true. Default false.
maxItemsintegerNoStop after this many dataset items. 0 means no limit.

Location IDs are the base64 encoded Location:<id> value, for example TG9jYXRpb246MTgwMDI4OQ==.

Operations

OperationMethod and pathReturns
allLocationsGET /locationsYour locations, used to look up location IDs
searchLocationsGET /locations/searchLocations matching a search term
connectYelpPOST /connected-accounts/connect-yelpA Yelp OAuth link, valid for 24 hours, that connects all of the merchant's claimed Yelp businesses
yelpConnectionsGET /connected-accountsYelp connections, with status and requestMatchesStatus
yelpConnectionDetailsGET /connected-accounts/{connectedAccountId}/detailsOne connection, including matching progress
triggerMatchesPOST /connected-accounts/trigger-matchesRe-reads the merchant's Yelp businesses and matches them again
connectionSuggestionsGET /connected-accounts/{connectedAccountId}/connection-suggestionsSuggested location to Yelp business pairs
confirmMatchesPOST /connected-accounts/confirm-matchesLinks each confirmed location to its Yelp business
unlinkedYelpBusinessesPOST /connected-accounts/connected-account-listingsThe merchant's Yelp businesses not yet linked to a location
connectListingPOST /connected-accounts/connect-listingLinks one Yelp business to one location
yelpMatchGET /locations/yelp-matchThe Yelp business the Yelp search found for a location, the fields that differ, and a match score
yelpConnectPOST /locations/yelp-connectConfirms a Yelp business ID for a location, or rejects the search candidate
locationConnectionsGET /location-connectionsLocations with their Yelp connection status and linked Yelp business ID
listingStatusGET /locations/{locationId}/listings/premiumSync status per publisher; the Yelp entry has site.url: "yelp.com"
yelpReviewsGET /locations/{locationId}/reviewsYelp reviews with owner replies in responses
respondToReviewPOST /locations/reviews/respondPosts a public reply to a Yelp review
editReviewResponsePOST /locations/reviews/respond/editReplaces an existing reply on a Yelp review

Several operations send defaults so they return Yelp data without extra input: yelpConnections sends publisher=YelpAccount, locationConnections sends source=YelpAccount, and yelpReviews sends siteUrls=["yelp.com"] and first=50. Values you pass in query override them.

Request bodies are sent exactly as you give them. Most POST endpoints expect fields inside input. Three do not: unlinkedYelpBusinesses, respondToReview and editReviewResponse take their fields at the top level. The examples below show the shape for each.

Through the merchant's Yelp account. Call connectYelp and send the merchant to the returned url. After they approve, the API redirects the merchant to your successUrl with connectedAccountId in the query string and starts matching. Poll yelpConnectionDetails until requestMatchesStatus is MATCH_COMPLETED, read connectionSuggestions, and confirm the correct pairs with confirmMatches. Suggestions are never confirmed automatically. For a Yelp business that was not suggested, list it with unlinkedYelpBusinesses and link it with connectListing. This route is required for review replies.

Through the Listings API's Yelp search, with no merchant login. Call yelpMatch for a location. When status is NEEDS_REVIEW, compare candidate with location and the mismatches list, then call yelpConnect with the candidate's yelpBusinessId to confirm it, or with reject: true to search again without that candidate. listingStatus reports REQUIRING_ACTION with Confirm the Yelp listing for this location until you do.

confirmMatches and connectListing accept sync: false to link a location without sending listing data to Yelp. Omit it to keep syncing.

Examples

Get a connection link for the merchant:

{
"apiKey": "<your key>",
"operation": "connectYelp",
"body": {
"input": {
"successUrl": "https://app.example.com/yelp/connected",
"errorUrl": "https://app.example.com/yelp/connect-failed"
}
}
}

Check matching progress on a connection:

{
"apiKey": "<your key>",
"operation": "yelpConnectionDetails",
"pathParams": { "connectedAccountId": "4f712c17-4f95-42dd-90f4-97171a2e67b5" }
}

Read the suggested pairs:

{
"apiKey": "<your key>",
"operation": "connectionSuggestions",
"pathParams": { "connectedAccountId": "4f712c17-4f95-42dd-90f4-97171a2e67b5" },
"paginate": true
}

Confirm a pair. Each ID is the base64 of YelpLocationMatchedData:<matchedDataDatabaseId> from the suggestion:

{
"apiKey": "<your key>",
"operation": "confirmMatches",
"body": {
"input": {
"matchRecordIds": ["WWVscExvY2F0aW9uTWF0Y2hlZERhdGE6NmIxZjJjNGUtOGQzYS00ZjZiLTlhMmUtMWM3ZDVlOWYwYTMx"],
"sync": false
}
}
}

List Yelp businesses on the connection that are not linked yet. This body is not wrapped in input:

{
"apiKey": "<your key>",
"operation": "unlinkedYelpBusinesses",
"body": { "connectedAccountId": "4f712c17-4f95-42dd-90f4-97171a2e67b5", "perPage": 50 }
}

Link one of them to a location, using its id as connectedAccountListingId:

{
"apiKey": "<your key>",
"operation": "connectListing",
"body": {
"input": {
"locationId": "TG9jYXRpb246MTgwMDI4OQ==",
"connectedAccountId": "4f712c17-4f95-42dd-90f4-97171a2e67b5",
"connectedAccountListingId": "WWVscEJ1bGtEYXRhTGFrZTozZjlhN2MyMS01YjRlLTRkOGEtYTFjNi03ZTJiOWQwZjRjNTg=",
"sync": false
}
}
}

Read the Yelp search match for a location:

{
"apiKey": "<your key>",
"operation": "yelpMatch",
"query": { "locationId": "TG9jYXRpb246MTgwMDI4OQ==" }
}

Confirm the candidate:

{
"apiKey": "<your key>",
"operation": "yelpConnect",
"body": { "input": { "locationId": "TG9jYXRpb246MTgwMDI4OQ==", "yelpBusinessId": "WavvLdfdP6g8aZTtbBQHTw" } }
}

Or reject it to search again without that candidate. Send exactly one of yelpBusinessId and reject:

{
"apiKey": "<your key>",
"operation": "yelpConnect",
"body": { "input": { "locationId": "TG9jYXRpb246MTgwMDI4OQ==", "reject": true } }
}

Find every location that is not linked to Yelp yet:

{
"apiKey": "<your key>",
"operation": "locationConnections",
"query": { "status": "NotConnected", "perPage": 50 },
"paginate": true
}

Read the Yelp reviews for a location:

{
"apiKey": "<your key>",
"operation": "yelpReviews",
"pathParams": { "locationId": "TG9jYXRpb246MTgwMDI4OQ==" },
"paginate": true,
"maxItems": 200
}

Reply to a review. This body is not wrapped in input:

{
"apiKey": "<your key>",
"operation": "respondToReview",
"body": {
"interactionId": "9e26d2a8-a6ed-42ea-8454-47d1c92ea841",
"responseContent": "Thanks for visiting, Sam. We're glad the team looked after you."
}
}

Replace that reply, using the id returned when it was posted as responseId:

{
"apiKey": "<your key>",
"operation": "editReviewResponse",
"body": {
"reviewId": "9e26d2a8-a6ed-42ea-8454-47d1c92ea841",
"responseId": "2090753a-ece6-4837-8336-8494ad308523",
"responseContent": "Thanks again, Sam. Our new weekend hours start this Saturday."
}
}

Output

List operations write one dataset row per record. locationConnections returns a row per location:

{
"locationId": "1800289",
"accountType": "YelpAccount",
"status": "CONNECTED",
"connectedAccountId": "4f712c17-4f95-42dd-90f4-97171a2e67b5",
"listingSiteId": "WavvLdfdP6g8aZTtbBQHTw",
"connectedListingInfo": {
"yelpBusinessId": "WavvLdfdP6g8aZTtbBQHTw",
"name": "Jenny Home",
"url": "https://www.yelp.com/biz/jenny-home-austin",
"isClaimed": true
}
}

listingStatus returns a row per publisher. Filter on site.url equal to yelp.com for the Yelp row:

syncStatusMeaning
IN_PROGRESSSent to Yelp and waiting for Yelp's moderators. New listings typically take 1 to 2 days.
SYNCEDLive on Yelp with the latest data. listingUrl is the Yelp page.
REQUIRING_ACTIONA search match is waiting. Confirm or reject it with yelpMatch and yelpConnect.
FAILEDYelp rejected a field or the listing. The reason is in syncIssue.
CANNOT_SUBMITThe location's country is not supported by Yelp.

yelpReviews returns a row per review with source, content, authorName, rating, date, responded, canRespond and permalink.

Exact fields follow the API response. Download the dataset as JSON, CSV, Excel or XML, or read it from the Apify API. The run also writes a SUMMARY record to the key value store with the operation, the path called, pages requested and items pushed.

Running it on a schedule

Schedule locationConnections with status: "NotConnected" weekly to catch new locations that still need a Yelp business, and listingStatus per location to alert on REQUIRING_ACTION or FAILED. For reviews, schedule yelpReviews daily and route anything you want to answer to whoever approves replies before calling respondToReview.

Rate limits and pagination

Requests go out one at a time. With paginate on, the Actor follows pageInfo.endCursor as after on cursor endpoints such as yelpReviews, and increments page on page-number endpoints such as yelpConnections, connectionSuggestions and locationConnections. It waits out a 429 using retry_after_seconds and retries 5xx responses with an exponential backoff up to five attempts. See rate limits.

Yelp sets its own limits on top of the API's:

  • triggerMatches is allowed once per 24 hours per connection.
  • The connectYelp link expires after 24 hours.
  • Yelp returns the 200 most recent recommended reviews per business.
  • Replies count toward a limit of 20 per day, and each replacement counts as one.

Errors

A non-success response stops the run and logs the status code, the URL and the response body including correlation_id. Codes are listed at error codes.

  • SY90003 on connectYelp means the account does not have the Yelp add-on.
  • Only the Yelp user who posted a reply can replace it. A different user gets Only the Yelp user who posted the original reply can edit it.
  • Yelp replies cannot be deleted through the API.
  • Replies need a Yelp connection for the location, made through connectYelp. A location linked only through yelpConnect syncs its listing and reads reviews, but cannot reply.

Listing rejections behave differently from request errors. Yelp can accept the request and then reject the listing in moderation; that result is reported as FAILED with a reason in syncIssue, not as a failed run.

Cost

You pay Apify for the platform usage of the run. Yelp is an add-on on the Listings API Enterprise plan, priced on request. See pricing.