Skip to content

How to Scrape Prices From Websites With an API

Marius Memu
Marius Memu
Senior Editor
⏱️7 min read
How to Scrape Prices From Websites With an API

Scrape prices from websites without building or maintaining your own scrapers: the steps, five scraping APIs and how each one charges.

To scrape prices from websites without building your own scrapers, send each product link or search term to a scraping API and read the price from the response. The provider runs the proxies, the headless browsers and the anti-bot handling, and you pay per result, per credit or per request.

What is price scraping?

Price scraping means collecting price data straight from web pages with software. People use it for market research, price tracking and competitor analysis.

You can write the scraper yourself, but Apify's Python tutorial notes that the selectors need tweaks for other sites and that a home-made scraper still lacks automated runs and storage.

How to scrape prices from websites with an API, step by step

  1. List the products, sites and fields. Apify's E-commerce Scraping Tool calls product detail URLs its most accurate input and the one for price tracking lists, while category URLs suit discovery. Then pick the fields: besides price and currency, that tool can return stock status, product IDs such as SKU or GTIN, shipping information, the seller and product variants.

  2. Read each site's terms first. Amazon's Conditions of Use, for example, say the license to use the site does not cover collecting and using product listings, descriptions or prices, or using data mining, robots or similar extraction tools. A robots.txt file is not permission either: the standard describes its rules as requests that crawlers are asked to honor, not as access authorization.

  3. Pick the kind of tool. A ready-made scraper takes product or category URLs and returns a dataset. A marketplace endpoint returns clean JSON for a named site such as Amazon or Walmart. A general scraping API fetches any URL through proxies and headless browsers, and you pull the price out with CSS or XPath rules or automatic extraction.

  4. Send one test request. With Apify, copy the API token from your account settings and send it in the Authorization header. POST a JSON body with your product links under detailsUrls to the E-commerce Scraping Tool's run-sync-get-dataset-items endpoint: the body becomes the scraper's input, and the response contains the dataset items, with price and currency fields for each product. A run longer than 300 seconds returns a timeout on that endpoint, so keep the test small. Compare each returned price with the page in your browser.

  5. Store each price as a dated observation. The tool captures only what is visible at the time of the run, so price history is something you build by scheduling runs and storing each result. Save the currency with the amount: Apify's sample output shows amazon.com products priced in CAD and BRL. Save a missing price as missing, not as zero; the same sample includes a product whose price is null.

  6. Schedule the runs and estimate the bill. Multiply products by checks per month, then by the cost of one result or page. That is from $1.00 per 1,000 product details on the Apify tool; on Zenrows, a protected page costs 25 credits and a standard page 1.

Price scraping API tools and how they charge

The figures below come from each vendor's pricing page; plans change, so confirm them before you buy.

Tool

What it does

Pricing model

Entry price

Apify

Marketplace of ready-made scrapers (Actors), with an E-commerce Scraping Tool

Monthly plan with prepaid usage, then pay as you go

Free with $5 of usage; Starter $19 a month

ScraperAPI

General scraping API, JSON endpoints for Amazon, Google and Walmart

Monthly API credits

Hobby $49 a month, 100,000 credits

ScrapingBee

Scraping API with headless browsers and proxies, Amazon and Walmart APIs

Monthly API credits

Hobby $19 a month, 75,000 credits

Zenrows

Fetch, extract, crawl, batch and browser on one balance

Monthly credits, charged on successful requests

Free 5,000 credits a month; Build $19 billed monthly

EveryInfra

Data APIs for 106 platforms, web search, CAPTCHA solving

Pay per request from a prepaid balance

From $0.56 per 1,000 requests

1. Apify

Apify is a marketplace of ready-made scrapers called Actors, and every Actor can be started through the Apify API. Its E-commerce Scraping Tool extracts product and price data from marketplaces including Amazon, Walmart and eBay, and from regional and local shops, using only a product or category URL. It bills per event, from $1.00 per 1,000 product details. The Free plan includes $5 of usage, and Starter costs $19 a month plus pay as you go. It suits people who want one finished scraper for many shops.

2. ScraperAPI

ScraperAPI is a general scraping API with structured endpoints that return JSON from Amazon, Google, Walmart and other sites. Plans are monthly credit bundles, starting with Hobby at $49 a month for 100,000 credits. A standard page costs 1 credit, Amazon costs 5, and bypassing bot protection adds 10 credits per request. The trial runs 7 days with 5,000 credits. It suits steady monthly volumes across many different sites.

