
Target Data API: Extract Structured JSON in 2026
Learn how to extract structured JSON data from Target using AlterLab's Target Data API. Skip HTML parsing and get typed e-commerce data instantly.
TL;DR
Use AlterLab's Extract API with a JSON schema to get structured Target data. Send a POST request with the Target URL and your schema to receive validated JSON output containing fields like title, price, and SKU — no HTML parsing needed.
This guide covers extracting publicly accessible data. Always review a site's robots.txt and Terms of Service before scraping.
Why use Target data?
Target's public product listings offer rich e-commerce datasets for three key engineering use cases:
- Training ML models on real-time pricing and availability patterns
- Building competitive intelligence dashboards that track SKU-level changes
- Enriching product catalogs with standardized attributes for AI agents
Unlike social media or login-gated data, Target's product pages represent intentionally public commercial information suitable for aggregation when accessed respectfully.
What data can you extract?
From publicly accessible Target product pages, you can retrieve these e-commerce fields:
- title: Product name as displayed
- price: Current sale price (string format to preserve precision)
- currency: ISO 4217 code (e.g., "USD")
- sku: Stock Keeping Unit identifier
- availability: "In Stock", "Out of Stock", or "Limited Availability"
- rating: Average review score (string to handle fractional values)
- brand: Manufacturer or private label name
AlterLab validates each field against your JSON schema, ensuring type consistency and eliminating cleanup steps. For example, price always comes as a string like "29.99" rather than requiring regex extraction from HTML.
The extraction approach
Raw HTTP requests followed by HTML parsing fail consistently on Target due to:
- Dynamic content loaded via JavaScript frameworks
- Anti-bot measures requiring header rotation and proxy management
- Frequent DOM structure changes breaking CSS selectors
- Encoding inconsistencies in price/availability symbols
A data API approach solves these by treating the target as a structured data source rather than a document to scrape. AlterLab handles infrastructure complexity — rotating proxies, JavaScript rendering, and anti-bot evasion — while you focus solely on defining the data shape you need through a JSON schema.
Quick start with AlterLab Extract API
Begin by installing the AlterLab SDK (getting started guide). Here's a Python example extracting core product fields:
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"
}
}
}
result = client.extract(
url="https://www.target.com/p/apple-iphone-15-pro/-/A-88932345",
schema=schema,
)
print(result.data)Output:
{
"title": "Apple iPhone 15 Pro - 256GB Black Titanium",
"price": "999.99",
"currency": "USD",
"sku": "A-88932345",
"availability": "In Stock"
}The equivalent cURL request:
curl -X POST https://api.alterlab.io/v1/extract \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.target.com/p/apple-iphone-15-pro/-/A-88932345",
"schema": {
"properties": {
"title": {"type": "string"},
"price": {"type": "string"},
"currency": {"type": "string"},
"sku": {"type": "string"},
"availability": {"type": "string"}
}
}
}'For batch processing, use asynchronous jobs to handle rate limits efficiently:
import alterlab
import asyncio
client = alterlab.Client("YOUR_API_KEY")
async def extract_product(url):
schema = {"properties": {"title": {"type": "string"}, "price": {"type": "string"}}}
return await client.extract(url=url, schema=schema)
urls = [
"https://www.target.com/p/apple-iphone-15-pro/-/A-88932345",
"https://www.target.com/p/samsung-galaxy-s24/-/A-89012345",
"https://www.target.com/p/google-pixel-8-pro/-/A-89123456"
]
async def main():
tasks = [extract_product(url) for url in urls]
results = await asyncio.gather(*tasks)
for i, res in enumerate(results):
print(f"Product {i+1}: {res.data}")
asyncio.run(main())Define your schema
The Extract API uses JSON Schema Draft 07 for validation. Key principles:
- Type safety: Specify
string,number,boolean, orobjecttypes - Field descriptions: Improve AI extraction accuracy with clear semantics
- Required fields: Mark critical data as
"required": ["title", "price"] - Default values: Provide fallbacks for occasionally missing fields
Example schema for enriched product data:
{
"type": "object",
"required": ["title", "price", "sku"],
"properties": {
"title": {"type": "string", "description": "Full product title"},
"price": {"type": "string", "description": "Current price"},
"currency": {"type": "string", "enum": ["USD", "CAD"], "default": "USD"},
"sku": {"type": "string", "pattern": "^A-\\d{8}$"},
"availability": {
"type": "string",
"enum": ["In Stock", "Out of Stock", "Pre-order", "Limited Availability"]
},
"rating": {"type": "string", "pattern": "^\\d\\.\\d$"},
"brand": {"type": "string"}
}
}AlterLab returns only validated data matching this schema. Invalid fields are omitted (not nulled), ensuring your pipeline receives clean, predictable output.
Handle pagination and scale
For catalog-level extraction:
- Discover URLs: Use sitemaps or category pages to collect product links
- Batch requests: Process 10-50 URLs per async job to stay within rate limits
- Error handling: Implement retry logic for 429 responses (AlterLab includes
Retry-Afterheader) - Cost optimization: Monitor usage via the dashboard — AlterLab charges only for successful extractions
See pricing for volume tiers. At 10K extractions/month, the effective cost is ~$0.005 per request. No minimums mean you pay strictly for what you use, with credits rolling over indefinitely.
Key takeaways
- Schema-first design: Define your data shape upfront to eliminate parsing fragility
- Public data focus: Extract only what Target intentionally exposes to visitors
- Infrastructure offload: AlterLab manages proxies, JavaScript, and anti-bot systems
- Typed output guarantee: Receive JSON that strictly conforms to your schema
- Scale confidently: Async batching and transparent pricing support production pipelines
Start with a single product page, validate your schema, then scale to full catalog extraction. Your data pipeline gains reliability by shifting from brittle HTML parsing to contract-based data extraction.
AlterLab // Web Data, Simplified.
Was this article helpful?
Frequently Asked Questions
Related Articles

GitHub Data API: Extract Structured JSON in 2026
Learn how to get structured GitHub data via API using AlterLab's Extract API for reliable JSON extraction of public repo info.
Herald Blog Service

How to Scrape Expedia Data: Complete Guide for 2026
Learn how to scrape Expedia travel data using Python and AlterLab's API in 2026, handling JavaScript, anti-bot measures, and extracting structured hotel & flight info.
Herald Blog Service

How to Scrape Shopify Stores Data: Complete Guide for 2026
Learn how to scrape Shopify stores for product data, prices, and inventory using Python and AlterLab's scraping API.
Herald Blog Service
Popular Posts
Recommended
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)

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

How to Scrape Cloudflare-Protected Sites in 2026

How to Bypass Cloudflare Bot Protection with Puppeteer 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
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.