How to Scrape ASOS Data: Complete Guide for 2026
Tutorials

How to Scrape ASOS Data: Complete Guide for 2026

Learn how to scrape ASOS product data using Python and Node.js with AlterLab’s API. Covers anti‑bot handling, structured extraction, pricing, and best practices for 2026.

H
Herald Blog Service
5 min read
1 views

AlterLab handles this automaticallyscrape any URL with one API call. No infrastructure required.

Try it free

This guide covers extracting publicly accessible data. Always review a site's robots.txt and Terms of Service before scraping.

TL;DR

To scrape ASOS with AlterLab, send a request to the API using your preferred language (Python, Node.js, or cURL). For most product pages, start at Tier 1 and let the API auto‑escalate if needed. Use Cortex to extract typed JSON fields like title, price, and rating without writing CSS selectors. Respect robots.txt, limit request rates, and handle pagination responsibly.

Why collect e‑commerce data from ASOS?

ASOS hosts a constantly changing catalog of fashion items, making it a valuable source for:

  • Price monitoring: Track discounts and competitor pricing across categories.
  • Market research: Identify trending styles, brand performance, and inventory levels.
  • Data analysis: Feed product attributes into recommendation engines or trend forecasting models.

These use cases rely on fresh, structured data from publicly visible product listings and detail pages.

Technical challenges

E‑commerce sites like ASOS deploy common anti‑bot protections:

  • Rate limiting based on IP or request frequency.
  • Header validation (User‑Agent, Accept, Referer).
  • Lightweight JavaScript challenges or cookie checks.
  • Occasionally, CAPTCHAs on high‑traffic endpoints.

Raw HTTP requests often fail because the server returns a challenge page or blocks the IP. AlterLab’s Smart Rendering API abstracts this complexity: it rotates residential proxies, adjusts headers, and upgrades to a headless browser when JavaScript rendering is required. The service remains compliant—it interacts with the same public endpoints a regular browser would, just at scale.

Quick start with AlterLab API

See the Getting started guide for installation details. Below are ready‑to‑run examples that scrape a sample ASOS product page.

Python
import alterlab

client = alterlab.Client("YOUR_API_KEY")
response = client.scrape("https://www.asos.com/women/dresses/cat/?cid=2609")
print(response.text[:500])  # first 500 chars of HTML
JAVASCRIPT
import { AlterLab } from "alterlab";

const client = new AlterLab({ apiKey: "YOUR_API_KEY" });
const response = await client.scrape("https://www.asos.com/women/dresses/cat/?cid=2609");
console.log(response.text.substring(0, 500));
Bash
curl -X POST https://api.alterlab.io/v1/scrape \
  -H "X-API-Key: YOUR_KEY" \
  -d '{"url": "https://www.asos.com/women/dresses/cat/?cid=2609"}'

These snippets return the raw HTML of the page. AlterLab automatically selects the lowest tier that succeeds—typically T1 or T2 for ASOS category pages—and promotes to T3 if a lightweight challenge appears.

Extracting structured data

Once you have the HTML, you can parse it with libraries like BeautifulSoup (Python) or cheerio (Node.js). Example using Python:

Python
from bs4 import BeautifulSoup
import alterlab

client = alterlab.Client("YOUR_API_KEY")
html = client.scrape("https://www.asos.com/product/12345678").text
soup = BeautifulSoup(html, "html.parser")

title = soup.select_one("h1[data-auto-id='product-title']").get_text(strip=True)
price = soup.select_one("span[data-auto-id='product-price']").get_text(strip=True)
rating = soup.select_one("span[data-auto-id='review-average']").get_text(strip=True)

print({"title": title, "price": price, "rating": rating})

Node.js equivalent:

JAVASCRIPT
import { AlterLab } from "alterlab";
import cheerio from "cheerio";

const client = new AlterLab({ apiKey: "YOUR_API_KEY" });
const html = await client.scrape("https://www.asos.com/product/12345678");
const $ = cheerio.load(html);

const title = $("h1[data-auto-id='product-title']").text().trim();
const price = $("span[data-auto-id='product-price']").text().trim();
const rating = $("span[data-auto-id='review-average']").text().trim();

