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 per result delivered. Failed and empty results are never charged.
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. Failed and empty results are never charged.
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.
How to Scrape JustDial Business Listings in Python (Phone, Address, Ratings)
JustDial is India's largest local business directory with no public API. Learn how to extract business names, phone numbers, addresses, geo-coordinates, and review data by city and category as structured JSON.
How to Scrape IndiaMART B2B Suppliers in Python (Phone, Price, Leads)
IndiaMART is India's largest B2B marketplace with no public API. Learn how to extract supplier names, phone numbers, cities, product categories, and price indications as structured JSON for sales prospecting and market research.
Airbnb Scraper: Listing Prices, Ratings, and Availability Without the API
Airbnb has no public listings API. Here's how to pull nightly price, rating, superhost status and coordinates from Airbnb search results using Python.
Realtor.com Scraper: Property and Agent Data Without the MLS Paywall
Scrape Realtor.com listings in Python: price, beds, baths, county, and the listing agent + brokerage office on every record. No login, no API key.