Yelp has millions of business listings with reviews, ratings, and contact info. Here's how to extract them.
Yelp Fusion API (Official — Free)
Yelp provides a free API with 5,000 calls/day:
const API_KEY = 'your-yelp-api-key';
async function searchYelp(term, location) {
const url = `https://api.yelp.com/v3/businesses/search?term=${encodeURIComponent(term)}&location=${encodeURIComponent(location)}&limit=50`;
const res = await fetch(url, {
headers: { 'Authorization': `Bearer ${API_KEY}` }
});
const data = await res.json();
return data.businesses.map(b => ({
name: b.name,
rating: b.rating,
reviewCount: b.review_count,
address: b.location.display_address.join(', '),
phone: b.display_phone,
categories: b.categories.map(c => c.title).join(', '),
url: b.url
}));
}
const restaurants = await searchYelp('pizza', 'New York');
console.table(restaurants);
Get Reviews
async function getReviews(businessId) {
const url = `https://api.yelp.com/v3/businesses/${businessId}/reviews?limit=3&sort_by=yelp_sort`;
const res = await fetch(url, {
headers: { 'Authorization': `Bearer ${API_KEY}` }
});
const data = await res.json();
return data.reviews.map(r => ({
rating: r.rating,
text: r.text,
date: r.time_created,
user: r.user.name
}));
}
API Limits
- Free tier: 5,000 API calls/day
- Returns up to 50 results per search
- Reviews endpoint returns up to 3 reviews per business
- For more reviews, need HTML scraping (with proper delays)
Use Cases
- Competitor analysis — compare ratings across businesses
- Location research — find business density in an area
- Review sentiment — what do customers complain about?
- Lead generation — find businesses in a specific category
- Market entry — research local competition before opening
Resources
Need Yelp or Google Maps data extracted? $20 flat rate. Email: Spinov001@gmail.com | Hire me
Top comments (0)