{
  "openapi": "3.0.1",
  "info": {
    "title": "Yelp Scraper — Business Reviews, Ratings & Contact Info",
    "description": "Scrape Yelp business listings by search query and location. Extract reviews, ratings, contact info, hours, photos, and more. Filter by category, price range, and rating. Export structured JSON data.",
    "version": "1.0",
    "x-build-id": "7pHY0Kw0gnnkA2LcJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/junipr~yelp-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-junipr-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/junipr~yelp-scraper/runs": {
      "post": {
        "operationId": "runs-sync-junipr-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/junipr~yelp-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-junipr-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": "Search keywords to find businesses on Yelp (e.g. \"pizza\", \"plumber\", \"dentist\"). Provide at least one search term with a location, or use direct business URLs instead.",
            "items": {
              "type": "string"
            },
            "default": [
              "restaurants"
            ]
          },
          "businessUrls": {
            "title": "Business URLs",
            "type": "array",
            "description": "Direct Yelp business page URLs to scrape (e.g. \"https://www.yelp.com/biz/joes-pizza-new-york\"). Use this instead of search terms to scrape specific businesses.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Location to search in (e.g. \"San Francisco, CA\", \"Chicago, IL\", \"10001\"). Required when using search terms.",
            "default": "New York, NY"
          },
          "latitude": {
            "title": "Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Center latitude for geo-based search. Use with longitude instead of location text.",
            "default": 0
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Center longitude for geo-based search. Use with latitude instead of location text.",
            "default": 0
          },
          "radiusMiles": {
            "title": "Radius (miles)",
            "minimum": 1,
            "maximum": 25,
            "type": "number",
            "description": "Search radius in miles from the center point when using coordinates.",
            "default": 10
          },
          "maxBusinesses": {
            "title": "Max Businesses",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of businesses to extract from search results.",
            "default": 100
          },
          "includeReviews": {
            "title": "Include Reviews",
            "type": "boolean",
            "description": "Extract reviews for each business. Each business page shows up to 10 reviews by default.",
            "default": true
          },
          "maxReviews": {
            "title": "Max Reviews Per Business",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of reviews to extract per business. Only visible (non-filtered) reviews are extracted.",
            "default": 10
          },
          "includePhotos": {
            "title": "Include Photos",
            "type": "boolean",
            "description": "Extract photo URLs from each business page.",
            "default": true
          },
          "includeMenu": {
            "title": "Include Menu",
            "type": "boolean",
            "description": "Extract menu items for restaurants. Only works for businesses that have a menu on Yelp.",
            "default": false
          },
          "includeHours": {
            "title": "Include Hours",
            "type": "boolean",
            "description": "Extract business hours for each day of the week.",
            "default": true
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "best_match",
              "rating",
              "review_count",
              "distance"
            ],
            "type": "string",
            "description": "Sort order for search results.",
            "default": "best_match"
          },
          "priceFilter": {
            "title": "Price Filter",
            "type": "array",
            "description": "Filter by price level. 1 = $, 2 = $$, 3 = $$$, 4 = $$$$. Leave empty for all price levels.",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 4
            },
            "default": []
          },
          "openNow": {
            "title": "Open Now",
            "type": "boolean",
            "description": "Only return businesses that are currently open.",
            "default": false
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Filter by Yelp category alias (e.g. \"restaurants\", \"plumbers\", \"dentists\"). See Yelp's category list for valid aliases.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Residential proxy is recommended — Yelp blocks datacenter IPs. Defaults to Apify residential proxy (requires paid Apify plan). Free-plan users can provide their own residential proxy URL.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}