Getting Started
Everything you need to integrate InjectAPI into your application in minutes.
What is InjectAPI?
InjectAPI is a web scraping and AI extraction API designed for e-commerce price comparison. It scrapes product listings from 28+ retailers (Target, eBay, Amazon, Walmart, Best Buy, StockX, and more) and extracts structured product data using a 3-tier intelligent extraction system that combines browser automation, custom DOM parsing, and AI.
Key Features
- 28+ Supported Retailers: Target, eBay, Amazon, Walmart, Best Buy, Home Depot, Lowe's, Costco, Newegg, Etsy, Wayfair, GameStop, StockX, and more
- 3-Tier Extraction System: Structured data → Custom DOM selectors → AI (with validation)
- Ultra-Fast Performance: 3-7 seconds average (vs 10-30s competitors)
- 98%+ Accuracy: Industry-leading extraction accuracy (vs 70-90% competitors)
- Cost-Effective: $0.30 per 1,000 requests (vs $29-$500 competitors)
- Intelligent Caching: 60-80% cache hit rate with per-product freshness tracking
- Historical Price Tracking: Auto-stores every scraped product for trend analysis
- Multiple Extraction Modes: Product, Article, Profile, Contact, Search, and General
Performance Benchmarks
| Feature | InjectAPI | Competitors |
|---|---|---|
| Response Time | 3-7 seconds | 10-30 seconds |
| Accuracy | 98%+ | 70-90% |
| Cost (1K requests) | $0.30 | $29-$500 |
| Cache Hit Rate | 60-80% | 0% (no per-product cache) |
| Supported Retailers | 28+ | Generic scraping only |
Base URL
https://api.injectapi.comQuickstart
Get your API key and make your first request in 5 minutes.
1. Get Your API Key
Sign up for free and get 1,000 free requests per month. Your API key is available in your dashboard.
2. Make Your First Request
Price Comparison (Recommended)
Compare prices across multiple retailers with a single API call:
curl -X POST https://api.injectapi.com/api/compare-prices \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"product": "nintendo switch",
"retailers": ["target", "ebay"],
"format": "flat"
}'Response time: 3-4s for Target, 6-7s for eBay. Cached requests return in <50ms.
Single URL Extraction
Extract product data from any e-commerce URL:
curl -X POST https://api.injectapi.com/api/extract \
-H "Content-Type: application/json" \
-H "X-API-Key": YOUR_API_KEY" \
-d '{
"url": "https://www.amazon.com/dp/B08N5WRWNW",
"mode": "product",
"extract": true
}'JavaScript / Node.js
const response = await fetch('https://api.injectapi.com/api/extract', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
body: JSON.stringify({
url: 'https://www.amazon.com/dp/B08N5WRWNW',
mode: 'product',
extract: true
})
});
const data = await response.json();
console.log(data.data);Python
import requests
response = requests.post(
'https://api.injectapi.com/api/extract',
headers={
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
json={
'url': 'https://www.amazon.com/dp/B08N5WRWNW',
'mode': 'product',
'extract': True
}
)
data = response.json()
print(data['data'])Response
{
"success": true,
"data": {
"title": "Apple AirPods Pro",
"price": 24900,
"currency": "USD",
"rating": 4.7,
"reviews_count": 50234,
"availability": "In Stock",
"brand": "Apple",
"images": ["https://..."]
},
"metadata": {
"url": "https://www.amazon.com/dp/B08N5WRWNW",
"mode": "product",
"extracted": true,
"timestamp": "2025-01-15T10:30:00Z",
"processingTime": 5234
}
}3. Extraction Modes
InjectAPI supports 6 different extraction modes, each optimized for specific use cases:
general- Extract any structured dataproduct- E-commerce product pagesarticle- Blog posts and news articlesprofile- Social media profilescontact- Contact information pagessearch- Search results pages
Raw HTML Mode
If you want to parse HTML yourself, you can disable AI extraction by setting extract: false:
const response = await fetch('https://api.injectapi.com/api/extract', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://example.com',
extract: false // Raw HTML only (faster, 1-2 seconds)
})
});
// Response includes raw HTML
const data = await response.json();
console.log(data.data.html);Supported Retailers
InjectAPI supports 28+ major retailers with optimized scraping configurations for each.
Tier 1: Major US Retailers (95%+ Success Rate)
- Amazon - World's largest e-commerce platform
- Walmart - America's largest retailer
- Target - Major discount retailer
- eBay - Leading online marketplace
- Best Buy - Electronics and appliances
- Home Depot - Home improvement retailer
- Lowe's - Home improvement and hardware
- Costco - Wholesale warehouse club
- Newegg - Electronics and computer hardware
Tier 2: Specialty Retailers (85-95% Success Rate)
- Etsy - Handmade and vintage marketplace
- Wayfair - Home goods and furniture
- GameStop - Video games and gaming hardware
- CVS - Pharmacy and health products
- Walgreens - Drugstore chain
- Kroger - Grocery and household items
- Sam's Club - Warehouse club
- B&H Photo - Photography and electronics
Tier 3: Marketplaces & Resale (80-90% Success Rate)
- StockX - Sneakers and streetwear marketplace
- Grailed - Men's fashion marketplace
- Mercari - Peer-to-peer marketplace
- Poshmark - Fashion resale marketplace
- Depop - Social shopping app
- AliExpress - International e-commerce
Tier 4: Gaming & Home (80-90% Success Rate)
- Micro Center - Computer and electronics retailer
- Adorama - Photography and electronics
- IKEA - Furniture and home goods
- Overstock - Home decor and furniture
- Ashley Furniture - Furniture retailer
How It Works: 3-Tier Extraction System
InjectAPI uses an intelligent 3-tier extraction system that automatically selects the best method for each retailer:
- Tier 1: Structured Data Extraction - Extracts JSON-LD, Microdata, and Open Graph tags embedded in HTML. 100% accuracy, 10x faster than AI. Works with eBay, Target, Amazon (80%+ of listings).
- Tier 2: Custom DOM Extraction - Hand-crafted CSS selectors optimized per retailer. 100x faster than AI, 100% accuracy when selectors are current. Used for Target, eBay, Walmart.
- Tier 3: AI Extraction - Uses Groq LLaMA 3.1 8B for intelligent extraction when structured data and custom selectors fail. 95% accuracy, 0.5-2 seconds generation time.
- Tier 4: Validation Layer - Validates all extracted data to prevent hallucinations, wrong URLs, fake prices, and duplicates.
Authentication
Learn how to authenticate your API requests with InjectAPI.
API Keys
InjectAPI uses API keys to authenticate requests. You can view and manage your API keys in your dashboard.
Using Your API Key
Include your API key in the X-API-Key header with every request:
curl -X POST https://api.injectapi.com/api/extract \
-H "X-API-Key: ik_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'JavaScript Example
fetch('https://api.injectapi.com/api/extract', {
method: 'POST',
headers: {
'X-API-Key': 'ik_1234567890abcdef',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://example.com'
})
})API Key Format
API keys start with the prefix ik_ followed by a random string:
ik_1234567890abcdefSecurity Best Practices
- Never expose your API key in client-side code or public repositories
- Use environment variables to store your API key
- Regenerate your key if you suspect it has been compromised
- Use different keys for development and production
Monitoring Usage
Track your API usage in real-time from your usage dashboard. Set up alerts to be notified when approaching your monthly limit.