# Yellow Pages Australia Scraper — Business Leads (`muhammadafzal/yellow-pages-au-scraper`) Actor

Scrape Yellow Pages Australia listings with business names, phones, websites, addresses, categories, ratings, and local lead data.

- **URL**: https://apify.com/muhammadafzal/yellow-pages-au-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 business listing extracteds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Yellow Pages Australia Scraper — Business Leads

Extract Australian business listings from **yellowpages.com.au** at scale. Get business name, phone, address, website, email, hours, services, categories, ratings, review counts, social links, ABN registration, claimed status, years in business, and optional customer reviews — all in clean, CRM-ready structured JSON.

Search by keyword + location, paste category URLs, or pull individual business profiles. Mix all three input modes in a single run. Optimized for B2B lead generation, local-SEO analysis, market research, and AI-agent pipelines.

### What it does

- **Search mode**: provide `searchTerms` + `locations` (cross-joined) — e.g. `["plumber", "electrician"]` × `["Sydney, NSW", "Melbourne, VIC"]` = 4 searches
- **URL mode**: paste yellowpages.com.au search URLs, location-category pages (`/sydney-nsw-2000/plumbers-gas-fitters`), national category pages (`/australia/plumbers`), or individual business profiles
- **Multi-input**: combine search terms and direct URLs in one run
- **Pagination**: crawls up to `maxPagesPerSearch` result pages per search
- **Detail enrichment**: visits each business profile page for the full field set (email, hours, services, socials, ABN, trust signals)
- **Reviews**: optional per-business customer reviews (newest-first, capped via `maxReviewsPerBusiness`)
- **Sort**: by relevance (default), distance, alpha, or rating

### Use cases

- Build targeted B2B prospect lists by category and suburb/postcode for outbound sales in Australia
- Pull every business in a category or metro for market coverage and competitor mapping
- Filter for unverified/owner-unclaimed listings to identify outreach opportunities
- Identify ABN-registered businesses for compliance and verification workflows
- Enrich existing CRM data with verified phone, website, structured address, hours, socials
- Extract customer reviews for sentiment analysis, quality benchmarking, reputation research
- Map local business density and compare market-level metrics (ratings, review volume, years in business)
- Seed RAG/LLM corpora with structured Australian local-business records

### Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `searchTerms` | string[] | no | `["plumber"]` | Keywords/categories — cross-joined with `locations` |
| `locations` | string[] | no | `["Sydney, NSW"]` | AU locations in "City, ST" or "Suburb POSTCODE" format |
| `startUrls` | array | no | `[]` | Direct yellowpages.com.au URLs (search, category, or profile) |
| `sortBy` | enum | no | `default` | `default`/`distance`/`alpha`/`rating` |
| `includeReviews` | boolean | no | `false` | Embed customer reviews per business |
| `maxReviewsPerBusiness` | integer | no | `30` | Cap on reviews per business (0 = all, hard cap ~2000) |
| `maxResults` | integer | no | `100` | Hard cap on total business rows (0 = unlimited, internal cap 100k) |
| `maxPagesPerSearch` | integer | no | `5` | Max result pages per search/URL |
| `proxyConfiguration` | object | no | AU residential | **Required**: AU residential proxies (Cloudflare blocks datacenter) |

### Output

One record per business in the dataset:

| Field | Type | Example |
|---|---|---|
| `name` | string | "Acme Plumbing" |
| `phone` | string\|null | "(02) 9876 5432" |
| `email` | string\|null | "info@acme.com.au" |
| `website` | string\|null | "https://acme.com.au" |
| `address` | object | `{street, city, state, postalCode, country}` |
| `addressFormatted` | string | "123 Main St, Sydney, NSW 2000" |
| `coordinates` | object\|null | `{lat, lng}` |
| `categories` | string[] | `["Plumbers","Gas Fitters"]` |
| `primaryCategory` | string\|null | "Plumbers" |
| `services` | string[] | `["Drain cleaning","Hot water repair"]` |
| `paymentMethods` | string[] | `["Visa","Mastercard"]` |
| `hours` | object\|null | `{mon:"8:00-17:00",...}` |
| `rating` | number\|null | 4.5 |
| `reviewCount` | number\|null | 128 |
| `reviews` | array\|null | `[{author,rating,date,text}]` (when `includeReviews=true`) |
| `socialLinks` | object | `{facebook,instagram,linkedin,twitter,youtube}` |
| `logo` | string\|null | url |
| `photos` | string[] | `[url,...]` |
| `claimed` | boolean | true |
| `abnRegistered` | boolean\|null | true |
| `yearsInBusiness` | number\|null | 12 |
| `description` | string\|null | "Family-owned plumbing services since..." |
| `tagline` | string\|null | "Your trusted local plumber" |
| `isAd` | boolean | false |
| `yellowPagesId` | string | "12345678" |
| `profileUrl` | string | `https://www.yellowpages.com.au/.../acme-12345678` |
| `sourceUrl` | string | URL crawled |
| `searchTerm` | string | "plumber" |
| `searchLocation` | string | "Sydney, NSW" |
| `scrapedAt` | string | ISO 8601 timestamp |

