{
  "openapi": "3.0.1",
  "info": {
    "title": "Yelp Scraper: Business Leads, Phones, Websites & Reviews",
    "description": "Scrape Yelp businesses by search term and location, search URL or business URL: name, phone, website, address, hours, rating, review count, categories, price and attributes, plus optional reviews. Gets past Yelp's 240-result limit. $0.50 per 1,000 businesses.",
    "version": "0.0",
    "x-build-id": "Mvvkk4AhfYgqNyAXa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/epicscrapers~yelp-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-epicscrapers-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/epicscrapers~yelp-scraper/runs": {
      "post": {
        "operationId": "runs-sync-epicscrapers-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/epicscrapers~yelp-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-epicscrapers-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, one per line, e.g. plumbers, pizza, dentist, hair salon. Each term is searched in every location below.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Where to search, one per line: a city (Chicago, IL), neighborhood (Williamsburg, Brooklyn), ZIP code (90210) or address, in any country Yelp covers.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Yelp URLs or business IDs",
            "type": "array",
            "description": "Optional. Yelp business URLs (https://www.yelp.com/biz/gary-danko-san-francisco) or IDs to scrape directly, and Yelp search URLs (https://www.yelp.com/search?find_desc=sushi&find_loc=San+Francisco) with their filters and sort.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSearch": {
            "title": "Max businesses per search",
            "minimum": 0,
            "type": "integer",
            "description": "How many businesses to collect for each search term in each location. Yelp shows at most 240 results per search; above that, the scraper searches the area in map tiles to find more. Set to 0 for every business it can find.",
            "default": 100
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "recommended",
              "rating",
              "reviewCount",
              "distance"
            ],
            "type": "string",
            "description": "Order of search results. With a limit, it decides which businesses you get.",
            "default": "recommended"
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Optional Yelp category alias, as in the cflt= part of a Yelp search URL: e.g. plumbing, pizza, dentists, hair, coffee, autorepair. Can be used without search terms to get every business in the category."
          },
          "priceLevels": {
            "title": "Price",
            "type": "array",
            "description": "Only businesses at these price levels. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4"
              ],
              "enumTitles": [
                "$",
                "$$",
                "$$$",
                "$$$$"
              ]
            },
            "default": []
          },
          "openNow": {
            "title": "Open now",
            "type": "boolean",
            "description": "Only businesses open at the time of the run (local time of the location).",
            "default": false
          },
          "features": {
            "title": "Features",
            "type": "array",
            "description": "Only businesses with all of these features.",
            "items": {
              "type": "string",
              "enum": [
                "RestaurantsDelivery",
                "RestaurantsTakeOut",
                "RestaurantsReservations",
                "GoodForKids",
                "RestaurantsGoodForGroups",
                "OutdoorSeating",
                "DogsAllowed",
                "WiFi.free",
                "Alcohol.full_bar",
                "WheelchairAccessible",
                "hottest_new_opening"
              ],
              "enumTitles": [
                "Offers delivery",
                "Offers takeout",
                "Takes reservations",
                "Good for kids",
                "Good for groups",
                "Outdoor seating",
                "Dogs allowed",
                "Free Wi-Fi",
                "Full bar",
                "Wheelchair accessible",
                "Hot and new"
              ]
            },
            "default": []
          },
          "maxReviewsPerBusiness": {
            "title": "Reviews per business",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Add up to this many reviews to each business (in a reviews list on the row). 0 = no reviews. For full review histories, use Yelp Reviews Scraper (epicscrapers/yelp-reviews-scraper).",
            "default": 0
          },
          "reviewsSort": {
            "title": "Review order",
            "enum": [
              "newest",
              "oldest",
              "highest",
              "lowest",
              "elite",
              "recommended"
            ],
            "type": "string",
            "description": "Which reviews to add when there are more than the limit.",
            "default": "newest"
          },
          "reviewLanguages": {
            "title": "Review languages",
            "type": "array",
            "description": "Two-letter language codes, e.g. en, es, fr. Leave empty for reviews in every language.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeReviewerDetails": {
            "title": "Include reviewer details",
            "type": "boolean",
            "description": "Reviewer name, profile link, location, review count and Elite status on each review. Turn off to leave these empty, e.g. if you have no lawful basis to process personal data.",
            "default": true
          },
          "includeRatingBreakdown": {
            "title": "Star rating breakdown",
            "type": "boolean",
            "description": "Add how many 1★ to 5★ reviews each business has. Takes one extra request per business, so runs are a little slower.",
            "default": false
          },
          "onlyNewBusinesses": {
            "title": "Only new businesses (for repeat runs)",
            "type": "boolean",
            "description": "Remember which businesses earlier runs of the same search saved and return only ones not seen before. Turn it on in a saved task or schedule to get new leads as they appear on Yelp; you pay only for those.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}