# Yelp API (`listingsapi/yelp-api`) Actor

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

- **URL**: https://apify.com/listingsapi/yelp-api.md
- **Developed by:** [Local Business Listings Submission API](https://apify.com/listingsapi) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Yelp API

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

This Actor calls the Yelp endpoints of the [Listings API](https://www.listingsapi.com) 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](https://www.listingsapi.com/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 level | Covers |
| --- | --- |
| Read | Every `GET` operation in the table below |
| Write | Every `POST` operation in the table below |

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

### Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `apiKey` | string | Yes | Your Listings API key. Stored as a secret. |
| `operation` | string | Yes | Which endpoint to call. See the operations table. |
| `pathParams` | object | No | Values for placeholders in the path, for example `{ "locationId": "TG9jYXRpb246MTgwMDI4OQ==" }`. |
| `query` | object | No | Query string values such as `locationId`, `status`, `page`, `perPage`, `first` or `after`. |
| `body` | object | No | JSON request body for the `POST` operations. Sent unchanged. |
| `paginate` | boolean | No | Keep requesting pages while `pageInfo.hasNextPage` is true. Default `false`. |
| `maxItems` | integer | No | Stop after this many dataset items. `0` means no limit. |

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

### Operations

| Operation | Method and path | Returns |
| --- | --- | --- |
| `allLocations` | `GET /locations` | Your locations, used to look up location IDs |
| `searchLocations` | `GET /locations/search` | Locations matching a search term |
| `connectYelp` | `POST /connected-accounts/connect-yelp` | A Yelp OAuth link, valid for 24 hours, that connects all of the merchant's claimed Yelp businesses |
| `yelpConnections` | `GET /connected-accounts` | Yelp connections, with `status` and `requestMatchesStatus` |
| `yelpConnectionDetails` | `GET /connected-accounts/{connectedAccountId}/details` | One connection, including matching progress |
| `triggerMatches` | `POST /connected-accounts/trigger-matches` | Re-reads the merchant's Yelp businesses and matches them again |
| `connectionSuggestions` | `GET /connected-accounts/{connectedAccountId}/connection-suggestions` | Suggested location to Yelp business pairs |
| `confirmMatches` | `POST /connected-accounts/confirm-matches` | Links each confirmed location to its Yelp business |
| `unlinkedYelpBusinesses` | `POST /connected-accounts/connected-account-listings` | The merchant's Yelp businesses not yet linked to a location |
| `connectListing` | `POST /connected-accounts/connect-listing` | Links one Yelp business to one location |
| `yelpMatch` | `GET /locations/yelp-match` | The Yelp business the Yelp search found for a location, the fields that differ, and a match score |
| `yelpConnect` | `POST /locations/yelp-connect` | Confirms a Yelp business ID for a location, or rejects the search candidate |
| `locationConnections` | `GET /location-connections` | Locations with their Yelp connection status and linked Yelp business ID |
| `listingStatus` | `GET /locations/{locationId}/listings/premium` | Sync status per publisher; the Yelp entry has `site.url: "yelp.com"` |
| `yelpReviews` | `GET /locations/{locationId}/reviews` | Yelp reviews with owner replies in `responses` |
| `respondToReview` | `POST /locations/reviews/respond` | Posts a public reply to a Yelp review |
| `editReviewResponse` | `POST /locations/reviews/respond/edit` | Replaces 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.

#### Two ways to link a location to Yelp

**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:

```json
{
  "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:

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

Read the suggested pairs:

```json
{
  "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:

```json
{
  "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`:

```json
{
  "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`:

```json
{
  "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:

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

Confirm the candidate:

```json
{
  "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`:

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

Find every location that is not linked to Yelp yet:

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

Read the Yelp reviews for a location:

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

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

```json
{
  "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`:

```json
{
  "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:

```json
{
  "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:

| `syncStatus` | Meaning |
| --- | --- |
| `IN_PROGRESS` | Sent to Yelp and waiting for Yelp's moderators. New listings typically take 1 to 2 days. |
| `SYNCED` | Live on Yelp with the latest data. `listingUrl` is the Yelp page. |
| `REQUIRING_ACTION` | A search match is waiting. Confirm or reject it with `yelpMatch` and `yelpConnect`. |
| `FAILED` | Yelp rejected a field or the listing. The reason is in `syncIssue`. |
| `CANNOT_SUBMIT` | The 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](https://listingsapi.com/docs/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](https://listingsapi.com/docs/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](https://www.listingsapi.com/pricing).

### Related Actors

- [Local Business Reviews API](https://apify.com/listingsapi/local-business-reviews-api) for reviews across Google, Facebook and other sources
- [Local Business Listings Submission API](https://apify.com/listingsapi/local-business-listings-submission-api) for creating locations and syncing them across the publisher network
- [Create Google Listing API](https://apify.com/listingsapi/create-google-listing-api) for connecting Google and Facebook profiles to your locations
- [Apple Maps API](https://apify.com/listingsapi/apple-maps-api) for Apple Maps listing sync
- [Bulk Posts on Facebook and Instagram](https://apify.com/listingsapi/bulk-posts-facebook-instagram) for publishing to Facebook Pages and Instagram professional accounts in one bulk request

### Links

- More info: [www.listingsapi.com](https://www.listingsapi.com)
- Guides: [listingsapi.com/guides](https://listingsapi.com/guides)
- Full reference: [listingsapi.com/docs](https://listingsapi.com/docs)
- MCP server: [listingsapi.com/mcp](https://www.listingsapi.com/mcp)
- Support: support@listingsapi.com

# Actor input Schema

## `apiKey` (type: `string`):

Your Listings API key. Create one at https://www.listingsapi.com/pricing. The account needs the Yelp add-on (yelp_listings_api, plus yelp_review_respond_api for replies). Write operations need a key with Write access.

## `operation` (type: `string`):

Which endpoint to call.

## `pathParams` (type: `object`):

Values for placeholders in the endpoint path, for example { "locationId": "TG9jYXRpb246MTgwMDI4OQ==" } or { "connectedAccountId": "4f712c17-..." }.

## `query` (type: `object`):

Query string values such as locationId, status, page, perPage, first or after. Defaults per operation are listed in the README.

## `body` (type: `object`):

JSON request body for the POST operations, sent unchanged. Some endpoints wrap fields in input and some do not; the README shows the exact shape for each.

## `paginate` (type: `boolean`):

Keep requesting pages while pageInfo.hasNextPage is true. Works for both cursor (after) and page-number endpoints.

## `maxItems` (type: `integer`):

Stop after this many dataset items. Set 0 for no limit.

## Actor input object example

```json
{
  "operation": "locationConnections",
  "pathParams": {},
  "query": {},
  "body": {},
  "paginate": false,
  "maxItems": 0
}
```

# Actor output Schema

## `results` (type: `string`):

Every post, bulk post, connected account or location returned by the operation you ran.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("listingsapi/yelp-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("listingsapi/yelp-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call listingsapi/yelp-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,listingsapi/yelp-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ZOtiYeqSb9ZwrZLaB/builds/TEsNkJfen9QdVV03C/openapi.json
