Allrecipes Advanced Scraper

  • epctex/allrecipes-advanced-scraper
  • Modified
  • Users 54
  • Runs 2.3k
  • Created by Author's avatarepctex

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.

Free trial for 3 days

Then $35.00/month

No credit card required now

Allrecipes Advanced Scraper

Free trial for 3 days

Then $35.00/month

To run the code examples, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token. For a more detailed explanation, please read about running Actors via the API in Apify Docs.

import { ApifyClient } from 'apify-client';

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

// Prepare Actor input
const input = {
    "search": "cucumber",
    "startUrls": [
        "https://www.allrecipes.com/cook/onewholesomemeal",
        "https://www.allrecipes.com/cook/foodwisheswithchefjohn/collection/bookmarks_5e9f2dfb-c75b-8640-f3ff-7897a9ed3897",
        "https://www.allrecipes.com/search/results/?search=cucumber",
        "https://www.allrecipes.com/gallery/butter-rich-recipes/",
        "https://www.allrecipes.com/author/melanie-fincher/",
        "https://www.allrecipes.com/article/how-to-clean-air-fryer/",
        "https://www.allrecipes.com/recipe/261911/chef-johns-croissants/"
    ],
    "maxItems": 20,
    "endPage": 1,
    "extendOutputFunction": ($) => { return {} },
    "customMapFunction": (object) => { return {...object} },
    "proxy": {
        "useApifyProxy": true
    }
};

(async () => {
    // Run the Actor and wait for it to finish
    const run = await client.actor("epctex/allrecipes-advanced-scraper").call(input);

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