{
  "openapi": "3.0.1",
  "info": {
    "title": "Yellow Pages Scraper - BBB, Europages, Business Directory",
    "description": "Yellow Pages, BBB, Gelbe Seiten and Europages scraper in one run: 524 businesses from a BBB search that hands a human 175, measured. 7 directories, 38 columns, 11 filters that run before billing. Yellow pages data scraper, BBB business search, Europages directory.",
    "version": "0.1",
    "x-build-id": "k8gw4qb2RhhHiN3YU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/snow_leo_data~yellow-pages-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-snow_leo_data-yellow-pages-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/snow_leo_data~yellow-pages-scraper/runs": {
      "post": {
        "operationId": "runs-sync-snow_leo_data-yellow-pages-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/snow_leo_data~yellow-pages-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-snow_leo_data-yellow-pages-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",
        "required": [
          "searchTerms"
        ],
        "properties": {
          "searchTerms": {
            "title": "🔎 What to search for",
            "type": "array",
            "description": "Trade, category or company name, exactly as you would type it into the directory. One run can take several terms.",
            "default": [
              "plumber"
            ],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "📍 Where to search",
            "type": "array",
            "description": "City, state or postcode. Used by Yellow Pages US, Yellow Pages Canada, BBB, Gelbe Seiten, PagineGialle and Hotfrog. Europages searches by country instead, so it ignores this field.",
            "default": [
              "Austin, TX"
            ],
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "📒 Directories",
            "type": "array",
            "description": "Every directory here answers plain HTTP from the Apify cloud — no proxy, no browser. Rows from all of them arrive in one table with one schema.",
            "items": {
              "type": "string",
              "enum": [
                "yellowpages_us",
                "yellowpages_ca",
                "bbb",
                "gelbeseiten",
                "paginegialle",
                "europages",
                "hotfrog"
              ],
              "enumTitles": [
                "Yellow Pages US — 30 per page, website + years in business",
                "Yellow Pages Canada — 35 per page, website + rating",
                "Better Business Bureau — US & Canada, A+ rating, accreditation",
                "Gelbe Seiten (Germany) — 50 per page, e-mail addresses",
                "PagineGialle (Italy) — 25 per page, rating + opening hours, no website",
                "Europages (Europe B2B) — 28 countries, staff count, founding year",
                "Hotfrog — 27 country sites, latitude and longitude"
              ]
            },
            "default": [
              "yellowpages_us",
              "bbb"
            ]
          },
          "countries": {
            "title": "🌍 Countries for BBB, Europages and Hotfrog",
            "type": "array",
            "description": "Only these three directories take a country. Yellow Pages US, Yellow Pages Canada, Gelbe Seiten and PagineGialle are tied to their own country and ignore this field.",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "CA",
                "GB",
                "AU",
                "DE",
                "FR",
                "IT",
                "ES",
                "NL",
                "IE",
                "NZ",
                "IN",
                "ZA",
                "SG",
                "BE",
                "AT",
                "CH",
                "PL",
                "SE",
                "DK",
                "NO",
                "FI",
                "PT",
                "BR",
                "MX",
                "CZ",
                "HU",
                "RO",
                "GR",
                "TR"
              ],
              "enumTitles": [
                "United States",
                "Canada",
                "United Kingdom",
                "Australia",
                "Germany",
                "France",
                "Italy",
                "Spain",
                "Netherlands",
                "Ireland",
                "New Zealand",
                "India",
                "South Africa",
                "Singapore",
                "Belgium",
                "Austria",
                "Switzerland",
                "Poland",
                "Sweden",
                "Denmark",
                "Norway",
                "Finland",
                "Portugal",
                "Brazil",
                "Mexico",
                "Czechia",
                "Hungary",
                "Romania",
                "Greece",
                "Turkey"
              ]
            },
            "default": [
              "US"
            ]
          },
          "maxItems": {
            "title": "Maximum businesses to return",
            "minimum": 0,
            "type": "integer",
            "description": "This is a limit on ROWS YOU GET, not on pages crawled. With filters on, the actor keeps crawling past the limit until enough rows survive the filters. Leave empty for a 100-row trial run."
          },
          "expandBuckets": {
            "title": "Break past the BBB 225-result cap",
            "type": "boolean",
            "description": "BBB reports thousands of matches but never returns more than 15 pages of 15 rows for one query. With this on, the actor re-runs the search once per category bucket that BBB itself lists, which reaches businesses the plain search never shows. Measured on Austin, TX / plumber: the source reported 2537 matches and capped the plain search at 225.",
            "default": true
          },
          "maxPagesPerQuery": {
            "title": "Hard page limit per query",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "Optional safety stop. Leave empty and the actor asks for exactly as many pages as your row limit needs."
          },
          "requirePhone": {
            "title": "Only businesses with a phone number",
            "type": "boolean",
            "description": "Applied BEFORE the row is written to the dataset, so filtered-out rows are never charged.",
            "default": false
          },
          "requireWebsite": {
            "title": "Only businesses with a website",
            "type": "boolean",
            "description": "Yellow Pages US (79% of rows), Yellow Pages Canada (49%) and Gelbe Seiten (56%) publish the website on the search page. BBB, PagineGialle, Europages and Hotfrog do not publish it at all, and selecting this filter without one of the first three stops the run before any request.",
            "default": false
          },
          "requireEmail": {
            "title": "Only businesses with an e-mail address",
            "type": "boolean",
            "description": "Gelbe Seiten is the only supported directory that puts an e-mail on the search page. Measured: 16 of 50 rows for plumber/Berlin, 32 of 50 for dentist/Berlin.",
            "default": false
          },
          "excludeAds": {
            "title": "Skip paid placements",
            "type": "boolean",
            "description": "Removes listings the directory marks as advertising.",
            "default": false
          },
          "onlyAccredited": {
            "title": "Only BBB-accredited businesses",
            "type": "boolean",
            "description": "Better Business Bureau field. Selecting it without BBB in the directory list stops the run before any request, because it could only return zero rows.",
            "default": false
          },
          "minRating": {
            "title": "Minimum star rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Yellow Pages US, Yellow Pages Canada and PagineGialle publish star ratings."
          },
          "minYearsInBusiness": {
            "title": "Minimum years in business",
            "minimum": 0,
            "type": "integer",
            "description": "Yellow Pages US field."
          },
          "nameContains": {
            "title": "Company name must contain",
            "type": "array",
            "description": "Any one of these words is enough.",
            "items": {
              "type": "string"
            }
          },
          "excludeNames": {
            "title": "Company name must not contain",
            "type": "array",
            "description": "Any row whose company name contains one of these words is dropped before billing.",
            "items": {
              "type": "string"
            }
          },
          "cityContains": {
            "title": "City must contain",
            "type": "string",
            "description": "Rows where the directory did not print a city are kept: a missing city is the directory staying silent, not a mismatch."
          },
          "categoryContains": {
            "title": "Category must contain",
            "type": "string",
            "description": "Keeps only rows whose category list contains this word. Rows where the directory printed no category are kept."
          },
          "onlyNew": {
            "title": "Only new and changed businesses",
            "type": "boolean",
            "description": "Remembers what earlier runs already delivered in a named key-value store and skips it, so a daily monitor does not pay twice for the same row. Every row carries change_type: NEW or UPDATED.",
            "default": false
          },
          "emitUnchanged": {
            "title": "Also return unchanged businesses",
            "type": "boolean",
            "description": "Only meaningful together with the option above. Off by default, because unchanged rows would be charged again.",
            "default": false
          },
          "compactOutput": {
            "title": "Compact rows",
            "type": "boolean",
            "description": "Eleven contact-only columns instead of thirty-seven. Useful for AI agents and for CSV exports.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Drop empty fields",
            "type": "boolean",
            "description": "Leaves out columns that are null for a given row.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}