console.log({ title, price, rating });

These selectors target publicly visible data points on ASOS product pages: product title, sale price, and average rating. Adjust the CSS paths if the page layout changes.

Structured JSON extraction with Cortex

For a more robust solution, use AlterLab’s Cortex extraction API to request typed JSON directly. This eliminates the need for custom parsing and handles page variations automatically.

Python
import alterlab

client = alterlab.Client("YOUR_API_KEY")
result = client.extract(
    url="https://www.asos.com/product/12345678",
    schema={
        "type": "object",
        "properties": {
            "title": {"type": "string"},
            "price": {"type": "number"},
            "rating": {"type": "number"},
            "description": {"type": "string"},
            "available_sizes": {"type": "array", "items": {"type": "string"}}
        },
        "required": ["title", "price"]
    }
)
print(result.data)  # Typed JSON output

Cortex returns a validated JSON object matching the schema. If the page lacks a field, the API returns null for that key, simplifying downstream processing.

Cost breakdown

AlterLab’s pricing is usage‑based, with automatic tier escalation. You only pay for the tier that successfully returns the data.

TierUse CaseCost per RequestCost per 1,000Requests per $1
T1 — CurlStatic HTML, no JS needed$0.0002$0.205,000
T2 — HTTPStandard pages with headers$0.0003$0.303,333
T3 — StealthProtected pages, anti-bot active$0.002$2.00500
T4 — BrowserFull JS rendering required$0.004$4.00250
T5 — CAPTCHACAPTCHA solving + JS rendering$0.02$20.0050

For ASOS, most category and product pages succeed at T1 or T2. If a page presents a JavaScript challenge, the API may promote to T3. Note: AlterLab auto‑escalates tiers — start at T1 and the API promotes automatically if a lower tier fails. You only pay for the tier that succeeds.

See the full pricing details at AlterLab pricing.

99.2%Success Rate
1.2sAvg Response
$0.002Per Request (T3)

Best practices

  • Rate limiting: Even with AlterLab’s proxy pool, keep a reasonable request rate (e.g., 2‑5 requests per second per IP) to avoid triggering anti‑bot thresholds.
  • robots.txt: Check https://www.asos.com/robots.txt for any disallowed paths. Though AlterLab accesses public pages, respecting the file demonstrates good faith.
  • Headers: AlterLab sends a realistic browser‑like User‑Agent. Do not override it with a bot‑identifying string unless necessary.
  • Error handling: Retry failed requests with exponential backoff. Treat HTTP 429 or 403 as signals to slow down.
  • Data freshness: For price monitoring, schedule scrapes during off‑peak hours when site traffic is lower, reducing the chance of encountering challenges.

Scaling up

When you need to scrape thousands of ASOS pages:

  • Batch requests: Use the API’s /v1/scrape/batch endpoint to send up to 100 URLs per HTTP call, reducing connection overhead.
  • Scheduling: Leverage AlterLab’s Cron‑based scheduling to run recurring scrapes (e.g., every 6 hours) and store results in your data warehouse.
  • Handling large datasets: Stream responses to disk or a database instead of loading all HTML into memory. For structured extraction, request JSON output and append each record as it arrives.
  • Responsible scaling: Monitor your API spend via the dashboard and set daily budget alerts. Adjust concurrency based on the observed success rate and cost per request.
Share

Was this article helpful?

Frequently Asked Questions

Scraping publicly accessible data is generally permissible under rulings like hiQ v LinkedIn, but you must review ASOS’s robots.txt and Terms of Service, apply rate limiting, and avoid private or login‑gated information.
ASOS employs standard anti‑bot measures such as request rate limits, header checks, and occasional JavaScript challenges. AlterLab’s Smart Rendering API automatically handles proxy rotation, header management, and browser rendering to maintain compliant access.
Costs range from $0.0002 per request for static HTML (T1) up to $0.004 for full JS rendering (T4). AlterLab auto‑escalates tiers, so you only pay for the level that succeeds, making large‑scale scraping predictable and efficient.