How to fetch
- If a HasData tool is connected, call the one in the table. Read its schema. Do not run a shell command, and skip the CLI fallback, while that tool exists.
- If no HasData tool is connected, ask the user to press Connect. In Claude Code, authenticate with
/mcp. Do not install a binary and do not ask for an API key.
- The CLI fallback is only when the connector cannot be connected and
hasdata is already on PATH.
| Ask | Tool name contains | Pass |
|---|
| Yelp search | yelp_search | keyword and location |
| One Yelp place | yelp_place | placeId from the search |
| Yelp reviews | yelp_reviews | placeId |
| YellowPages search | yellowpages_search | keyword and location |
| One YellowPages place | yellowpages_place | url |
A Google Maps phone or address is hasdata-maps. A lead list from both Maps and YellowPages is the leads command. Do not invent a phone.
Search and place profiles for Yelp and YellowPages.
When to use
- User explicitly mentions Yelp or YellowPages
- User wants a non-Google directory (Google Maps → use hasdata-maps)
- User wants lead lists of a service category in a city (plumbers, lawyers, dentists, etc.)
- User wants Yelp reviews / ratings for a known place
APIs in this group
| Command | Purpose | Cost |
|---|
yelp-search | Yelp search by keyword + location | 5 |
yelp-place | Full Yelp place profile (by Yelp ID or alias) | 5 |
yellowpages-search | YellowPages search by keyword + location | 5 |
yellowpages-place | Full YellowPages place profile (by URL) | 5 |
CLI fallback
Only when the connector cannot be connected and hasdata is already on PATH. Otherwise ignore this section.
Yelp
# Search
hasdata yelp-search --keyword "ramen" --location "Brooklyn, NY" --pretty -o .hasdata/yelp-ramen.json
# Different country
hasdata yelp-search --keyword "fish and chips" --location "London" --domain www.yelp.co.uk --pretty -o .hasdata/yelp-uk.json
# Map area filter (lat/lng bounding box)
hasdata yelp-search --keyword "tacos" --location "Houston, TX" \
--l "g:-95.2486,29.8496,-95.4277,29.6324" --pretty -o .hasdata/yelp-tacos.json
# Full place profile (use Yelp alias or Yelp ID)
hasdata yelp-place --place-id "mcdonalds-new-york-386" --pretty -o .hasdata/yelp-place.json
hasdata yelp-place --place-id "jPIZ3FR5LNcwPuUHi2Fe4g" --pretty -o .hasdata/yelp-place-by-id.json
YellowPages
# Search
hasdata yellowpages-search --keyword "Plumbers" --location "New York, NY" --pretty -o .hasdata/yp-plumbers.json
# Sort by rating
hasdata yellowpages-search --keyword "Lawyers" --location "Austin, TX" --sort averageRating --pretty -o .hasdata/yp-lawyers.json
# Canada
hasdata yellowpages-search --keyword "Dentists" --location "Toronto, ON" --domain www.yellowpages.ca --pretty -o .hasdata/yp-dentists-ca.json
# Full place profile by URL
hasdata yellowpages-place --url "https://www.yellowpages.com/kings-county-ny/mip/aladdin-plumbing-corp-548289617" --pretty -o .hasdata/yp-place.json
Common flags
Yelp
| Flag | Purpose |
|---|
--keyword | Required — query (e.g., "sushi") |
--location | Required — "City, ST" |
--start <n> | Pagination offset (multiples of 10) |
--l <bbox> | Map area: g:lng1,lat1,lng2,lat2 |
--domain | Yelp domain (40+ supported) |
YellowPages
| Flag | Purpose |
|---|
--keyword | Required — category (e.g., "Electricians") |
--location | Required — "City, ST" |
--sort | default, distance, averageRating, name |
--page <n> | Pagination |
--domain | www.yellowpages.com or www.yellowpages.ca |
Tips
- Lead lists — search → place fan-out gets you full contact info per business:
hasdata yellowpages-search --keyword "Plumbers" --location "Brooklyn, NY" --pretty -o .hasdata/plumbers.json
for url in $(jq -r '.places[].url' .hasdata/plumbers.json | head -20); do
hasdata yellowpages-place --url "$url" --pretty -o ".hasdata/plumber-$(basename $url).json" &
done
wait
- Yelp aliases (e.g.
mcdonalds-new-york-386) are stable and human-readable; Yelp IDs are opaque. Either works in --place-id.
- For Google's local business data, use hasdata-maps — it's typically more comprehensive than Yelp for large markets.
- YellowPages is best for service trades (plumbers, electricians, contractors) — it has stronger contact-info coverage.
Working with results
# Yelp search → name, rating, phone, address
jq -r '.places[] | "\(.title)\t\(.rating)★\t\(.phone // "n/a")\t\(.address // "n/a")"' .hasdata/yelp.json
# YellowPages → name, phone, address, rating
jq -r '.places[] | "\(.title)\t\(.phone // "n/a")\t\(.address // "n/a")\t\(.rating // "n/a")"' .hasdata/yp.json
# Filter for high-rated only
jq '.places[] | select((.rating // 0) >= 4.5)' .hasdata/yp.json
See also
- hasdata-maps — Google Maps for the same kind of local data, often more comprehensive
- hasdata-search —
google-serp for general business research