ASOS Data API: Extract Structured JSON in 2026
Tutorials

ASOS Data API: Extract Structured JSON in 2026

Learn how to extract structured JSON data from ASOS using AlterLab's Extract API. Get typed e-commerce fields like title, price, and SKU with minimal code.

H
Herald Blog Service
4 min read
9 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

Use AlterLab's Extract API to get structured JSON from ASOS product pages. Define a JSON schema for the fields you need (title, price, currency, SKU, availability), POST the URL and schema, and receive validated typed data—no HTML parsing required.

Why use ASOS data?

ASOS publishes rich product information that fuels several engineering workflows:

  • Training ML models: Historical price and availability data improve demand forecasting.
  • Analytics pipelines: Feed catalog updates into dashboards for inventory or trend analysis.
  • Competitive intelligence: Monitor competitor assortments and pricing changes at scale.

What data can you extract?

All publicly visible fields on ASOS product pages are accessible. Typical e-commerce data includes:

  • title: Product name as shown on the page.
  • price: Current sale price (string to preserve exact formatting).
  • currency: ISO currency code (e.g., GBP, USD).
  • sku: Stock‑keeping unit unique to the item.
  • availability: In‑stock status or pre‑order text.
  • rating: Aggregate review score when present.

These fields map directly to a JSON schema you provide, ensuring the output matches your expected types.

The extraction approach

Raw HTTP requests followed by HTML parsing break frequently due to:

  • Frequent frontend redesigns altering class names.
  • Anti‑bot mechanisms that serve challenges or empty responses.
  • JavaScript‑rendered content requiring headless browsers.

A data API like AlterLab abstracts these challenges. It handles proxy rotation, JavaScript rendering, and anti‑bot bypass, then applies a language model to extract only the fields you defined. You receive clean JSON, eliminating fragile selectors and constant maintenance.

Quick start with AlterLab Extract API

First, install the Python SDK (or use cURL directly). The quick start guide shows installation steps.

Python example

Python
import alterlab

client = alterlab.Client("YOUR_API_KEY")

schema = {
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "The product title"
    },
    "price": {
      "type": "string",
      "description": "Price string as displayed"
    },
    "currency": {
      "type": "string",
      "description": "ISO currency code"
    },
    "sku": {
      "type": "string",
      "description": "Stock keeping unit"
    },
    "availability": {
      "type": "string",
      "description": "In‑stock status"
    },
    "rating": {
      "type": "string",
      "description": "Average rating (e.g., '4.2')"
    }
  }
}

result = client.extract(
    url="https://www.asos.com/women/dresses/cat/?cid=2663",
    schema=schema,
)
print(result.data)

Line 5‑12 shows the schema definition; the call returns a typed JSON object matching those keys.

cURL example

Bash
curl -X POST https://api.alterlab.io/v1/extract \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.asos.com/men/jackets-coats/cat/?cid=2273",
    "schema": {
      "properties": {
        "title": {"type": "string"},
        "price": {"type": "string"},
        "currency": {"type": "string"},
        "sku": {"type": "string"}
      }
    }
  }'

The response body is a JSON object with the requested fields.

Batch/async usage (Python)

For high‑volume jobs, use asynchronous calls to stay within rate limits.

Python
import asyncio
import alterlab

async def extract_one(client, url, schema):
    return await client.extract_async(url=url, schema=schema)

async def main():
    client = alterlab.Client("YOUR_API_KEY")
    schema = {"type": "object", "properties": {"title": {"type": "string"}, "price": {"type": "string"}}}
    urls = [
        "https://www.asos.com/women/dresses/cat/?cid=2663",
        "https://www.asos.com/men/jackets-coats/cat/?cid=2273",
        # add more URLs as needed
    ]
    tasks = [extract_one(client, u, schema) for u in urls]
    results = await asyncio.gather(*tasks)
    for resp in results:
        print(resp.data)

if __name__ == "__main__":
    asyncio.run(main__)

This pattern lets you process hundreds of pages concurrently while respecting the platform’s rate limits.

Define your schema

The Extract API uses JSON Schema to validate output. Provide a schema that matches the data shape you expect; AlterLab ensures every returned object conforms. Example schema for a product:

JSON
{
  "type": "object",
  "properties": {
    "title": {"type": "string"},
    "price": {"type": "string"},
    "currency": {"type": "string"},
    "sku": {"type": "string"},
    "availability": {"type": "string"},
    "rating": {"type": "string"}
  },
  "required": ["title", "price", "currency"]
}

If a field cannot be found, its value will be null (or omitted if not required). This eliminates guesswork and downstream cleaning.

Handle pagination and scale

ASOS lists products across paginated category pages. To extract an entire catalog:

  1. Discover pagination: Extract the “next page” link from the schema or use a fixed pattern (?page=2, ?page=3).
  2. Batch requests: Group URLs into chunks of 50‑100 to avoid bursts.
  3. Rate limits: AlterLab’s pricing page details cost per extraction; stay under your budget by monitoring usage.
  4. Async jobs: Use the SDK’s async methods or webhook notifications for results when volume exceeds real‑time needs.

For continuous monitoring, combine extraction with AlterLab’s Scheduling feature to run the job nightly and push results via Webhooks to your data warehouse.

Key takeaways

  • Structured JSON from ASOS is achievable with a single API call when you define a clear schema.
  • AlterLab handles the complex parts: rendering, anti‑bot, and validation, letting you focus on the data model.
  • Cost is predictable and usage‑based; see the pricing page for exact rates.
  • Always verify that your extraction complies with ASOS’s robots.txt and terms of service.
99.2%Extraction Accuracy
1.4sAvg Response Time
100%Typed JSON Output
Try it yourself

Extract structured e-commerce data from ASOS

```
Share

Was this article helpful?

Frequently Asked Questions

ASOS does not provide a public API for arbitrary product data. AlterLab lets you extract publicly listed information as structured JSON without reverse‑engineering private endpoints.
You can extract any publicly visible e-commerce fields—title, price, currency, SKU, availability, rating—using a JSON schema that AlterLab validates and returns as typed output.
AlterLab charges per successful extraction, clamped between $0.001 and $0.50. With a registered BYOK key the LLM fee is $0.003; otherwise it's $0.01 per call. No minimums, credits never expire.