Build a lead list for a city
Search a category neighbourhood by neighbourhood and every result already carries its phone, website, rating and opening hours — no second call per business. Duplicates across neighbourhoods collapse on the place_id.
GET google-maps/places | × 5 | 15 cr |
| per run, up to 100 businesses | 15 cr |
≈ $0.009 at the 250k pack
const API = 'https://api.scrapefield.com/v1';
const sf = (path, q) =>
fetch(API + '/' + path + '?' + new URLSearchParams(q), {
headers: { Authorization: 'Bearer ' + process.env.SCRAPEFIELD_KEY },
}).then((r) => r.json());
const areas = ['Alfama', 'Baixa', 'Chiado', 'Estrela', 'Belém'];
const leads = new Map();
for (const area of areas) {
const query = 'coffee shops in ' + area + ', Lisbon';
const { data } = await sf('google-maps/places', { query, limit: 20 });
for (const p of data) {
leads.set(p.place_id, {
name: p.name,
phone: p.international_phone_number,
website: p.website,
rating: p.rating,
reviews: p.user_ratings_total,
});
}
}
console.table([...leads.values()]);