```yaml
product: AlterLab
title: How to Scrape Flipkart Data: Complete Guide for 2026
category: Tutorials
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
last_updated: 2026-08-09
canonical_facts:
  - "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."
source_url: https://alterlab.io/blog/how-to-scrape-flipkart-data-complete-guide-for-2026
```

# How to Scrape Flipkart Data: Complete Guide for 2026

This 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](/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](/docs/quickstart/installation) for detailed setup.

### Python example
```python title="scrape_flipkart-com.py" {3-5}
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 HTML
```

### Node.js example
```javascript title="scrape_flipkart-com.js" {3-5}
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
```bash title="Terminal"
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:
```python title="parse_flipkart.py"
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:

```python title="extract_flipkart-com_structured.py"
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](/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.txt` for disallowed paths
- **Error handling**: Implement

## Frequently Asked Questions

### Is it legal to scrape flipkart?

Scraping publicly accessible data from Flipkart is generally permissible under laws like hiQ v. LinkedIn, but you must review Flipkart's robots.txt and Terms of Service, implement rate limiting, and avoid accessing login-protected or personal data. Users bear responsibility for compliance.

### What are the technical challenges of scraping flipkart?

Flipkart employs standard anti-bot measures including rate limiting, header validation, and occasional JavaScript challenges. Raw HTTP requests often fail; AlterLab's Smart Rendering API handles proxy rotation, header management, and browser rendering automatically to maintain access to public data.

### How much does it cost to scrape flipkart at scale?

Costs range from $0.0002/request for static HTML (T1) to $0.004/request for full JavaScript rendering (T4), with AlterLab's auto-escalation ensuring you only pay for the successful tier. For typical Flipkart product pages requiring light JS handling, expect ~$0.002/request (T3 tier).

## Related

- [How to Scrape Lazada Data: Complete Guide for 2026](<https://alterlab.io/blog/how-to-scrape-lazada-data-complete-guide-for-2026>)
- [How to Scrape Allegro Data: Complete Guide for 2026](<https://alterlab.io/blog/how-to-scrape-allegro-data-complete-guide-for-2026>)
- [LoopNet Data API: Extract Structured JSON in 2026](<https://alterlab.io/blog/loopnet-data-api-extract-structured-json-in-2026>)