### Pricing

This actor uses **pay-per-event** pricing — you only pay for results delivered.

| Event | Price | When charged |
|---|---|---|
| Actor Start | $0.00005 | Once per run (per 1 GB memory) |
| Business Listing | $0.001 | Per business record extracted |

**Cost examples:**
- 100 businesses = ~$0.10
- 1,000 businesses = ~$1.00
- 10,000 businesses = ~$10.00

Usage-based billing (compute + proxy passthrough) is also enabled for heavy users — see the Pricing tab for tier details.

### Proxy requirements

**AU residential proxies are required.** Yellow Pages Australia is fronted by Cloudflare and blocks datacenter IPs and non-AU residential ranges. The default proxy configuration uses Apify's `RESIDENTIAL` group with `countryCode: AU`.

For aggressive anti-bot environments, you can supply a custom premium residential proxy (Decodo, Bright Data, IPRoyal) via the proxy configuration input.

### Quick start

```bash
## Install Apify CLI
npm install -g apify-cli

## Clone and deploy
cd yellow-pages-au-scraper
npm install
apify login
apify push -f -w 120
````

### API usage

```bash
## Run via API
curl -X POST "https://api.apify.com/v2/acts/USERNAME~yellow-pages-au-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms":["dentist"],"locations":["Melbourne, VIC"],"maxResults":50}'
```

```javascript
// Node.js / Apify SDK
import { Actor } from 'apify';

const run = await Actor.call('USERNAME/yellow-pages-au-scraper', {
    searchTerms: ['dentist'],
    locations: ['Melbourne, VIC'],
    maxResults: 50,
    includeReviews: true,
    maxReviewsPerBusiness: 10,
});

const { items } = await Actor.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Tips

- **Start small**: set `maxResults: 10` to verify data quality before scaling
- **Reviews are slow**: enabling `includeReviews` roughly doubles runtime and cost — use only when needed
- **Large coverage**: split a big request across multiple suburbs/postcodes — a single search typically caps at ~1,000–2,000 results
- **Sort by rating**: set `sortBy: "rating"` to surface top-rated businesses first
- **Cross-join math**: 2 terms × 3 locations = 6 searches; results are merged and deduplicated by profile URL
- **ABN filtering**: use `abnRegistered` to identify registered Australian businesses for compliance workflows

### Limitations

- Yellow Pages AU itself caps results at roughly 50 pages per search term + location pair
- Reviews are capped at ~2,000 per business by Yellow Pages
- Email is only available when present on the business profile page (many YP AU listings do not show email)
- ABN detection is best-effort — `abnRegistered` is `null` when no ABN reference is found on the profile page

### Export & integrations

Export scraped data to JSON, CSV, or Excel from the Apify Console. Use webhooks or the Apify API to push results to HubSpot, Salesforce, Google Sheets, Airtable, or any HTTP endpoint. Schedule runs via the Apify Scheduler for ongoing monitoring.

***

Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.

### What is Yellow Pages Australia Scraper?

**Yellow Pages Australia Scraper** turns the target data into structured, reusable results on Apify. Use it when you need repeatable collection for sales teams, agencies, recruiters, market researchers, and data-enrichment workflows without maintaining a custom scraper or one-off integration. Run it manually, schedule recurring jobs, call it through the Apify API, or connect it to an AI agent through the Apify MCP server.

The Actor stores results in an Apify dataset, where they can be previewed and exported as JSON, CSV, Excel, XML, or RSS. Availability and completeness depend on the source, supplied inputs, public visibility, authentication requirements, and upstream rate limits.

### Use cases for Yellow Pages Australia Scraper

- Build structured datasets for research, reporting, enrichment, or monitoring.
- Automate repetitive collection with schedules, webhooks, and API calls.
- Feed clean records into spreadsheets, databases, CRMs, BI tools, AI agents, or RAG pipelines.
- Track changes over time by running the same validated input on a schedule.
- Replace fragile manual copy-and-paste work with a reproducible Apify workflow.

### How to use Yellow Pages Australia Scraper

1. Open the Actor input page and choose a focused, valid target.
2. Set a conservative result limit for the first run.
3. Start the Actor and inspect the dataset for coverage and field availability.
4. Export the results or connect the dataset to your downstream system.
5. Scale gradually and use scheduling, pagination, or proxies when supported.

#### Important input options

- `searchTerms` — 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 Lo
- `locations` — 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-
- `startUrls` — 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),
- `sortBy` — 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 r
- `includeReviews` — 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 additi
- `maxReviewsPerBusiness` — 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 revie
- `maxResults` — 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 sto
- `maxPagesPerSearch` — 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 ex

