{
  "openapi": "3.0.1",
  "info": {
    "title": "Yelp Ultimate Scraper",
    "description": "🍎 Extract business listings, in-depth details, reviews, menus, and popular dishes. Support for location-based search, category filtering, and automated pagination.",
    "version": "0.0",
    "x-build-id": "Wvbqk8NIA3x8sg2Yr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-ninja~yelp-ultimate-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-ninja-yelp-ultimate-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/api-ninja~yelp-ultimate-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-ninja-yelp-ultimate-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/api-ninja~yelp-ultimate-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-ninja-yelp-ultimate-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": {
          "location": {
            "title": "📍 Location",
            "type": "string",
            "description": "Enter a city, state to define your search area."
          },
          "query": {
            "title": "🔍 Search Query / Category",
            "type": "string",
            "description": "Enter a search term (e.g., 'Saloon') or a category name (e.g., 'Automotive'). If 'Search category' is enabled below, ensure you provide a valid [Yelp category](https://docs.developer.yelp.com/docs/resources-categories)."
          },
          "categorySearch": {
            "title": "🗂️ Search by category",
            "type": "boolean",
            "description": "When enabled, the Actor will use Yelp's category search endpoint instead of a general keyword search.",
            "default": false
          },
          "details": {
            "title": "ℹ️ Details Depth",
            "enum": [
              "basic",
              "advanced"
            ],
            "type": "string",
            "description": "Choose between 'Basic' for core business information (faster) or 'Advanced' for full business metadata including detailed contact and operation info.",
            "default": "basic"
          },
          "includeAds": {
            "title": "📢 Include Sponsored Results",
            "type": "boolean",
            "description": "When enabled, also collects promoted/sponsored listings alongside organic search results.",
            "default": false
          },
          "numberOfResults": {
            "title": "📊 Max Results",
            "minimum": 40,
            "type": "integer",
            "description": "Number of business listings to collect (minimum 40). The Actor will automatically handle pagination.",
            "default": 100
          },
          "scrapeAll": {
            "title": "Scrape All Available Results",
            "type": "boolean",
            "description": "Ignore the 'Max Results' limit and collect every organic listing available for this query.",
            "default": false
          },
          "businessUrl": {
            "title": "🔗 Business URLs or IDs",
            "type": "array",
            "description": "Enter a list of Yelp business URLs or 22-character IDs to scrape full profile data. Input example: https://www.yelp.com/biz/supermoon-bakehouse-new-york",
            "items": {
              "type": "string"
            }
          },
          "reviewsUrl": {
            "title": "🔗 Business URLs or IDs",
            "type": "array",
            "description": "Provide business URLs or IDs to scrape their user reviews. Input example: https://www.yelp.com/biz/supermoon-bakehouse-new-york",
            "items": {
              "type": "string"
            }
          },
          "reviewsSorting": {
            "title": "↕️ Review Sorting",
            "enum": [
              "Yelp_sort",
              "Newest_first",
              "Oldest_first",
              "Highest_rated",
              "Lowest_rated",
              "Elites"
            ],
            "type": "string",
            "description": "Choose how reviews should be ordered in the output.",
            "default": "Yelp_sort"
          },
          "ratingReviews": {
            "title": "⭐ Star Rating Filter",
            "enum": [
              "All_ratings",
              "5_stars",
              "4_stars",
              "3_stars",
              "2_stars",
              "1_star"
            ],
            "type": "string",
            "description": "Filter the reviews to only include specific star ratings.",
            "default": "All_ratings"
          },
          "numberOfReviews": {
            "title": "📊 Max Reviews per Business",
            "minimum": 40,
            "type": "integer",
            "description": "Specify the maximum number of reviews to collect per business profile (minimum 40).",
            "default": 100
          },
          "scrapeAllReviews": {
            "title": "Scrape All Available Reviews",
            "type": "boolean",
            "description": "Ignore the limit and collect every review available for the business.",
            "default": false
          },
          "businessUrlMenu": {
            "title": "🔗 Business URLs or IDs",
            "type": "array",
            "description": "Provide business URLs or IDs to extract menus or top dishes. Input example: https://www.yelp.com/biz/supermoon-bakehouse-new-york",
            "items": {
              "type": "string"
            }
          },
          "dishType": {
            "title": "🍽️ Data Type",
            "enum": [
              "menu",
              "popular"
            ],
            "type": "string",
            "description": "Choose whether to collect the full structured menu or just the 'Popular Dishes' curated by Yelp users.",
            "default": "menu"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}