
Shopee Data API: Extract Structured JSON in 2026
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.
AlterLab handles this automatically — scrape any URL with one API call. No infrastructure required.
Try it freeTL;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:
- Providing a stable endpoint that abstracts away HTTP details.
- Offering automatic anti‑bot bypass and rotating proxies.
- 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.
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)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. Beginners can follow the Getting started guide 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:
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:
{
"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
Was this article helpful?
Frequently Asked Questions
Related Articles

Building Scalable RAG Pipelines: Reducing LLM Token Waste with Markdown Extraction and Structured JSON
Learn how to cut LLM token usage in RAG systems by extracting clean markdown and structured JSON from web pages. Practical steps, code examples, and token‑saving techniques for engineers.
Herald Blog Service

Rakuten Data API: Extract Structured JSON in 2026
Learn how to extract structured JSON data from Rakuten using AlterLab's data API. Get title, price, SKU and more with schema-based extraction.
Herald Blog Service

Crozdesk Data API: Extract Structured JSON in 2026
Learn how to extract structured Crozdesk review data via AlterLab's Data API—get typed JSON output for product_name, rating, review_count and more with minimal code.
Herald Blog Service
Popular Posts
Recommended

How to Scrape AliExpress: Complete Guide for 2026

Why Your Headless Browser Gets Detected (and How to Fix It)

AlterLab vs Firecrawl: In-Depth Review with Benchmarks & Code Examples

How to Scrape Twitter/X Data: Complete Guide for 2026

How to Scrape Cloudflare-Protected Sites in 2026
Newsletter
Scraping insights and API tips. No spam.
Recommended Reading

How to Scrape AliExpress: Complete Guide for 2026

Why Your Headless Browser Gets Detected (and How to Fix It)

AlterLab vs Firecrawl: In-Depth Review with Benchmarks & Code Examples

How to Scrape Twitter/X Data: Complete Guide for 2026

How to Scrape Cloudflare-Protected Sites in 2026
Stay in the Loop
Get scraping insights, API tips, and platform updates. No spam — we only send when we have something worth reading.
Explore AlterLab
Anti-Bot Handling API
Automatic challenge handling for protected sites — works out of the box.
JavaScript Rendering API
Render SPAs and dynamic content with headless Chromium.
Pricing
5-tier pricing from $0.0002/page. 5,000 free requests to start.
Documentation
API reference, SDKs, quickstart guides, and tutorials.
Web Scraping API Resources
Part of the Web Scraping API Documentation cluster
Complete API reference with 5-tier auto-escalation — Curl to challenge resolution.
Pillar pageConfigure Tier 4 browser rendering for SPAs and dynamic content.
Scrape pages behind login using session management.
Real success rates and cost data across all 5 tiers.
MCP Server, Python SDK, and Firecrawl-compatible API for AI agent workflows.