🌱 Vegan Places Finder avatar

🌱 Vegan Places Finder

Try for free

No credit card required

View all Actors
🌱 Vegan Places Finder

🌱 Vegan Places Finder

natasha.lekh/vegan-places-finder
Try for free

No credit card required

🌱 This no-code extraction tool will find all vegan restaurants on Google Maps and extract their details. Just enter the country and city of your search, e.g. Chicago, USA, and hit Start. Easy scraping of map data from the web for beginners.

Do you want to learn more about this Actor?

Get a demo
UZ

How to use with html and js

Closed

user-ZPSCZzPyw6nbSxRkp opened this issue
a year ago

Hi! I would love to try your api, but im using simple html css and js for my website, how can i fetch data from this api using just js?

lukaskrivka avatar

Hi Natasha,

Yes, you can use this API with our JS client or API. See the API tab on the top right with example

import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with API token const client = new ApifyClient({ token: '<YOUR_API_TOKEN>', });

// Prepare Actor input const input = { "countryCode": "us", "city": "Pittsburg", "maxCrawledPlacesPerSearch": 10 };

(async () => { // Run the Actor and wait for it to finish const run = await client.actor("mPSyG35Lffj5ybtgz/hh5GL7s6JL3wgmn1G").call(input);

1// Fetch and print actor results from the run's dataset (if any)
2console.log('Results from dataset');
3const { items } = await client.dataset(run.defaultDatasetId).listItems();
4items.forEach((item) => {
5    console.dir(item);
6});

})();

Developer
Maintained by Apify
Actor metrics
  • 4 monthly users
  • 5 stars
  • 99.7% runs succeeded
  • Created in Sep 2022
  • Modified about 4 hours ago
Categories