{
  "openapi": "3.0.1",
  "info": {
    "title": "Yelp Business Scraper",
    "description": "Scrape Yelp businesses by search term and location, or from Yelp links: name, rating, reviews, price, categories, full address, coordinates, phone, website, hours, claimed status, photo count and amenities. Gets past Yelp's 240-result limit by splitting the map. Pay per business.",
    "version": "1.0",
    "x-build-id": "9vTep7oCdHG5vaEmi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lmbtechnology~yelp-business-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lmbtechnology-yelp-business-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/lmbtechnology~yelp-business-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lmbtechnology-yelp-business-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/lmbtechnology~yelp-business-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lmbtechnology-yelp-business-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",
            "uniqueItems": true,
            "type": "array",
            "description": "What to search for, one per line, as you would type it on Yelp: `plumbers`, `pizza`, `dentists`, `hair salons`. Every search term is run in every location. Leave empty to list all businesses in the locations.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "uniqueItems": true,
            "type": "array",
            "description": "Where to search, one per line: `City, ST` (`Fort Myers, FL`), a neighborhood with its city (`Mission District, San Francisco, CA`) or a ZIP code (`33901`). Always add the state: a bare city name can match a place in another country.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Yelp links",
            "type": "array",
            "description": "Optional. Yelp search links (`https://www.yelp.com/search?find_desc=...&find_loc=...`, filters in the link are kept) and business links (`https://www.yelp.com/biz/...`). Links from any Yelp country site work. Business links always include details.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResultsPerSearch": {
            "title": "Maximum businesses per search",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "How many businesses to save for each search term + location (and each search link), in Yelp's order. Yelp itself never lists more than 240 for one search; turn on \"Split large searches\" to go past that.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include details (phone, website, full address)",
            "type": "boolean",
            "description": "Open each business page to add phone, website, state, ZIP code, claimed status, photo count, amenities, specialties, year established and service areas. Recommended for lead lists. Costs one extra `business-details` event per business. When off you get what the search list shows: name, rating, reviews, price, categories, street and city, coordinates and hours.",
            "default": true
          },
          "splitLargeSearches": {
            "title": "Split large searches (get more than 240)",
            "type": "boolean",
            "description": "When a search hits Yelp's 240-result limit, split its map area into four smaller areas, again and again, until every area has fewer than 240 results. Duplicates are removed. Use it with a higher \"Maximum businesses per search\" (for example 2,000) to collect a whole city. Results are then in map order, not Yelp's ranking.",
            "default": false
          },
          "category": {
            "title": "Category filter",
            "pattern": "^[A-Za-z0-9_]{0,60}$",
            "type": "string",
            "description": "Optional Yelp category alias, the `cflt` value in Yelp links: `plumbing`, `italian`, `dentists`, `hair`, `autorepair`. Leave empty for no filter."
          },
          "priceLevels": {
            "title": "Price",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only these Yelp price levels. Leave empty for all prices. Businesses without a price level (most services) are left out by Yelp when this is set.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4"
              ],
              "enumTitles": [
                "$",
                "$$",
                "$$$",
                "$$$$"
              ]
            }
          },
          "minRating": {
            "title": "Minimum rating",
            "enum": [
              "0",
              "3",
              "3.5",
              "4",
              "4.5"
            ],
            "type": "string",
            "description": "Keep only businesses with at least this star rating. Businesses without reviews are left out when this is set.",
            "default": "0"
          },
          "openNow": {
            "title": "Open now",
            "type": "boolean",
            "description": "Keep only businesses that are open at the time of the run, in their own time zone (checked against Yelp's filter and each business's hours).",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "recommended",
              "rating",
              "review_count"
            ],
            "type": "string",
            "description": "Yelp's sort order for the searches. With \"Maximum businesses per search\" below 240 this decides which businesses you get.",
            "default": "recommended"
          },
          "includeReviewHighlights": {
            "title": "Include review highlights",
            "type": "boolean",
            "description": "Add Yelp's review highlights (short quoted phrases with how many reviews mention them). Needs \"Include details\". These are not full reviews. No extra charge, a little slower.",
            "default": false
          },
          "deduplicateAcrossSearches": {
            "title": "Remove duplicates across searches",
            "type": "boolean",
            "description": "Save each business only once per run, even when several search terms or locations find it (you pay for it once). Turn off to get the business again for every search that finds it.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many Yelp pages to load at the same time. Lower it if you see many retries in the log.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy. Datacenter proxies (the default) work for Yelp; if Yelp starts rate-limiting them the run switches to residential proxies by itself. Pick a proxy group yourself only if you need to.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}