3. ScrapingBee

ScrapingBee handles headless browsers and rotating proxies behind one API, and has dedicated Amazon and Walmart APIs. The Hobby plan is $19 a month for 75,000 credits. Requests start at 1 credit, JavaScript rendering costs 5, and premium proxies cost 10 or 25. A trial gives 1,000 free credits. It suits smaller projects on shops that load prices with JavaScript.

4. Zenrows

Zenrows puts fetch, extract, crawl, batch and browser tools on one credit balance; Extract returns auto-detected JSON with no selectors to write. Only successful requests are charged. The free plan has 5,000 credits a month, and Build costs $19 billed monthly, or $16 a month on annual billing, for 45,000 credits. It suits sites whose protection you cannot predict: an adaptive mode bills only the setup that worked.

5. EveryInfra

EveryInfra sells pay-per-use data APIs for 106 platforms, plus web search and CAPTCHA solving. Its Amazon product details action returns title, brand, price and stock status from a product link at $1.39 per 1,000 requests. There is no subscription: you top up a balance in US dollars and pay per call, and failed calls and empty results are not charged. It suits small or irregular volumes. More on our EveryInfra page.

More tools of this kind are listed under proxy and scraping services and SaaS and business software.

What to check before paying for a web scraping API

  • The billing unit. Apify Actors bill per event, per usage or both, the credit plans bill credits that vary by page type, and EveryInfra bills per request.

  • The cost of your target sites. A standard page is the cheapest case; on ScraperAPI, Google costs 25 credits, and a ScrapingBee Amazon call costs 5.

  • Failed requests. Ask what a failure costs and what counts as one: Zenrows treats a 404 as a successful request.

  • Unused volume. ScrapingBee's and ScraperAPI's monthly credits do not carry over.

  • Speed limits. ScraperAPI's Hobby plan allows 20 concurrent threads, ScrapingBee's 25 concurrent requests.

  • A spending cap. ScraperAPI lets you set a maximum cost per scrape, and Apify's tool has a maximum number of products per run.

Then test small. Run 20 to 50 of your real product links, including the hardest site, on a free plan or trial. Apify's own advice: a test run is the easiest way to find out what a scraper uses. Check each returned price by hand and note what one page really cost.

Common mistakes when scraping prices

  • Tracking only category pages. Apify's guide warns that category pages can miss updates to important products, while product detail pages give precise tracking.

  • Reading the wrong price field. ScrapingBee's Amazon API, for example, returns the price, the shipping price and the strikethrough price as separate fields. Store the one you compare, with the shipping next to it.

  • Mixing sellers. One product can have several merchants, each with its own price, so decide which one you track.

  • Skipping JavaScript rendering. Apify's lightweight HTTP mode is faster but may miss JavaScript-loaded content, so check that the price is really in the response.

  • Calling a sample the lowest price. Each run records only what was visible at that moment. Label it the observed lowest price.

Frequently asked questions

It depends on the site, the data and your local law; this is not legal advice. Apify's guide says scraping public prices is legal in many cases, but tells readers to review a site's robots.txt and legal policies first. Some terms restrict it: Amazon's exclude collecting product listings and prices, and using robots or similar tools. Apify's e-commerce tool extracts only publicly available data, nothing that requires a login.

How do you scrape prices without getting blocked?

Use a tool that does the unblocking for you. Apify's e-commerce tool has built-in proxy rotation, and ScraperAPI includes rotating proxy pools, CAPTCHA and anti-bot detection and automatic retries in every plan. Zenrows explains that a protected page blocks automated traffic, so the request needs JavaScript rendering and premium proxies together.

Can you scrape prices from websites for free?

For a test, yes. Apify's free plan includes $5 of usage, Zenrows' free plan has 5,000 credits a month, ScrapingBee gives 1,000 trial credits and ScraperAPI's trial has 5,000. Whether that covers regular monitoring depends on your product count, how often you check, and what each page costs.

How often should you scrape prices?

It depends on your market. Apify suggests hourly runs for fast-moving categories, daily runs for most uses and weekly runs for stable catalogs. A run only captures what is visible at that moment, so short dips between two runs go unseen.


Marius Memu

About Marius Memu

Marius is the Lead Architect and senior editor of CouponSwift. He has 15 years of experience in web hosting, SEO and software deals, and oversees the verification process and editorial standards behind every store page. Graduate of the Romanian-American University, Bucharest.

View all articles →