{
  "openapi": "3.0.1",
  "info": {
    "title": "Yelp Reviews Scraper — Unlimited Reviews + AI Analysis",
    "description": "Scrape unlimited Yelp reviews past the 3-review page cap — reviewer name, rating, date, full text, photos and owner replies. Feed it a business URL or a search term plus city. Optional AI pain-point teardown turns the reviews into ranked complaint themes. No login or API key. Clean JSON or CSV.",
    "version": "0.0",
    "x-build-id": "BWbhkyB6jwRu3vk93"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~yelp-reviews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-yelp-reviews-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/memo23~yelp-reviews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-yelp-reviews-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/memo23~yelp-reviews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-yelp-reviews-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": {
          "startUrls": {
            "title": "Yelp business URLs",
            "type": "array",
            "description": "Paste one or more Yelp business page URLs to pull their reviews directly — the fastest path when you already know the businesses. Links from any Yelp country site (yelp.ca, yelp.co.uk, yelp.com.au, yelp.de …) work the same way.",
            "items": {
              "type": "string"
            }
          },
          "businessIds": {
            "title": "Business IDs / Place slugs (optional)",
            "type": "array",
            "description": "Scrape businesses straight from their Yelp slug or ID, no URL needed. Use the part after /biz/ in a Yelp link (for example `rise-over-run-san-francisco-2` or `house-of-pies-los-angeles`) or the encrypted ID (for example `oOCNh4YADQeG3BJKdG_N5g`). Also accepts `placeSlugs` via API.",
            "items": {
              "type": "string"
            }
          },
          "searchTerms": {
            "title": "Or search a category",
            "type": "array",
            "description": "Find businesses by category, then scrape the reviews of everything found — e.g. \"plumbers\". Needs the location field below. Leave empty when using business URLs.",
            "items": {
              "type": "string"
            }
          },
          "searchLocation": {
            "title": "Search location",
            "type": "string",
            "description": "City or region for the category search above, e.g. \"Chicago, IL\". Ignored when you supply business URLs."
          },
          "searchSortBy": {
            "title": "Sort search results by",
            "enum": [
              "",
              "rating",
              "review_count"
            ],
            "type": "string",
            "description": "Result ordering for generated searches. Applies to **Search terms** only.",
            "default": ""
          },
          "scrapeReviews": {
            "title": "Scrape reviews",
            "type": "boolean",
            "description": "Pull the full review list for every business found. Yelp only shows 3 reviews per page to anonymous visitors; this walks the full set.",
            "default": true
          },
          "maxReviews": {
            "title": "Max reviews per business",
            "type": "integer",
            "description": "Upper bound per business. Lower it to control cost on businesses with thousands of reviews.",
            "default": 200
          },
          "reviewsAsSeparateRows": {
            "title": "Output reviews as separate rows (Flat CSV/Excel)",
            "type": "boolean",
            "description": "When <b>enabled</b> (default), each review is saved as its own dataset row with business details attached — perfect for CSV/Excel export (1 row = 1 review). When <b>disabled</b>, reviews are nested inside the business row.",
            "default": true
          },
          "reviewsSort": {
            "title": "Sort reviews by",
            "enum": [
              "DATE_DESC",
              "DATE_ASC",
              "RELEVANCE_DESC"
            ],
            "type": "string",
            "description": "Order in which reviews are collected, which decides the set you get when Max reviews is lower than the business's total. DATE_DESC is newest first (default), DATE_ASC oldest first, RELEVANCE_DESC is Yelp's own \"Yelp Sort\". Needs Scrape reviews.",
            "default": "DATE_DESC"
          },
          "reviewStarRatings": {
            "title": "Only these star ratings",
            "type": "array",
            "description": "Keep only reviews with these star ratings; Yelp filters before anything is fetched, so filtered-out reviews are never billed. Example: [\"1\", \"2\"] for complaints only. Leave empty for all ratings (default). Needs Scrape reviews.",
            "items": {
              "type": "string",
              "enum": [
                "5",
                "4",
                "3",
                "2",
                "1"
              ],
              "enumTitles": [
                "★★★★★ 5 stars",
                "★★★★ 4 stars",
                "★★★ 3 stars",
                "★★ 2 stars",
                "★ 1 star"
              ]
            }
          },
          "reviewsFrom": {
            "title": "Only reviews posted on or after (Start Date)",
            "type": "string",
            "description": "Keep only reviews posted on or after this date (YYYY-MM-DD), e.g. 2026-09-01. With Newest first it stops paging at the first older review, so scheduled \"new reviews since last run\" monitoring stays cheap. Leave empty for no date limit (default). Needs Scrape reviews."
          },
          "reviewsTo": {
            "title": "Only reviews posted on or before (End Date)",
            "type": "string",
            "description": "Keep only reviews posted on or before this date (YYYY-MM-DD), e.g. 2026-10-31. Useful for analyzing a closed time window or seasonal reviews. Leave empty for no upper date limit (default). Needs Scrape reviews."
          },
          "reviewsLanguage": {
            "title": "Review language",
            "type": "string",
            "description": "Two-letter code of the review language to fetch, e.g. \"en\", \"es\", or several comma-separated (\"en,es\"). Use \"all\" to get every language each business actually has reviews in. Default en.",
            "default": "en"
          },
          "translateReviewsTo": {
            "title": "Translate reviews to",
            "type": "string",
            "description": "Optional two-letter language code, e.g. \"en\" or \"de\". Every review also comes back translated into this language by Yelp, in `textTranslated`, next to the original text. Leave empty for no translation. Needs Scrape reviews."
          },
          "reviewKeywords": {
            "title": "Only reviews mentioning",
            "type": "array",
            "description": "Keep only reviews whose text contains at least one of these words or phrases (case-insensitive), e.g. \"parking\", \"wait time\". Up to 2,000 reviews per business and language are read to find matches. Leave empty for no keyword filter. Needs Scrape reviews.",
            "items": {
              "type": "string"
            }
          },
          "scrapeFilteredReviews": {
            "title": "Include hidden (not recommended) reviews",
            "type": "boolean",
            "description": "Also collect the reviews Yelp hides behind \"N reviews that are not currently recommended\", plus reviews Yelp removed. They come in separate fields (`filteredReviews`, `adminRemovedReviews`), or as their own rows with `reviewType` when reviews are output as separate rows. Needs Fetch full business details.",
            "default": false
          },
          "maxFilteredReviews": {
            "title": "Max hidden reviews per business",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on hidden (not recommended) reviews per business.",
            "default": 100
          },
          "anonymizeReviewers": {
            "title": "Hide reviewer personal data (GDPR)",
            "type": "boolean",
            "description": "Leave out everything that identifies a reviewer: name, user ID, profile link, profile photo and location, plus the name of the owner who replied. Review text, rating, date, reactions and reviewer statistics stay. Useful when you must not store personal data.",
            "default": false
          },
          "reviewInsights": {
            "title": "📊 Review insights",
            "type": "boolean",
            "description": "Adds a computed summary per business: rating distribution, recent-vs-lifetime trend, and most-repeated phrases. Billed per business.",
            "default": false
          },
          "painPointAnalysis": {
            "title": "🤖 AI pain-point analysis",
            "type": "boolean",
            "description": "Runs an LLM teardown of the collected reviews and returns ranked complaint themes with supporting quotes. Paid plans only, billed per business.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum number of items OR limit the results per crawl",
            "type": "integer",
            "description": "Maximum number of items that will be scraped. One item = one business row. Default: 1000 — set a lower cap (e.g. 50) for test runs. At most 2000 businesses per run: split bigger searches across runs.",
            "default": 1000
          },
          "useCachedData": {
            "title": "Use cached data (faster, cheaper)",
            "type": "boolean",
            "description": "When <b>enabled</b> (default), business and search pages that were already scraped recently are served from a shared cache instead of being re-fetched — noticeably faster and cheaper. Cached rows are marked with <code>servedFromCache: true</code> and a <code>dataAsOf</code> timestamp so you always know how fresh the data is. Reviews (when enabled) are always fetched fresh. Turn this <b>off</b> to force every page to be scraped live.",
            "default": true
          },
          "maxCacheAgeDays": {
            "title": "Max cache age (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Freshness limit for cached pages. A cached record older than this many days is re-scraped live. Set <b>0</b> to always bypass the cache and fetch everything fresh. Leave empty to use sensible defaults (business details ~21 days, search listings ~14 days). Only applies when <b>Use cached data</b> is enabled."
          },
          "includeRatingDistribution": {
            "title": "Add star-rating breakdown to businesses",
            "type": "boolean",
            "description": "Adds `ratingDistribution` (how many 1★, 2★ … 5★ reviews) and `reviewLanguages` to each business, even when reviews are not scraped. Always included automatically when Scrape reviews is on.",
            "default": false
          },
          "reviewGapReport": {
            "title": "Run AI review-gap report (one report per run)",
            "type": "boolean",
            "description": "Adds a single `reviewGapReport` row comparing the subject business against the other businesses scraped in this run (up to 4 competitors, biggest first). Needs at least 2 businesses with 3+ reviews each — scrape a search page with reviews enabled. Billed once via the `review-gap-report` event; never charged when the report can't be built.",
            "default": false
          },
          "gapReportSubject": {
            "title": "Gap-report subject business",
            "type": "string",
            "description": "Which of the scraped businesses is YOURS (the report subject). Use (part of) the business name, e.g. `Tony's Pizza`. If empty, the first business scraped is the subject."
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of pages that can be processed at the same time (max 20). When <b>Fetch full business details</b> is enabled, the effective value is additionally capped to what the run's memory can sustain (about 8 at 1024MB) to prevent out-of-memory failures.",
            "default": 20
          },
          "minConcurrency": {
            "title": "Min Concurrency",
            "type": "integer",
            "description": "Minimum number of pages that will be processed at the same time.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max Request Retries",
            "type": "integer",
            "description": "Number of times the crawler will retry a failed request before giving up.",
            "default": 100
          },
          "customMapFunction": {
            "title": "Custom map function (optional)",
            "type": "string",
            "description": "Optional synchronous JS function that takes each scraped object and returns a transformed object, e.g. <code>(item) => ({ name: item.title, rating: item.rating, phone: item.phoneNumber })</code>. Runs in a sandbox (no network, require, or console; 1s limit per item). If invalid or it throws, the original item is saved unchanged."
          },
          "proxy": {
            "title": "Proxy configuration (optional override)",
            "type": "object",
            "description": "Leave empty — the actor already routes all traffic through its own built-in residential proxy at no extra cost to you. Only set this if you want to use your own proxies.<br><br>Heads-up: selecting Apify's RESIDENTIAL group here will make the run fail before it starts unless your account has that add-on enabled."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}