How to Scrape Yellow Pages US Business Listings in Python (Phone, Address, Website)
YellowPages.com has no public API. Learn how to extract US local business names, phone numbers, addresses, websites, and categories by city and business type as structured JSON for sales prospecting and local research.
The actor referenced in this article. Pay only for results delivered.
YellowPages.com covers nearly every US local service business. With no public API, scraping is the standard approach for extracting structured lead data. Here is how to do it at scale.
Try it live: Yellow Pages Scraper, 12 Fields, Phone & Website Leads. Pay only for results delivered, no result no charge.
What each listing contains
- Business name and primary phone number
- Full address: street, city, state, and ZIP code
- Business categories
- Website URL (when listed)
- Years in business (when shown)
Common use cases
Sales prospecting. Build phone and email lists for plumbers, HVAC contractors, or dental practices in a target metro. Call or email directly from the export.
Franchise location mapping. Pull every listing for a brand across a state to map penetration and gaps.
Local market research. Count competitors in a category by ZIP code or city to inform location expansion decisions.
Directory building. Aggregate listings for a niche vertical (pet groomers, escape rooms, craft breweries) to power a specialized local directory.
Using the Apify actor
import apify_client
client = apify_client.ApifyClient('YOUR_APIFY_TOKEN')
run_input = {
"searchTerm": "plumbers",
"location": "Austin, TX",
"maxResults": 100,
}
run = client.actor('themineworks/yellowpages-us').call(run_input=run_input)
for biz in client.dataset(run['defaultDatasetId']).iterate_items():
print(f"{biz['name']}")
print(f" Phone: {biz.get('phone', 'N/A')}")
print(f" Address: {biz.get('address', 'N/A')}, {biz.get('city')}, {biz.get('state')} {biz.get('zip_code', '')}")
print(f" Website: {biz.get('website', 'N/A')}")
print(f" Years in business: {biz.get('years_in_business', 'N/A')}")
Building a phone outreach list
import csv
run_input = {
"searchTerm": "HVAC contractors",
"location": "Dallas, TX",
"maxResults": 500,
}
run = client.actor('themineworks/yellowpages-us').call(run_input=run_input)
results = list(client.dataset(run['defaultDatasetId']).iterate_items())
with_phone = [b for b in results if b.get('phone')]
with open('hvac_dallas.csv', 'w', newline='') as f:
writer = csv.DictWriter(f, fieldnames=['name', 'phone', 'address', 'city', 'state', 'zip_code', 'website'])
writer.writeheader()
for biz in with_phone:
writer.writerow({k: biz.get(k, '') for k in writer.fieldnames})
print(f"{len(with_phone)} businesses with phone numbers exported")
Multi-city search with deduplication
CITIES = ['Houston, TX', 'Dallas, TX', 'Austin, TX', 'San Antonio, TX', 'Fort Worth, TX']
TERM = 'electricians'
seen = set()
all_results = []
for city in CITIES:
run = client.actor('themineworks/yellowpages-us').call(
run_input={"searchTerm": TERM, "location": city, "maxResults": 200}
)
for biz in client.dataset(run['defaultDatasetId']).iterate_items():
key = (biz.get('name', '').lower(), biz.get('phone', ''))
if key not in seen:
seen.add(key)
all_results.append(biz)
print(f" {city}: {len(list(client.dataset(run['defaultDatasetId']).iterate_items()))} total")
print(f"Unique businesses across Texas: {len(all_results)}")
Filtering by years in business
Established businesses (10+ years) are often better credit risks and more stable customers:
established = [
b for b in results
if b.get('years_in_business') and int(b.get('years_in_business', 0)) >= 10
]
print(f"Established businesses (10+ years): {len(established)}")
for b in sorted(established, key=lambda x: int(x.get('years_in_business', 0)), reverse=True)[:10]:
print(f" {b['name']}: {b['years_in_business']} years | {b.get('phone', 'no phone')}")
Pricing
$0.002 per business returned. No charge on empty searches or failed runs.
Explore the scraper referenced in this article: inputs, outputs, and pricing, then run it on Apify.
Frequently asked questions
Does Yellow Pages have a public API? +
No. YellowPages.com does not offer a public API. All programmatic access requires scraping the site.
What fields does each business listing include? +
Business name, primary phone number, full address (street, city, state, ZIP), business categories, website URL, and years in business where listed.
Can I search nationally or only by city? +
Yellow Pages search requires a location. You can use broad locations like a state name, or run multiple searches across cities and deduplicate the results.
GitHub Repo Intelligence: Vet Any Dependency Before You Add It
Pull stars, forks, contributors, commit recency, latest release and full README for any public GitHub repo in one call. No token required, MCP-ready for agents doing dependency checks.
Bilibili Scraper: Video, Creator and Search Data in Python
Pull Bilibili videos by keyword, URL or creator ID: titles, view and like counts, duration, author stats. Plain HTTP, no cookies, no login required.
SEEK Jobs Scraper: Australian Job Listings in Python
How to pull SEEK.com.au job listings by keyword, location, work type and salary band in Python: title, company, salary range, apply link, no login or API key.