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

Yelp data over a simple HTTP API: search businesses by query and location, get place details by business ID or alias, and read place reviews. Always-on Standby Actor with JSON responses in seconds. Pay per successful request, with no Yelp account or API key needed. Built for local business research.

- **URL**: https://apify.com/epctex/yelp-api.md
- **Developed by:** [epctex](https://apify.com/epctex) (community)
- **Categories:** Developer tools, Lead generation, Business
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.70 / 1,000 place details

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 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

Yelp API is an Apify actor that extracts place (business) details, place reviews and place search results from Yelp.com by business id, business alias or search query and location. It is priced per successful request, by endpoint, from $0.005 to $0.016 per successful request.

Yelp API exposes 4 endpoints, accepts up to 4 path/query parameters per endpoint, and bills one pay-per-event charge per successful request — the event depends on which endpoint you call — with no subscription and no monthly minimum on paid plans.

### How It Works

Yelp API runs as an [Apify Standby Actor](https://docs.apify.com/platform/actors/running/standby): an always-on HTTP server, not a classic Actor run. There is no run to start and no dataset to poll — you send a plain `GET` request to an endpoint and the JSON comes back in the response itself.

| | Classic dataset Actor | Yelp API (Standby) |
| --- | --- | --- |
| How you call it | Start a run, wait, then read the dataset | One `GET` request |
| Result | Items accumulate in a dataset | JSON in the HTTP response, synchronously |
| Billing | Per run or per dataset item | Per successful request, by endpoint |

Authenticate with your Apify API token, either as an `Authorization: Bearer <token>` header or a `?token=<token>` query parameter. The token is only used to identify and bill the caller — it is **never forwarded** to the upstream Yelp data service.

### Who Uses Yelp API?

- **Local SEO and marketing agencies** look up a business by its alias (`/place/handle/{handle}`) to read its `avgRating`, `reviewCount`, `categories` and `priceRange`, and track them over time.
- **Market and location research tools** search places by keyword and location (`/search`) and sort by `recommended`, `rating` or `reviewCount` to map out competitors in an area.
- **Reputation and sentiment tools** pull a place's reviews (`/place/{id}/reviews`) with their `rating`, `text`, `language`, `date` and reviewer details, ordered by `yelp`, `newest`, `oldest`, `highestRating`, `lowestRating` or `elites`.
- **Lead generation and directory builders** read a place's `address`, `coordinates`, `phoneNumber`, `website` and `operationHours` from the place detail endpoints.
- **AI agents and chatbots** call it directly as a tool: plain JSON over HTTP with a published OpenAPI spec, so no Yelp developer account is required.

### Endpoints & Parameters

All endpoints are `GET`. Base URL: `https://epctex--yelp-api.apify.actor` — see the note under [Request Example](#request-example).

#### Places

| Endpoint | Field | Type | Description | Default |
| --- | --- | --- | --- | --- |
| `/search` | `query` | string | The search query, e.g. `Cheese Curds` | required |
| | `location` | string | Location to search, e.g. `Madison, WI` | required |
| | `page` | integer | Search result page to retrieve | — |
| | `sortBy` | enum | Search result ordering: `recommended`, `rating`, `reviewCount` | — |

#### Place

| Endpoint | Field | Type | Description | Default |
| --- | --- | --- | --- | --- |
| `/place/{id}` | `id` | string (path) | Business id, e.g. `RJNAeNA-209sctUO0dmwuA` | required |
| `/place/handle/{handle}` | `handle` | string (path) | Business alias, e.g. `the-old-fashioned-madison` | required |
| `/place/{id}/reviews` | `id` | string (path) | Place's id | required |
| | `page` | integer | Review page to retrieve | — |
| | `sortBy` | enum | Review ordering: `yelp`, `newest`, `oldest`, `highestRating`, `lowestRating`, `elites` | — |

All `page` and `sortBy` parameters are optional. A request with a missing required parameter, an unknown `sortBy` value or a non-integer `page` is rejected with `400`.

### Request Example

> **Standby base URL:** Apify Standby actors are reachable at `https://{apify-username}--{actor-name}.apify.actor`. This actor is published under the epctex account, so its Standby base URL is `https://epctex--yelp-api.apify.actor`, used in the examples below.

Search places by keyword and location:

```bash
curl -G "https://epctex--yelp-api.apify.actor/search" \
  --data-urlencode "query=Cheese Curds" \
  --data-urlencode "location=Madison, WI" \
  --data-urlencode "sortBy=rating" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN"
```

Charges `search-places` on success.

Get a place by its alias:

```bash
curl "https://epctex--yelp-api.apify.actor/place/handle/the-old-fashioned-madison" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN"
```

Charges `place-detail` on success.

Get a place's reviews, newest first:

```bash
curl "https://epctex--yelp-api.apify.actor/place/RJNAeNA-209sctUO0dmwuA/reviews?page=1&sortBy=newest" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN"
```

Charges `place-reviews` on success.

### Pricing Model

Yelp API bills one pay-per-event charge per successful request, based on the endpoint called — regardless of how many places or reviews the response contains. Only the called endpoint's event is charged, once per request. `/place/{id}` and `/place/handle/{handle}` share the single `place-detail` event, so they cost the same.

| Endpoint | Event | Price |
| --- | --- | --- |
| `/search` | `search-places` | $0.016 |
| `/place/{id}` | `place-detail` | $0.005 |
| `/place/handle/{handle}` | `place-detail` | $0.005 |
| `/place/{id}/reviews` | `place-reviews` | $0.008 |

| Status | Meaning | Charged? |
| --- | --- | --- |
| `200` | Successful response, contains `data` | Yes — the called endpoint's event |
| `400` | Bad request — a param failed validation | No |
| `403` | Standby access disabled, or your access was restricted by the developer | No |
| `404` | Endpoint not matched, or nothing found upstream | No |
| `429` | Monthly free-request limit reached | No |
| `502` | Upstream (INFRA) request failed | No |
| `503` | Plan/quota could not be checked right now | No |

#### Cost examples

| Scenario | Requests | Cost |
| --- | --- | --- |
| Look up 1 place by id or alias | 1 | $0.005 |
| Search 1 page of places | 1 | $0.016 |
| Fetch 1 page of a place's reviews | 1 | $0.008 |
| Search, then look up 1 place from the results | 2 | $0.016 + $0.005 = $0.021 |
| Search, look up 1 place, fetch 1 page of its reviews | 3 | $0.016 + $0.005 + $0.008 = $0.029 |
| Pull 10 pages of a place's reviews | 10 | $0.08 |
| 1,000 place detail lookups | 1,000 | $5.00 |
| 1,000 review pages | 1,000 | $8.00 |

**Cost optimization tips:** don't retry on `400`/`403`/`404`/`429` — they're not charged but they also won't succeed on retry without changing the request; cache place details you don't expect to change between calls instead of re-fetching them; every list endpoint is billed per page, not per item, so request only the pages you need, and stop when `hasMore` is `false`.

#### Demo Mode

Apify Free-plan users can try Yelp API without a subscription, capped at **10 requests per calendar month**. Once that limit is used up, every call answers `429` ("You have used all free requests for this month. Upgrade your Apify plan to keep going.") until the next month. A paid Apify plan removes the monthly cap entirely.

### Output Example

A place (`GET /place/{id}` or `GET /place/handle/{handle}`):

```json
{
  "status": 200,
  "message": "OK",
  "data": {
    "id": "RJNAeNA-209sctUO0dmwuA",
    "alias": "the-old-fashioned-madison",
    "title": "The Old Fashioned",
    "avgRating": 4,
    "unroundedAvgRating": 4.1,
    "reviewCount": 59,
    "priceRange": "$",
    "categories": ["American", "Breakfast & Brunch", "Beer Bars"],
    "isBusinessClosed": false,
    "address": {
      "city": "Madison",
      "regionCode": "WI",
      "addressLine1": "23 N Pinckney St",
      "addressLine2": "",
      "addressLine3": "",
      "postalCode": "53703",
      "formatted": "23 N Pinckney St Capitol Madison, WI 53703"
    },
    "coordinates": { "latitude": 43.07618625, "longitude": -89.38375722 },
    "operationHours": [
      "Mon-Thu 11:00 am - 9:00 pm",
      "Fri 11:00 am - 10:00 pm",
      "Sat 9:00 am - 10:00 pm"
    ],
    "amenities": [{ "label": "Offers Delivery", "value": "Yes" }],
    "website": "http://theoldfashioned.com/",
    "phoneNumber": "(608) 310-4545",
    "mediaCount": 1697
  }
}
```

Reviews (`GET /place/{id}/reviews`):

```json
{
  "status": 200,
  "message": "OK",
  "data": {
    "reviews": [
      {
        "id": "RJNAeNA-l0pIaRgDAAmU4rEySL789A",
        "url": "https://www.yelp.com/biz/RJNAeNA-209sctUO0dmwuA?hrid=l0pIaRgDAAmU4rEySL789A",
        "rating": 5,
        "text": "Loveeee it here. Food was delicious, fun Wisconsin atmosphere. ...",
        "language": "en",
        "date": "2025-05-08T19:23:29-05:00",
        "images": {
          "url": "https://s3-media0.fl.yelpcdn.com/bphoto/xdCGhVKJjflbmBzfSk9nDw/348s.jpg",
          "caption": "Double brat"
        },
        "feedback": { "useful": 0, "funny": 0, "cool": 0 },
        "reviewer": {
          "id": "GMCYglf7iCtFtnlZbwUNcw",
          "url": "https://www.yelp.com/user_details?userid=GMCYglf7iCtFtnlZbwUNcw",
          "name": "Ashley B.",
          "location": "Chicago, United States",
          "image": "https://s3-media0.fl.yelpcdn.com/photo/WtXOAftX5_O_I-F7JBHNjw/60s.jpg",
          "friendCount": 383,
          "photoCount": 748,
          "reviewCount": 319,
          "eliteYear": 2025
        }
      }
    ],
    "hasMore": true
  }
}
```

Search results (`GET /search`), one item of the result list as documented in the OpenAPI spec:

```json
{
  "id": "RJNAeNA-209sctUO0dmwuA",
  "name": "The Old Fashioned",
  "alias": "the-old-fashioned-madison",
  "coordinates": { "lat": 43.07618625, "lon": -89.38375722 },
  "rating": 4.1,
  "reviewCount": 2479,
  "categories": ["American", "Breakfast & Brunch", "Beer Bars"],
  "priceRange": "$",
  "phone": "(608) 310-4545",
  "website": "http://theoldfashioned.com/",
  "images": ["https://s3-media0.fl.yelpcdn.com/bphoto/ptE_UYxhabKfEztonGqHDw/348s.jpg"]
}
```

### Limitations

- **Page-based pagination only** — list endpoints take a `page` number (`/search`, `/place/{id}/reviews`); the response's `hasMore` flag tells you whether another page exists. Each page is a separate, separately-charged request.
- **Per-endpoint pricing, not per-field pricing.** Every endpoint charges a fixed event regardless of how many places or reviews a page contains. `/place/{id}` and `/place/handle/{handle}` share the same `place-detail` event.
- **Look up by id or alias.** A place can be fetched by its business id or its alias; the reviews endpoint takes the business id.
- **Public data only** — the actor returns Yelp's public place and review data.

### Which Yelp API Questions Come Up Most Often?

#### Does Yelp API need a Yelp account or API key?

No. You only need an Apify API token. Yelp API proxies a backend Yelp data service itself; it never asks you to log in to Yelp.

#### How much does it cost?

It depends on the endpoint: $0.016 for a place search, $0.005 for a place detail lookup (by id or alias), and $0.008 for a page of a place's reviews. Failed, invalid or rejected responses are never charged, and a request never charges more than one event.

#### Am I charged per place or review, or per request?

Per request. A page with many results costs the same as a page with one.

#### How do I get more than one page of results?

Pass the next `page` number on the following call. Check `data.hasMore` to see whether another page is available.

#### What happens when I hit the free-plan limit?

Every call returns `429` with "You have used all free requests for this month. Upgrade your Apify plan to keep going." until the next calendar month, or until you move to a paid Apify plan.

#### Why did my request return `403`?

Either Standby access isn't available on your current Apify plan, or your access to this Actor has been specifically restricted by its developer.

#### Can I retry a `502` or `503`?

Yes. `502` means the request to the upstream data service failed; `503` means your plan/quota couldn't be checked. Neither is charged, and both are safe to retry after a short delay.

#### Can I use this from an AI agent or bot?

Yes. It's a plain HTTP JSON API with a published OpenAPI spec, so it fits LLM tool calls, bots, backends, and any no-code tool that can make HTTP requests.

### Contact

Yelp API is published by epctex. Visit [epctex.com](https://epctex.com) to see all available products. For custom integrations, reach out through the chat box on epctex.com. For support, contact business@epctex.com.

# Actor input Schema

## Actor input object example

```json
{}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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("epctex/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("epctex/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 epctex/yelp-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,epctex/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/uFstgxFne9aoZNUYh/builds/KsO87lSa6IaMgztUR/openapi.json
