{
  "openapi": "3.0.1",
  "info": {
    "title": "Yellow Pages US Scraper",
    "description": "🏷️ From $0.69 / 1K | Scrape US businesses from Yellow Pages by trade and city. Every business page is opened for the full record: name, phone, email, address, website, services, hours, coordinates and socials. Adverts left out unless asked for, duplicates removed before you are charged.",
    "version": "0.1",
    "x-build-id": "aspFd9QKk3Qv5ousA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/spookyweb~yellow-pages-us-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-spookyweb-yellow-pages-us-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/spookyweb~yellow-pages-us-scraper/runs": {
      "post": {
        "operationId": "runs-sync-spookyweb-yellow-pages-us-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/spookyweb~yellow-pages-us-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-spookyweb-yellow-pages-us-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": "Trades or business types",
            "type": "array",
            "description": "What to search for, one per line, written the way a customer would say it: plumbers, dentists, wedding photographers. Each one is searched in every location below, so three trades across four cities is twelve searches.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Cities or ZIP codes",
            "type": "array",
            "description": "Where to search, one per line, as a city and state such as Austin, TX or a ZIP code such as 78701. This is required whenever you give a trade: without it Yellow Pages answers for wherever the run happened to exit, which is a different city every time and produces a dataset that looks right and is not.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Yellow Pages page links",
            "type": "array",
            "description": "Paste Yellow Pages search or category pages, one per line, and each is walked as given rather than rebuilt. Mix them freely with the trades and cities above. A link that cannot be read stops the run before anything is charged rather than being silently skipped.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Businesses to return",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "How many unique businesses to return in total across every search, from 1 to 20000. Duplicates are removed before this is counted and before anything is charged, so this is the number of usable rows you get and the number you pay for.",
            "default": 200
          },
          "maxPagesPerSearch": {
            "title": "Pages per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How deep to go into each search before moving to the next. Yellow Pages serves about 30 businesses a page. A search that runs out of new businesses stops on its own whatever this is set to.",
            "default": 10
          },
          "includeDetails": {
            "title": "Get the full business details",
            "type": "boolean",
            "description": "Open each business's own Yellow Pages page to collect the email, services, payment methods, coordinates, opening hours and social profiles. This is what makes a row usable for outreach, so it is on by default. Turning it off returns the listing fields only and finishes several times faster.",
            "default": true
          },
          "includeAds": {
            "title": "Include adverts",
            "type": "boolean",
            "description": "Yellow Pages puts paid placements above and among the real results, usually national call centres rather than local businesses. They are left out by default because an advert is not a lead. Turn this on to get them, marked with isAd so you can still tell them apart.",
            "default": false
          },
          "requirePhone": {
            "title": "Only businesses with a phone",
            "type": "boolean",
            "description": "Drop businesses with no phone number. A lead you cannot call is not a lead, and a dropped business is not charged.",
            "default": false
          },
          "requireWebsite": {
            "title": "Only businesses with a website",
            "type": "boolean",
            "description": "Drop businesses with no website link. Useful when the next step is enriching the domain for emails. A dropped business is not charged.",
            "default": false
          },
          "minReviews": {
            "title": "Minimum review count",
            "type": "integer",
            "description": "Drop businesses with fewer reviews than this, which is the cheapest proxy for a business that is actually trading. Businesses with no reviews at all are dropped too. Leave empty to keep everything."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}