{
  "openapi": "3.0.1",
  "info": {
    "title": "YellowPages Scraper - US Business Leads",
    "description": "Scrape YellowPages.com for US local business leads - name, phone, e-mail, website, full address, opening hours, map coordinates, categories, rating, reviews and years in business. Search any trade in any city or ZIP. Independent tool, not affiliated with YellowPages.com.",
    "version": "0.1",
    "x-build-id": "EpQSxgLLvdw01YF0m"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~yellowpages-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-yellowpages-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/scrapesage~yellowpages-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-yellowpages-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/scrapesage~yellowpages-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-yellowpages-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": "What to look for, exactly as you would type it into YellowPages - for example plumber, dentist, roofing contractor, pizza. One search per term (and per location).",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City and state (\"Chicago, IL\") or a 5-digit ZIP code (\"60601\"). Several places: separate them with \";\" (\"Austin, TX; Dallas, TX\") - every search term runs in every place.",
            "default": "Chicago, IL"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many businesses in total (0 = no limit). With several searches the total is shared fairly between them. You are only charged for businesses actually saved.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include business page details",
            "type": "boolean",
            "description": "Open each business's own YellowPages page for its e-mail address, opening hours, map coordinates, description, services, brands, payment methods, social links, extra phone numbers and more. Turn off for a faster list with the search-result fields only (name, phone, address, website, categories, rating).",
            "default": true
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional. YellowPages.com URLs to scrape directly: search result pages (yellowpages.com/search?search_terms=...), category pages (yellowpages.com/chicago-il/plumbers) or business pages (yellowpages.com/.../mip/...). Search terms and URLs can be combined.",
            "items": {
              "type": "string"
            }
          },
          "urlsFromFile": {
            "title": "Import URLs from a file",
            "type": "string",
            "description": "Optional. Paste a list of YellowPages URLs (one per line), or a link to a .txt / .csv file or a Google Sheet that holds them."
          },
          "excludeAds": {
            "title": "Exclude sponsored results",
            "type": "boolean",
            "description": "Skip every paid placement (isAd): the paid listings YellowPages ranks at the top of its results, and the sponsored ads shown around them. When this is off, results come in YellowPages' own order and the sponsored ads (often other trades or towns, with call-tracking phone numbers) are only added after a search's result list runs out.",
            "default": false
          },
          "onlyWithPhone": {
            "title": "Only businesses with a phone number",
            "type": "boolean",
            "description": "Skip businesses that list no phone number.",
            "default": false
          },
          "onlyWithWebsite": {
            "title": "Only businesses with a website",
            "type": "boolean",
            "description": "Skip businesses without their own website (a YellowPages-made listing page, reported as ypMicrositeUrl, does not count).",
            "default": false
          },
          "onlyWithEmail": {
            "title": "Only businesses with an e-mail address",
            "type": "boolean",
            "description": "Skip businesses that list no e-mail on their YellowPages page. The e-mail is on the business page, so this opens it even when \"Include business page details\" is off.",
            "default": false
          },
          "minRating": {
            "title": "Minimum star rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Keep only businesses rated at least this many stars on YellowPages. 0 keeps everything, including unrated businesses.",
            "default": 0
          },
          "minReviews": {
            "title": "Minimum reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only businesses with at least this many YellowPages reviews. 0 keeps everything.",
            "default": 0
          },
          "maxPagesPerSearch": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Optional. Leave empty to page as deep as \"Max results\" needs. YellowPages shows 30 businesses per page and up to 100 pages (3,000 results) per search."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "YellowPages sits behind Cloudflare. With the default setting the actor connects through Apify data-center proxies first and moves any refused request to the Apify residential proxies (United States) shown here, so it keeps working when data-center addresses are turned away. If you choose other settings, they are tried first and the residential proxies stay the fallback.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}