Walmart Data Extractor

  • epctex/walmart-scraper
  • Modified
  • Users 330
  • Runs 4.4k
  • Created by Author's avatarepctex

Access a vast array of product data from Walmart with our Walmart Scraper. Extract images, brand details, prices, variations, and more. Customize your search with filters, categories, and lists to gather the information you need.

Free trial for 3 days

Then $30.00/month

No credit card required now

Walmart Data Extractor

Free trial for 3 days

Then $30.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.

from apify_client import ApifyClient

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

# Prepare the Actor input
run_input = {
    "startUrls": [
        { "url": "https://www.walmart.com/browse/auto-tires/brake-pads/91083_1074765_9038935_4582920" },
        { "url": "https://www.walmart.com/browse/home/" },
        { "url": "https://www.walmart.com/search?grid=true&query=Mixed+Bouquets" },
        { "url": "https://www.walmart.com/ip/Mainstays-Blue-Sunflower-Mix-Bouquet/155345382" },
    ],
    "maxItems": 50,
    "endPage": 1,
    "extendOutputFunction": """($) => {
    const result = {};
    // Uncomment to add a title to the output
    // result.title = $('title').text().trim();

    return result;
}""",
    "outputFilterFunction": "(object) => ({...object})",
    "proxy": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("epctex/walmart-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)