### API and automation example

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('muhammadafzal/yellow-pages-au-scraper').call({
  // Add the same input fields you use in the Apify Console.
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Related Apify Actors

Use these dedicated tools when a neighboring data source or workflow is a better match:

- [Leads Finder Pro - B2B Leads with Emails \[Apollo Alternative\]](https://apify.com/muhammadafzal/leads-finder-pro)
- [Yellow Pages US Scraper — Business Leads & Reviews](https://apify.com/muhammadafzal/yellow-pages-us-scraper)
- [California CSLB Contractor License Scraper](https://apify.com/muhammadafzal/cslb-california-scraper)
- [Instagram Followers & Following Scraper — With Cookies](https://apify.com/muhammadafzal/instagram-following-scraper)
- [OpenTable Restaurants, Ratings & Reviews Scraper](https://apify.com/muhammadafzal/opentable-scraper)
- [Etsy Scraper Pro — Products, Prices, Reviews & Shop Data](https://apify.com/muhammadafzal/etsy-scraper-pro)
- [YouTube Thumbnail Downloader](https://apify.com/muhammadafzal/youtube-thumbnail-downloader)
- [AllTrails Scraper — Hiking Trails, Reviews & GPS Data](https://apify.com/muhammadafzal/alltrails-scraper)
- [Email Validator — Syntax, MX & Risk Checks](https://apify.com/muhammadafzal/email-address-validator)
- [Google Play Reviews Scraper](https://apify.com/muhammadafzal/google-play-reviews-scraper)

### Frequently asked questions

#### How many results can I scrape with Yellow Pages Australia Scraper?

The practical total depends on the source, input limits, pagination, available records, run timeout, and upstream restrictions. Start with a small run, verify the output, and increase the limit gradually.

#### Can I integrate Yellow Pages Australia Scraper with other apps?

Yes. Use Apify integrations, webhooks, schedules, dataset exports, Make, Zapier, Google Sheets, cloud storage, or your own application.

#### Can I use Yellow Pages Australia Scraper with the Apify API?

Yes. Start runs with the Apify REST API or an official Apify client, then retrieve records from the run's default dataset. Keep your API token in a secret or environment variable.

#### Can I use Yellow Pages Australia Scraper through an MCP Server?

Yes. The Apify MCP server can expose the Actor to compatible AI clients and agents. Review the input and expected cost before allowing an autonomous workflow to run it at scale.

#### Do I need proxies?

It depends on the source and volume. Use the default configuration first. For larger or geographically sensitive jobs, select an appropriate proxy configuration only when the Actor supports it.

#### Is it legal to scrape this data?

Scraping rules vary by source, jurisdiction, data type, and intended use. Collect only data you are authorized to access, respect applicable terms and privacy laws, and avoid restricted or personal data misuse. This documentation is not legal advice.

#### Your feedback

If a field is missing, a source layout has changed, or you need a supported use case documented, open an issue on the Actor page with a reproducible input and run ID.

# Actor input Schema

## `searchTerms` (type: `array`):

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.

## `locations` (type: `array`):

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>.

## `startUrls` (type: `array`):

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.

## `sortBy` (type: `string`):

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.

## `includeReviews` (type: `boolean`):

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.

## `maxReviewsPerBusiness` (type: `integer`):

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.

## `maxResults` (type: `integer`):

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.

## `maxPagesPerSearch` (type: `integer`):

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.

## `proxyConfiguration` (type: `object`):

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).

## Actor input object example

```json
{
  "searchTerms": [
    "plumber"
  ],
  "locations": [
    "Sydney, NSW"
  ],
  "startUrls": [],
  "sortBy": "default",
  "includeReviews": false,
  "maxReviewsPerBusiness": 30,
  "maxResults": 10,
  "maxPagesPerSearch": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "AU"
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Link to the dataset containing all extracted Yellow Pages Australia business records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerms": [
        "plumber"
    ],
    "locations": [
        "Sydney, NSW"
    ],
    "startUrls": [],
    "sortBy": "default",
    "includeReviews": false,
    "maxReviewsPerBusiness": 30,
    "maxResults": 10,
    "maxPagesPerSearch": 5,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "AU"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/yellow-pages-au-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchTerms": ["plumber"],
    "locations": ["Sydney, NSW"],
    "startUrls": [],
    "sortBy": "default",
    "includeReviews": False,
    "maxReviewsPerBusiness": 30,
    "maxResults": 10,
    "maxPagesPerSearch": 5,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "AU",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/yellow-pages-au-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "plumber"
  ],
  "locations": [
    "Sydney, NSW"
  ],
  "startUrls": [],
  "sortBy": "default",
  "includeReviews": false,
  "maxReviewsPerBusiness": 30,
  "maxResults": 10,
  "maxPagesPerSearch": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "AU"
  }
}' |
apify call muhammadafzal/yellow-pages-au-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=muhammadafzal/yellow-pages-au-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
