```yaml
product: AlterLab
title: Shopee Data API: Extract Structured JSON in 2026
category: Tutorials
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
last_updated: 2026-08-03
canonical_facts:
  - "Learn how to retrieve structured Shopee data via API using AlterLab’s Extract API. Get clean JSON with price, title, sku and more in 2026."
source_url: https://alterlab.io/blog/shopee-data-api-extract-structured-json-in-2026
```

## TL;DR
You can retrieve structured Shopee data as typed JSON by posting a URL and schema to AlterLab’s Extract API. The service validates output, handles anti‑bot bypass, and returns a predictable JSON payload ready for pipelines.

---

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

## Why use Shopee data?
E‑commerce teams need fresh product information for multiple purposes. Common use cases include:

- Training machine‑learning models on real‑time pricing trends.
- Building competitive intelligence dashboards that monitor competitor catalogs.
- Feeding analytics pipelines that aggregate inventory levels across categories.

Because the data is publicly listed, it can be collected without authentication, but the volume and variability of Shopee’s pages make a reliable extraction method essential.

## What data can you extract?
Shopee exposes several fields that are safe to scrape when they appear in the public product card. Typical fields include:

- **title** – the human‑readable product name.
- **price** – the numeric price value.
- **currency** – the three‑letter currency code (e.g., USD, SGD).
- **sku** – the stock‑keeping unit identifier used by Shopee.
- **availability** – stock status such as "In stock" or "Out of stock".
- **rating** – average customer rating, often shown as a star count.

All of these appear in the HTML of a product detail page and are safe to collect as long as you respect Shopee’s robots.txt and rate limits.

## The extraction approach
Raw HTTP requests followed by CSS selectors are fragile. Site redesigns, dynamic JavaScript rendering, and anti‑bot defenses can break a scraper overnight. A modern **data API** solves these problems by:

1. Providing a stable endpoint that abstracts away HTTP details.
2. Offering automatic anti‑bot bypass and rotating proxies.
3. Returning validated, typed JSON instead of raw HTML.

With a data API you spend time building logic for your application, not debugging HTML changes.

## Quick start with AlterLab Extract API
AlterLab lets you call `/v1/extract` to receive structured data in a single request. Below are minimal examples in Python and cURL.

```python title="extract_shopee-com.py" {5-12}
import alterlab

client = alterlab.Client("YOUR_API_KEY")

schema = {
  "type": "object",
  "properties": {
    "title": {"type": "string", "description": "The title field"},
    "price": {"type": "string", "description": "The price field"},
    "currency": {"type": "string", "description": "The currency field"},
    "sku": {"type": "string", "description": "The sku field"},
    "availability": {"type": "string", "description": "The availability field"},
    "rating": {"type": "string", "description": "The rating field"}
  }
}

result = client.extract(
    url="https://shopee.com/example-page",
    schema=schema,
)
print(result.data)
```

```bash title="Terminal"
curl -X POST https://api.alterlab.io/v1/extract \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://shopee.com/example-page",
    "schema": {"properties": {"title": {"type": "string"}, "price": {"type": "string"}, "currency": {"type": "string"}}}
  }'
```

The response body is a JSON object that matches the schema you supplied, eliminating the need for post‑processing. For full documentation see the [Extract API reference](/docs/api/extract). Beginners can follow the [Getting started guide](/docs/quickstart/installation) to install the SDK and set up API keys.

### Batch and async usage
When you need to harvest hundreds of product pages, sending requests sequentially hits rate limits. AlterLab supports asynchronous batches:

```python title="batch_async.py" {1-6}
import asyncio
import alterlab

async def extract_product(url):
    schema = {"properties": {"title": {"type": "string"}, "price": {"type": "string"}}}
    return await alterlab.Client("YOUR_API_KEY").extract(url=url, schema=schema)

async def main():
    urls = ["https://shopee.com/p/123", "https://shopee.com/p/456", "https://shopee.com/p/789"]
    tasks = [extract_product(u) for u in urls]
    results = await asyncio.gather(*tasks)
    for r in results:
        print(r.data)

asyncio.run(main())
```

This pattern scales horizontally, respects built‑in throttling, and lets you process results as they arrive.

## Define your schema
The schema is a JSON object that describes the fields you expect. AlterLab validates the extracted payload against this schema and returns only the fields you declared. Here’s a concise example for a Shopee product:

```json title="schema_example.json"
{
  "title": {"type": "string"},
  "price": {"type": "string"},
  "currency": {"type": "string"},
  "sku": {"type": "string"},
  "availability": {"type": "string"},
  "rating": {"type": "string"}
}
```

When you submit this schema, the API guarantees that the `data` field in the response contains exactly those keys with correctly typed values. This eliminates manual parsing and reduces errors in downstream pipelines.

## Handle pagination and scale
Sho

## Frequently Asked Questions

### Is there an official Shopee data API?

Shopee does not provide a public data API for all product fields; AlterLab fills the gap by offering compliant, structured JSON extraction of publicly listed information.

### What Shopee data can I extract with AlterLab?

You can extract publicly available fields such as title, price, currency, sku, availability and rating through a typed JSON schema.

### How much does Shopee data extraction cost?

Cost starts at $0.001 per request, scales with volume, and is billed per use with no minimums or expiring credits.

## Related

- [Building Scalable RAG Pipelines: Reducing LLM Token Waste with Markdown Extraction and Structured JSON](<https://alterlab.io/blog/building-scalable-rag-pipelines-reducing-llm-token-waste-with-markdown-extraction-and-structured-json>)
- [Rakuten Data API: Extract Structured JSON in 2026](<https://alterlab.io/blog/rakuten-data-api-extract-structured-json-in-2026>)
- [Crozdesk Data API: Extract Structured JSON in 2026](<https://alterlab.io/blog/crozdesk-data-api-extract-structured-json-in-2026>)