{
  "openapi": "3.0.1",
  "info": {
    "title": "Yelp Scraper — Businesses, Reviews, Phones & Ratings",
    "description": "Scrape Yelp search results, business details and reviews: rating, review count, categories, price, address, phone, website, hours, reviewer names and owner replies.",
    "version": "0.1",
    "x-build-id": "RfUg08mtba5nVABbA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tortuga~yelp-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tortuga-yelp-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/tortuga~yelp-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tortuga-yelp-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/tortuga~yelp-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tortuga-yelp-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "What to search for on Yelp, e.g. \"plumbers\", \"pizza\", \"dentist\". Each term is searched in the location below. Leave empty when you only use Start URLs.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Where to search: city and state (\"San Francisco, CA\"), a neighborhood, a ZIP code or a full address. Required with search terms. Works for every country Yelp covers."
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Yelp search URLs (yelp.com/search?find_desc=...&find_loc=..., filters in the URL are kept) and business URLs (yelp.com/biz/...). Business URLs always return full details; add reviews with 'Max reviews per business'.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many dataset items in total (businesses plus reviews). You pay per item, so this caps the cost.",
            "default": 100
          },
          "maxPagesPerSearch": {
            "title": "Max search pages per search",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "Yelp lists 10 businesses per page and at most 24 pages (240 results) per search.",
            "default": 24
          },
          "includeDetails": {
            "title": "Include business details",
            "type": "boolean",
            "description": "Open each business page found in search for phone, website, full address with ZIP and coordinates, weekly hours, claimed status, amenities and menu link. One extra request and the 'detail' event per business.",
            "default": false
          },
          "includeAds": {
            "title": "Include sponsored results",
            "type": "boolean",
            "description": "Also save the sponsored (ad) businesses Yelp mixes into search results. They have no rank and are marked isAd: true.",
            "default": false
          },
          "maxReviewsPerBusiness": {
            "title": "Max reviews per business",
            "minimum": 0,
            "type": "integer",
            "description": "Scrape up to this many reviews for every business (0 = no reviews). Each review is one dataset item with rating, text, date, reviewer name and profile link, photos and the owner's reply. 20 reviews per request.",
            "default": 0
          },
          "reviewsSort": {
            "title": "Review order",
            "enum": [
              "relevance",
              "newest",
              "oldest",
              "highest",
              "lowest",
              "elites"
            ],
            "type": "string",
            "description": "Order in which reviews are collected.",
            "default": "relevance"
          },
          "reviewsLanguage": {
            "title": "Review language",
            "type": "string",
            "description": "Two-letter language code of the reviews to collect (Yelp filters reviews by language), e.g. en, es, fr, de.",
            "default": "en"
          },
          "reviewsOnly": {
            "title": "Reviews only",
            "type": "boolean",
            "description": "Save only review items, not the business items (use with business URLs to scrape reviews). Defaults to 20 reviews per business when 'Max reviews per business' is 0.",
            "default": false
          },
          "reviewsNewerThan": {
            "title": "Only reviews newer than",
            "type": "string",
            "description": "Only reviews newer than: a date (YYYY-MM-DD) or a period such as '7 days' or '24 hours'. Reviews are then read newest first, one page at a time, and paging stops at the first page that reaches older reviews, so you do not pay Unblocker requests for old reviews. Leave empty for no date limit."
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed items",
            "type": "boolean",
            "description": "Remember what earlier runs of this input returned and output only what is new or changed: new reviews (read newest first; paging stops where the previous run's reviews begin) and new businesses. Without reviews, a business is also output again when its rating, price range or closed status changed (review counts are not watched); with reviews it is output on the first run only. Unchanged businesses are skipped before their business page is opened. Use with a Schedule; unchanged items are not charged.",
            "default": false
          },
          "monitoringKey": {
            "title": "Monitoring key",
            "type": "string",
            "description": "Name for this watch, so several schedules on the same search stay separate; defaults to a key derived from the search input. Only used with 'Only new or changed items'."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Yelp shows a DataDome captcha to datacenter and residential proxies, so the default is Apify's Unblocker proxy (group UNBLOCKER). It is billed to your Apify account per request: 10 Unblocker units, about $0.0015 on the free plan and less on paid plans. Yelp refuses about half of the attempts, which are retried and also billed, so expect about $0.003 per page delivered. One page is a search page with 10 businesses, one business page, or 20 reviews.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "UNBLOCKER"
              ]
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}