Allrecipes Advanced Scraper avatar

Allrecipes Advanced Scraper

Try for free

3 days trial then $25.00/month - No credit card required now

View all Actors
Allrecipes Advanced Scraper

Allrecipes Advanced Scraper

epctex/allrecipes-advanced-scraper
Try for free

3 days trial then $25.00/month - No credit card required now

Advanced scraping on Allrecipes for data on millions of recipes, articles, galleries, and many more. Crawl Recipes and extract descriptions, images, steps, ingredients, nutrition, and all other properties. You can specify search terms, filters, mappings, and much more.

You can access the Allrecipes Advanced Scraper programmatically from your own JavaScript applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4// Replace the '<YOUR_API_TOKEN>' with your token
5const client = new ApifyClient({
6    token: '<YOUR_API_TOKEN>',
7});
8
9// Prepare Actor input
10const input = {
11    "search": "cucumber",
12    "startUrls": [
13        "https://www.allrecipes.com/cook/onewholesomemeal",
14        "https://www.allrecipes.com/cook/foodwisheswithchefjohn/collection/bookmarks_5e9f2dfb-c75b-8640-f3ff-7897a9ed3897",
15        "https://www.allrecipes.com/search/results/?search=cucumber",
16        "https://www.allrecipes.com/gallery/butter-rich-recipes/",
17        "https://www.allrecipes.com/author/melanie-fincher/",
18        "https://www.allrecipes.com/article/how-to-clean-air-fryer/",
19        "https://www.allrecipes.com/recipe/261911/chef-johns-croissants/"
20    ],
21    "maxItems": 20,
22    "endPage": 1,
23    "extendOutputFunction": ($) => { return {} },
24    "customMapFunction": (object) => { return {...object} },
25    "proxy": {
26        "useApifyProxy": true
27    }
28};
29
30// Run the Actor and wait for it to finish
31const run = await client.actor("epctex/allrecipes-advanced-scraper").call(input);
32
33// Fetch and print Actor results from the run's dataset (if any)
34console.log('Results from dataset');
35console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38    console.dir(item);
39});
40
41// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

Allrecipes Data Extractor API in JavaScript

The Apify API client for JavaScript is the official library that allows you to use Allrecipes Advanced Scraper API in JavaScript or TypeScript, providing convenience functions and automatic retries on errors.

Install the apify-client

npm install apify-client

Other API clients include:

Developer
Maintained by Community
Actor metrics
  • 3 monthly users
  • 1 star
  • 100.0% runs succeeded
  • Created in May 2022
  • Modified about 21 hours ago
Categories