{
  "openapi": "3.0.1",
  "info": {
    "title": "Yelp Scraper API - Business Leads, Reviews & Emails",
    "description": "Extract Yelp business profiles, phones, public website emails, reviews, owner replies, photos and opening hours. Identify unanswered low-star reviews, analyze response times and collect Yelp translations. Export source-linked data to JSON, CSV or Excel.",
    "version": "1.0",
    "x-build-id": "VlZcOe6XNt4Lu5zP2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trakk~yelp-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trakk-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/trakk~yelp-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trakk-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/trakk~yelp-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trakk-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": {
          "workflow": {
            "title": "What would you like to collect?",
            "enum": [
              "CUSTOM",
              "BUSINESSES",
              "REVIEWS",
              "LEADS",
              "REVIEW_INSIGHTS",
              "SEARCH_RESULTS"
            ],
            "type": "string",
            "description": "Choose a ready-made workflow or keep the individual options in Custom mode.",
            "default": "CUSTOM"
          },
          "directUrls": {
            "title": "🔗 Business URLs",
            "type": "array",
            "description": "Direct Yelp business page URLs (or aliases), e.g. https://www.yelp.com/biz/gary-danko-san-francisco.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchTerms": {
            "title": "🔎 Search keywords",
            "type": "array",
            "description": "What to search for on Yelp, e.g. \"coffee\", \"plumbers\", \"sushi\". Combined with each location below.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "📍 Locations",
            "type": "array",
            "description": "Where to search — city, ZIP, or area, e.g. \"San Francisco, CA\". Each search keyword runs in each location.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "🔗 Yelp search URLs",
            "type": "array",
            "description": "Paste ready-made Yelp search result URLs (with filters applied) to expand into businesses.",
            "items": {
              "type": "string"
            }
          },
          "scrapeReviews": {
            "title": "💬 Scrape reviews",
            "type": "boolean",
            "description": "For every business found, also collect its reviews (full text, rating, author, photos, owner replies).",
            "default": true
          },
          "maxReviewsPerBusiness": {
            "title": "Max reviews per business",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on reviews collected per business. 0 = all.",
            "default": 20
          },
          "reviewSort": {
            "title": "Review sort",
            "enum": [
              "relevance",
              "newest",
              "oldest",
              "highest",
              "lowest",
              "elites"
            ],
            "type": "string",
            "description": "Ordering for collected reviews.",
            "default": "relevance"
          },
          "reviewRatings": {
            "title": "Only these star ratings",
            "type": "array",
            "description": "Keep only reviews with these star ratings (1–5). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "1★",
                "2★",
                "3★",
                "4★",
                "5★"
              ]
            },
            "default": []
          },
          "reviewKeyword": {
            "title": "Keyword in reviews",
            "type": "string",
            "description": "Keep only reviews mentioning this keyword/phrase."
          },
          "reviewLanguage": {
            "title": "Review language",
            "enum": [
              "all",
              "en",
              "es",
              "fr",
              "de",
              "it",
              "nl",
              "pt",
              "ru",
              "ja",
              "zh",
              "zh_TW",
              "ko",
              "tr",
              "ar",
              "da",
              "fi",
              "no",
              "sv",
              "he",
              "th",
              "pl",
              "cs",
              "hu",
              "el"
            ],
            "type": "string",
            "description": "Filter by the review language. Translation requests use this as the target language when supported by Yelp.",
            "default": "en"
          },
          "translateReviews": {
            "title": "Translate reviews",
            "type": "boolean",
            "description": "Translate non-matching reviews into the selected language.",
            "default": false
          },
          "sentiment": {
            "title": "🧠 Sentiment analysis",
            "type": "boolean",
            "description": "Add a sentiment score and label to each review.",
            "default": false
          },
          "enrichContacts": {
            "title": "📧 Enrich contacts",
            "type": "boolean",
            "description": "Pull emails and social profiles from the business's own website.",
            "default": false
          },
          "reviewAnalytics": {
            "title": "📊 Review analytics",
            "type": "boolean",
            "description": "Emit a per-business rollup: average rating/sentiment, rating distribution, top keywords.",
            "default": false
          },
          "onlyNewerThan": {
            "title": "Only reviews newer than (Unix time)",
            "minimum": 0,
            "type": "integer",
            "description": "Exclusive timestamp cutoff in seconds or milliseconds. Use Review date from below for an ISO date.",
            "default": 0
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum successfully saved business, review and legacy analytics rows across the entire run. Review insights reports are separate and included.",
            "default": 200
          },
          "maxBusinessesPerSearch": {
            "title": "Max businesses per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many businesses to take from each search keyword/URL.",
            "default": 20
          },
          "dedupe": {
            "title": "Remove duplicates",
            "type": "boolean",
            "description": "Save each business/review only once per run.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Yelp requires residential proxies; the default is tuned for reliable access.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxConcurrency": {
            "title": "Parallel businesses",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Requested parallel businesses. Effective concurrency also respects the run memory allocation.",
            "default": 5
          },
          "maxRetries": {
            "title": "Request retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries for a failed Yelp request.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (s)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time for one request.",
            "default": 20
          },
          "reviewDateFrom": {
            "title": "Review date from",
            "type": "string",
            "description": "Exclusive review cutoff: ISO date or timestamp, for example 2026-08-01T00:00:00Z. Do not combine conflicting values with onlyNewerThan."
          },
          "includeAds": {
            "title": "Include sponsored businesses",
            "type": "boolean",
            "description": "Include source-labeled ads in search results.",
            "default": false
          },
          "maxSearchPages": {
            "title": "Search page limit",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum pages per search; the run summary explains coverage.",
            "default": 24
          },
          "maxReviewPages": {
            "title": "Review page limit",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum review pages per business.",
            "default": 1000
          },
          "businessAliases": {
            "title": "Business aliases or IDs",
            "type": "array",
            "description": "Business aliases such as gary-danko-san-francisco or Yelp business IDs. Use this field for plain identifiers.",
            "default": [],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}