{
  "openapi": "3.0.1",
  "info": {
    "title": "Yellow Pages Australia Scraper — Business Leads",
    "description": "Scrape Yellow Pages Australia listings with business names, phones, websites, addresses, categories, ratings, and local lead data.",
    "version": "1.0",
    "x-build-id": "lyCNNaQ5F4SjryEUc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/muhammadafzal~yellow-pages-au-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-muhammadafzal-yellow-pages-au-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/muhammadafzal~yellow-pages-au-scraper/runs": {
      "post": {
        "operationId": "runs-sync-muhammadafzal-yellow-pages-au-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/muhammadafzal~yellow-pages-au-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-muhammadafzal-yellow-pages-au-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": "Keywords or business categories to search for on Yellow Pages Australia. Examples: \"plumber\", \"dentist\", \"italian restaurant\", \"auto repair\". Each term is cross-joined with every entry in Locations — for example, 2 terms x 3 locations = 6 searches. NOTE: Yellow Pages AU's search endpoint is unreliable via proxy — for best results, use startUrls with a category page like https://www.yellowpages.com.au/sydney-nsw-2000/plumbers-gas-fitters. Use this when the user describes a type of business, and pair it with the most specific Locations you can. Use startUrls when the user provides specific yellowpages.com.au URLs instead.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "Australian locations in \"City, ST\" format, suburb+postcode, or just postcode. Examples: \"Sydney, NSW\", \"Melbourne, VIC 3000\", \"Brisbane, QLD\", \"2000\", \"Adelaide, SA\". Each location is cross-joined with every search term. NOTE: Search mode requires YP AU to geocode the location at runtime; results may be inconsistent. For reliable location-filtered scraping, prefer a startUrl like https://www.yellowpages.com.au/sydney-nsw-2000/<category-slug>.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Yellow Pages URLs",
            "type": "array",
            "description": "Paste one or more yellowpages.com.au URLs. Accepts search results (yellowpages.com.au/search/listings?...), location-category pages (yellowpages.com.au/sydney-nsw-2000/plumbers-gas-fitters), national category pages (yellowpages.com.au/australia/plumbers), or individual business profiles (yellowpages.com.au/.../...). Filters in the URL are honored as-is. When provided alongside searchTerms, both are crawled. Use this when the user provides specific URLs instead of keywords.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "A yellowpages.com.au URL — search results, location-category page, national category page, or individual business profile URL"
                }
              }
            }
          },
          "sortBy": {
            "title": "Sort Listings By",
            "enum": [
              "default",
              "distance",
              "alpha",
              "rating"
            ],
            "type": "string",
            "description": "How Yellow Pages Australia sorts the search results before we collect them. \"default\" = relevance (YP's own ranking). \"distance\" = nearest first. \"alpha\" = alphabetical. \"rating\" = highest rated first. Applies to keyword + location searches and category URLs; ignored for individual business profile URLs.",
            "default": "default"
          },
          "includeReviews": {
            "title": "Include Customer Reviews",
            "type": "boolean",
            "description": "When enabled, embed each business's customer reviews on the result row (newest first). Off by default — turning this on makes runs slower and more expensive, since each business needs additional review-page fetches. Use maxReviewsPerBusiness to cap the count.",
            "default": false
          },
          "maxReviewsPerBusiness": {
            "title": "Max Reviews per Business",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on the number of reviews captured per business when \"Include Customer Reviews\" is on (most recent first). Set to 0 to capture every available review (an internal hard cap of ~2,000 reviews per business still applies). Ignored when reviews are disabled.",
            "default": 30
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on total business rows across all searches and URLs. Default 100 — increase for bigger runs, or set to 0 for no cap (an internal upper limit of 100,000 still applies). The actor stops requesting new listing pages once this number is reached but keeps the full final page even if it slightly overshoots. A single search term + location pair typically caps around 1,000–2,000 results — split a large request across multiple suburbs to gather more.",
            "default": 100
          },
          "maxPagesPerSearch": {
            "title": "Max Pages per Search",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum result pages to crawl per (search term x location) pair or per start URL. Yellow Pages AU typically caps results around 50 pages. Lower this for faster, cheaper runs; raise it for exhaustive coverage. Default 5 balances coverage and cost.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify proxy settings. AU residential proxies (RESIDENTIAL, country AU) are REQUIRED — Yellow Pages Australia is fronted by Cloudflare and blocks datacenter IPs and non-AU residential ranges. Leave as default unless you have a custom premium residential proxy provider (Decodo, Bright Data, IPRoyal).",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "AU"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}