{
  "openapi": "3.0.1",
  "info": {
    "title": "Yelp Business Scraper - Leads, Emails, Contacts & Reviews",
    "description": "Scrape Yelp businesses by keyword and location or by URL. Get name, categories, rating, reviews, price, phone, website, emails and socials, full address, coordinates, hours, attributes, menu, health score and photos. Optional AI lead scoring. Export to JSON, CSV or Excel.",
    "version": "0.2",
    "x-build-id": "et5s3Teiu44fIWqk6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~yelp-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-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/scrapers_lat~yelp-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-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/scrapers_lat~yelp-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-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": "One or more things to search on Yelp, for example a category or business type (plumbers, coffee, dentists, law firms). Each term is searched in each location.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "One or more places to search, for example a city and state or a ZIP code (Austin, TX / San Francisco, CA / 10001). Each location is searched with every term.",
            "items": {
              "type": "string"
            }
          },
          "businessUrls": {
            "title": "Business URLs (optional)",
            "type": "array",
            "description": "Scrape specific businesses directly by their Yelp page URL (https://www.yelp.com/biz/<alias>) or a bare alias. When set, these are scraped in addition to any search. Direct URLs always fetch the full business detail page.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxBusinesses": {
            "title": "Max Businesses To Scrape",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of businesses to collect across the whole run (all terms, locations and URLs combined). Free Apify plans are capped at 10 per run."
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "Recommended",
              "Highest Rated",
              "Most Reviewed",
              "Distance"
            ],
            "type": "string",
            "description": "Result order returned by Yelp search.",
            "default": "Recommended"
          },
          "priceLevels": {
            "title": "Price Levels",
            "type": "array",
            "description": "Filter to specific price levels: 1 = $, 2 = $$, 3 = $$$, 4 = $$$$. Leave empty for all price levels.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "openNow": {
            "title": "Open Now Only",
            "type": "boolean",
            "description": "Only return businesses that are open at the time of the run.",
            "default": false
          },
          "minRating": {
            "title": "Minimum Rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Only keep businesses with at least this star rating (1 to 5). Leave at 0 for no rating filter.",
            "default": 0
          },
          "attributes": {
            "title": "Feature / Attribute Filters",
            "type": "array",
            "description": "Filter by Yelp feature attributes. Pass Yelp attribute keys, for example: hot_and_new, deals_v2, RestaurantsDelivery, RestaurantsTakeOut, RestaurantsReservations, WiFi, BusinessAcceptsCreditCards, DogsAllowed, WheelchairAccessible, OutdoorSeating, GoodForKids. Leave empty for no attribute filter.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxImages": {
            "title": "Max Images Per Business",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of photo URLs to return per business (only when the business detail page is fetched). Set 0 to skip images.",
            "default": 10
          },
          "withContacts": {
            "title": "Add contact enrichment (paid add-on, off by default)",
            "type": "boolean",
            "description": "Fetch each business detail page to add website, email(s) and social profiles from the business site, full address (street/city/state/ZIP/country), coordinates, opening hours, attributes/amenities, menu URL, health score, verified license, photos, claimed status, year established and description. Charged only when a phone or website is found. Disabled on free plans.",
            "default": false
          },
          "scrapeReviews": {
            "title": "Add review highlights (paid add-on, off by default)",
            "type": "boolean",
            "description": "Include the review highlight excerpts Yelp publishes on the business page, as a reviews array (capped by Max Reviews). Note: Yelp does not expose full individual review bodies to HTTP clients, so this returns highlight excerpts, not the complete review-by-review feed. Requires the detail page fetch. Disabled on free plans.",
            "default": false
          },
          "maxReviews": {
            "title": "Max Reviews Per Business",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of review highlight excerpts to return per business when review scraping is enabled.",
            "default": 10
          },
          "reviewSort": {
            "title": "Review Sort",
            "enum": [
              "Yelp Sort",
              "Newest First",
              "Oldest First",
              "Highest Rated",
              "Lowest Rated"
            ],
            "type": "string",
            "description": "Preferred review ordering when review scraping is enabled.",
            "default": "Yelp Sort"
          },
          "withLeadScore": {
            "title": "Add AI lead score (paid add-on, off by default)",
            "type": "boolean",
            "description": "Use AI to score each business as a sales lead (0 to 100), assign a tier and give a one-line rationale. Charged only when a usable score is returned. Disabled on free plans.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}