{
  "openapi": "3.0.1",
  "info": {
    "title": "Yelp Scraper",
    "description": "Scrape Yelp business listings and reviews. Search by keyword, location, category, price range, rating, and more. Extract complete business profiles and detailed reviews.",
    "version": "1.0",
    "x-build-id": "EQefqtvRsITiZFgEU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/magicfingers~yelp-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-magicfingers-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/magicfingers~yelp-scraper/runs": {
      "post": {
        "operationId": "runs-sync-magicfingers-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/magicfingers~yelp-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-magicfingers-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 Keywords",
            "type": "array",
            "description": "Keywords to search for (e.g., 'pizza', 'plumber', 'hair salon'). Each keyword will produce a separate search.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Locations to search in. Can be city names, ZIP codes, or 'City, State' format (e.g., 'New York, NY', '90210', 'Chicago').",
            "items": {
              "type": "string"
            }
          },
          "directUrls": {
            "title": "Direct Yelp URLs",
            "type": "array",
            "description": "Direct Yelp business page or search result URLs to scrape. Use this instead of or in addition to search terms.",
            "items": {
              "type": "string"
            }
          },
          "maxBusinesses": {
            "title": "Max Businesses",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of businesses to scrape per search query. Set 0 for unlimited.",
            "default": 5
          },
          "maxReviewsPerBusiness": {
            "title": "Max Reviews Per Business",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of reviews to scrape per business. Set 0 to skip reviews.",
            "default": 3
          },
          "scrapeReviews": {
            "title": "Scrape Reviews",
            "type": "boolean",
            "description": "Whether to scrape individual reviews for each business.",
            "default": false
          },
          "categoryFilter": {
            "title": "Category Filter",
            "type": "string",
            "description": "Filter by Yelp category alias (e.g., 'italian', 'plumbing', 'salons'). Leave empty for all categories."
          },
          "priceFilter": {
            "title": "Price Range Filter",
            "type": "array",
            "description": "Filter by price range. Select one or more.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4"
              ],
              "enumTitles": [
                "$ (Cheap)",
                "$$ (Moderate)",
                "$$$ (Pricey)",
                "$$$$ (Ultra High-End)"
              ]
            }
          },
          "ratingFilter": {
            "title": "Minimum Rating",
            "minimum": 1,
            "maximum": 5,
            "type": "number",
            "description": "Only scrape businesses with at least this rating (1.0 - 5.0)."
          },
          "openNow": {
            "title": "Open Now Only",
            "type": "boolean",
            "description": "Only return businesses that are currently open.",
            "default": false
          },
          "distanceFilter": {
            "title": "Distance Filter",
            "enum": [
              "",
              "driving_5",
              "driving_10",
              "driving_25",
              "biking",
              "walking"
            ],
            "type": "string",
            "description": "Maximum distance from search location.",
            "default": ""
          },
          "reviewStarFilter": {
            "title": "Review Star Filter",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Only scrape reviews with this star rating (1-5). Leave empty for all ratings."
          },
          "reviewDateFrom": {
            "title": "Reviews From Date",
            "type": "string",
            "description": "Only scrape reviews posted on or after this date (YYYY-MM-DD format)."
          },
          "reviewDateTo": {
            "title": "Reviews To Date",
            "type": "string",
            "description": "Only scrape reviews posted on or before this date (YYYY-MM-DD format)."
          },
          "reviewSortOrder": {
            "title": "Review Sort Order",
            "enum": [
              "relevance_desc",
              "date_desc",
              "date_asc",
              "rating_desc",
              "rating_asc"
            ],
            "type": "string",
            "description": "How to sort reviews when scraping.",
            "default": "date_desc"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. Residential proxies recommended for Yelp."
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of pages to process concurrently. Lower values reduce chance of blocks.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}