{
  "openapi": "3.0.1",
  "info": {
    "title": "Yelp Scraper — Business + Reviews + Menu + Photos in One Call",
    "description": "Extract a Yelp business profile + all reviews (auto-expanded, ISO dates) + menu + photos + amenities + hours in one call. Worldwide — any Yelp country domain, residential-proxy ready. No Fusion key, no 3-review cap. Pay-per-event: $0.001/business, $0.0002/review.",
    "version": "0.4",
    "x-build-id": "LqdnQBB1FMkXstI2v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/godberry~yelp-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-godberry-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/godberry~yelp-scraper/runs": {
      "post": {
        "operationId": "runs-sync-godberry-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/godberry~yelp-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-godberry-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Yelp URLs, slugs, or business searches",
            "type": "array",
            "description": "One per line. Easiest: open a Yelp business in your browser and paste its URL. Also accepts business slugs (the-original-pancake-house-portland), Yelp search URLs (yelp.com/search?find_desc=...), and free-text queries (\"Joe's Pizza Bleecker Street\"). Worldwide — works on any Yelp country domain: .com, .ca, .co.uk, .ie, .fr, .de, .at, .ch, .it, .es, .pt, .nl, .be, .pl, .cz, .dk, .fi, .no, .se, .com.au, .co.nz, .com.sg, .com.ph, .com.hk, .com.tw, .co.jp, .com.br, .com.mx, .com.ar, .cl, .com.tr. IMPORTANT: yelp.com and yelp.ca are heavily defended by DataDome and are frequently blocked from cloud platforms even with a residential proxy — the regional domains (.de, .co.uk, .fr, .com.au, .it, .es, …) are the reliable ones today; for yelp.com/.ca, a residential proxy you control gives the best odds. (A search URL or free-text query resolves to the top result only — pass business URLs directly for a multi-business pull. Yelp caps search results at 240.) RELIABILITY: business URLs and bare slugs are the dependable inputs — they load /biz/ pages directly. Free-text search queries are best-effort: Yelp 403s its /search endpoint from shared cloud IPs, so a query often fails where the equivalent URL succeeds. Use a URL or slug where you can, or supply your own proxyUrls.",
            "items": {
              "type": "string"
            }
          },
          "maxReviewsPerBusiness": {
            "title": "Max reviews per business",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum reviews to extract per business (Yelp paginates 10 per page). Higher = longer run + higher pay-per-event cost. Note: Yelp's DataDome anti-bot tends to rate-limit deep pagination after a few hundred reviews even with a residential proxy — past that the actor returns what it got rather than failing. 1000 is the hard ceiling.",
            "default": 100
          },
          "sortReviews": {
            "title": "Sort reviews by",
            "enum": [
              "relevant",
              "newest",
              "oldest",
              "highest",
              "lowest"
            ],
            "type": "string",
            "description": "How to sort the reviews before extracting.",
            "default": "newest"
          },
          "onlyWithText": {
            "title": "Only reviews with text",
            "type": "boolean",
            "description": "Skip star-only reviews that have no text content.",
            "default": false
          },
          "includeMenu": {
            "title": "Include menu (restaurants)",
            "type": "boolean",
            "description": "Extract the menu (item name, price, category, photo, description) when the business has a Yelp menu page. Restaurants only — other business types return an empty menu.",
            "default": true
          },
          "includePhotos": {
            "title": "Include photos",
            "type": "boolean",
            "description": "Include the full photo-gallery URL list (full-resolution) on each business record.",
            "default": true
          },
          "includePersonalData": {
            "title": "Include reviewer personal data (GDPR)",
            "type": "boolean",
            "description": "Reviewer name, profile URL, location, Elite status, and review count. OFF by default (privacy by default) — the business profile, the main lead-gen value, is always returned regardless. Turn this on only if you have a lawful basis to process reviewers' personal data; you are responsible for GDPR compliance when scraping EU data.",
            "default": false
          },
          "flattenForSpreadsheet": {
            "title": "Flatten output for spreadsheet (CSV / Excel)",
            "type": "boolean",
            "description": "Recommended when exporting to CSV. Array fields (photos, categories, amenities) are joined with ' | '; reviews/menu are pushed as separate row series anchored to businessAlias. Leave off for JSON consumers.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Yelp uses DataDome anti-bot, which blocks datacenter IPs — so this defaults to Apify Residential. Best practice: set the proxy country to match the regional domain you're scraping (e.g. proxy DE for yelp.de, GB for yelp.co.uk). yelp.com / yelp.ca are the hard case — they're often blocked even through a residential proxy on a cloud platform; a residential proxy on an IP you control via proxyUrls is the best option there. You can also disable the proxy for local testing.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "searchDomain": {
            "title": "Domain for searches and slugs",
            "enum": [
              "yelp.co.uk",
              "yelp.ie",
              "yelp.de",
              "yelp.at",
              "yelp.ch",
              "yelp.fr",
              "yelp.it",
              "yelp.es",
              "yelp.pt",
              "yelp.nl",
              "yelp.be",
              "yelp.pl",
              "yelp.cz",
              "yelp.dk",
              "yelp.fi",
              "yelp.no",
              "yelp.se",
              "yelp.com.au",
              "yelp.co.nz",
              "yelp.com.sg",
              "yelp.co.jp",
              "yelp.com.br",
              "yelp.com.mx",
              "yelp.com",
              "yelp.ca"
            ],
            "type": "string",
            "description": "Which regional Yelp site to use when an input is NOT a full URL — a business slug, or a free-text query like \"Burgermeister Berlin\". Full URLs always keep their own domain, and if this run also contains Yelp URLs their domain is inherited automatically. Defaults to yelp.co.uk because yelp.com and yelp.ca are blocked from shared cloud IPs by DataDome, so searches resolved there return nothing.",
            "default": "yelp.co.uk"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}