Allrecipes Advanced Scraper

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

Allrecipes Advanced Scraper

Allrecipes Advanced Scraper

epctex/allrecipes-advanced-scraper

3 days trial then $35.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.

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn mode

from apify_client import ApifyClient

# Initialize the ApifyClient with your API token
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_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 },
}

# Run the Actor and wait for it to finish
run = client.actor("epctex/allrecipes-advanced-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
Developer
Maintained by Community
Actor stats
  • 55 users
  • 2.7k runs
  • Modified about 6 hours ago
Categories

You might also like these Actors