
How to Scrape Flipkart Data: Complete Guide for 2026
Learn to scrape Flipkart product data responsibly using AlterLab's API with Python and Node.js examples. Covers anti-bot handling, structured extraction, and pricing.
AlterLab handles this automatically — scrape any URL with one API call. No infrastructure required.
Try it freeThis guide covers extracting publicly accessible data. Always review a site's robots.txt and Terms of Service before scraping.
TL;DR
Scrape Flipkart product pages using AlterLab's API with automatic anti-bot handling. Start with T1/T2 tiers for static content, escalate to T3 for JS-protected pages. Extract structured data via CSS selectors or Cortex AI for typed JSON output. Costs begin at $0.0002/request.
Why collect e-commerce data from Flipkart?
Flipkart hosts over 150 million products across categories like electronics, fashion, and home goods. Engineering teams scrape this public data for:
- Price intelligence: Track competitor pricing fluctuations for dynamic pricing models
- Market research: Analyze product availability, category trends, and seasonal demand patterns
- Data enrichment: Enhance internal catalogs with standardized product attributes from public listings
Technical challenges
Flipkart employs layered anti-bot protections common to major e-commerce sites:
- Rate limiting based on IP and request patterns
- Header validation (User-Agent, Accept, Referer checks)
- Occasional JavaScript rendering requirements for dynamic content
- Bot detection via behavioral analysis and fingerprinting
Raw HTTP requests frequently receive 403/429 responses or altered HTML. AlterLab's Smart Rendering API manages these challenges through:
- Automatic proxy rotation with residential IPs
- Realistic browser fingerprinting
- Header normalization and cookie handling
- Tiered rendering escalation (curl → browser) without code changes
Quick start with AlterLab API
Begin by installing the SDK and making your first request. See the Getting started guide for detailed setup.
Python example
import alterlab
client = alterlab.Client("YOUR_API_KEY")
response = client.scrape("https://www.flipkart.com/apple-iphone-15-pro-max-black-titanium-256-gb/p/itmdc5308fa78822")
print(response.text[:500]) # First 500 chars of HTMLNode.js example
import { AlterLab } from "alterlab";
const client = new AlterLab({ apiKey: "YOUR_API_KEY" });
const response = await client.scrape("https://www.flipkart.com/apple-iphone-15-pro-max-black-titanium-256-gb/p/itmdc5308fa78822");
console.log(response.text.slice(0, 500));cURL example
curl -X POST https://api.alterlab.io/v1/scrape \
-H "X-API-Key: YOUR_KEY" \
-d '{"url": "https://www.flipkart.com/apple-iphone-15-pro-max-black-titanium-256-gb/p/itmdc5308fa78822"}'Note: Flipkart product pages typically succeed at T2/T3 tiers. The API auto-escalates if initial attempts fail—you only pay for the successful tier.
Extracting structured data
Parse relevant data points using CSS selectors in your post-processing layer. Common Flipkart selectors:
| Data Point | CSS Selector | Example Value |
|---|---|---|
| Product Title | h1 span.B_NuCI | Apple iPhone 15 Pro Max |
| Price | div._30jeq3._16Jk6d | ₹1,44,900 |
| Rating | div._3LWZlK._1BLPMq | 4.5 |
| Availability | div._16FRp0 | In Stock |
| Image URL | img._396cs4._3exPp9 | https://rukminim2.flixcart.com/... |
Extract these in Python:
from parsel import Selector
selector = Selector(text=response.text)
data = {
"title": selector.css("h1 span.B_NuCI::text").get(),
"price": selector.css("div._30jeq3._16Jk6d::text").get(),
"rating": selector.css("div._3LWZlK._1BLPMq::text").get(),
"in_stock": "In Stock" in selector.css("div._16FRp0::text").get()
}Structured JSON extraction with Cortex
For guaranteed typed output without selector maintenance, use AlterLab's Cortex AI extraction. Define a JSON schema and receive validated data:
import alterlab
client = alterlab.Client("YOUR_API_KEY")
result = client.extract(
url="https://www.flipkart.com/apple-iphone-15-pro-max-black-titanium-256-gb/p/itmdc5308fa78822",
schema={
"type": "object",
"properties": {
"title": {"type": "string"},
"price": {"type": "number"}, # Converted from string like "₹1,44,900" → 144900
"rating": {"type": "number"},
"availability": {"type": "string"},
"brand": {"type": "string"},
"storage": {"type": "string"}
},
"required": ["title", "price"]
}
)
print(result.data)
# Output: {"title": "Apple iPhone 15 Pro Max", "price": 144900, "rating": 4.5, ...}Cortex handles:
- Currency/number parsing
- Missing field normalization
- Schema validation and type coercion
- Fallback to traditional selectors when AI confidence is low
Cost breakdown
Flipkart's anti-bot landscape typically requires T2-T3 tiers. AlterLab auto-escalates from T1—you pay only for the tier that successfully retrieves data.
| Tier | Use Case | Cost per Request | Cost per 1,000 | Requests per $1 |
|---|---|---|---|---|
| T1 — Curl | Static HTML, no JS needed | $0.0002 | $0.20 | 5,000 |
| T2 — HTTP | Standard pages with headers | $0.0003 | $0.30 | 3,333 |
| T3 — Stealth | Protected pages, anti-bot active | $0.002 | $2.00 | 500 |
| T4 — Browser | Full JS rendering required | $0.004 | $4.00 | 250 |
| T5 — CAPTCHA | CAPTCHA solving + JS rendering | $0.02 | $20.00 | 50 |
View detailed pricing including volume discounts. Example monthly cost for 100K Flipkart product scrapes (avg T3): $200.
Best practices
- Rate limiting: Start with 1 request/second per IP, adjust based on response headers
- Robots.txt compliance: Check
https://www.flipkart.com/robots.txtfor disallowed paths - Error handling: Implement
Was this article helpful?
Frequently Asked Questions
Related Articles

How to Scrape Lazada Data: Complete Guide for 2026
Learn how to scrape Lazada data efficiently using Python and Node.js. This guide covers handling anti-bot protections, using Cortex AI for extraction, and scaling pipelines.
Herald Blog Service

How to Scrape Allegro Data: Complete Guide for 2026
Learn how to scrape Allegro data using Python and Node.js. A technical guide on extracting public e-commerce data while handling anti-bot protections.
Herald Blog Service

LoopNet Data API: Extract Structured JSON in 2026
Learn how to build a production-ready data pipeline using the AlterLab LoopNet data api to extract structured real-estate JSON without managing proxies or selectors.
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.