ScrapeOps Data API in n8n
The Data API provides direct access to structured data from supported websites without needing to handle HTML scraping. Simply provide product identifiers or search queries, and receive clean, structured JSON data instantly.
For complete Data API documentation, see the Data APIs docs.
Overview
Unlike the Proxy and Parser APIs that require fetching and processing HTML, the Data API:
- Returns data in a single request
- Handles all scraping complexity internally
- Provides consistent, structured responses
- Optimizes for speed and reliability
Currently Supported APIs
Amazon APIs
- Amazon Product API - Get product details by ASIN or URL (Full docs)
- Amazon Product Search API - Search products by keyword or URL (Full docs)
More Data APIs coming soon!
Amazon Product API
Configuration
To get Amazon product data:
- Select Data API as the API type
- Choose Amazon as the domain
- Select Product API as the Amazon API type
- Choose input type: ASIN or URL
Using ASIN Input
API Type: Data API
Domain: Amazon
Amazon API Type: Product API
Input Type: ASIN
ASIN: B08N5WRWNW
Using URL Input
API Type: Data API
Domain: Amazon
Amazon API Type: Product API
Input Type: URL
Product URL: https://www.amazon.com/dp/B08N5WRWNW
Response Structure
{
"status": "valid",
"url": "https://www.amazon.com/dp/B08N5WRWNW",
"data": {
"title": "Echo Dot (4th Gen) | Smart speaker with Alexa",
"price": 49.99,
"rating": 4.7,
"review_count": 525841,
"brand": "Amazon",
"description": "Meet the all-new Echo Dot...",
"features": [
"Our most popular smart speaker",
"Voice control your entertainment"
],
"images": [
"https://m.media-amazon.com/images/I/..."
],
"product_information": {
"ASIN": "B08N5WRWNW",
"Best Sellers Rank": "#1 in Smart Speakers",
"Date First Available": "September 24, 2020"
},
"technical_details": {
"Brand": "Amazon",
"Model": "Echo Dot (4th Gen)",
"Color": "Charcoal"
}
}
}
Amazon Product Search API
Configuration
To search Amazon products:
- Select Data API as the API type
- Choose Amazon as the domain
- Select Product Search API as the Amazon API type
- Choose input type: Query or URL
Using Query Input
API Type: Data API
Domain: Amazon
Amazon API Type: Product Search API
Input Type: Query
Search Query: wireless headphones
Using URL Input
API Type: Data API
Domain: Amazon
Amazon API Type: Product Search API
Input Type: URL
Search URL: https://www.amazon.com/s?k=wireless+headphones
Response Structure
{
"status": "valid",
"url": "https://www.amazon.com/s?k=wireless+headphones",
"data": {
"products": [
{
"asin": "B08N5WRWNW",
"title": "Sony WH-1000XM4 Wireless Headphones",
"price": 348.00,
"original_price": 399.99,
"rating": 4.4,
"review_count": 29821,
"image_url": "https://m.media-amazon.com/images/I/...",
"url": "https://www.amazon.com/dp/B08N5WRWNW",
"is_prime": true,
"is_best_seller": true
},
// More products...
],
"total_results": 50000,
"pagination": {
"current_page": 1,
"total_pages": 20
}
}
}
Amazon API Options
Both Amazon APIs support additional options:
Country Parameter
Specify the Amazon marketplace:
Amazon API Options:
- Country: us
Available countries:
us
- United Statesuk
- United Kingdomca
- Canadade
- Germanyfr
- Franceit
- Italyes
- Spainjp
- Japan- And more...
TLD (Top Level Domain) Parameter
Alternatively, specify the exact Amazon domain:
Amazon API Options:
- TLD: co.uk
Available TLDs:
com
- Amazon.comco.uk
- Amazon.co.ukca
- Amazon.cade
- Amazon.defr
- Amazon.frco.jp
- Amazon.co.jp- And more...
Workflow Examples
Price Tracking Workflow
Monitor product prices across different Amazon marketplaces:
1. [Schedule Trigger] - Run daily
2. [Set Node] - Define ASINs to track
3. [Loop] - For each ASIN:
- [ScrapeOps Data API] - Get US price
- [ScrapeOps Data API] - Get UK price
- [Compare Prices]
4. [Google Sheets] - Update price history
5. [IF Node] - Check for price drops
6. [Email] - Send price alerts
Product Research Workflow
Search and analyze products:
1. [Manual Trigger] - Start with keywords
2. [ScrapeOps Data API] - Search products
3. [Filter Products] - Rating > 4.0
4. [Loop] - For each product:
- [ScrapeOps Data API] - Get full details
- [Calculate Metrics]
5. [Aggregate Results]
6. [Export to CSV]
Inventory Monitoring
Track product availability:
1. [Schedule Trigger] - Every hour
2. [Database] - Get products to monitor
3. [ScrapeOps Data API] - Check availability
4. [Compare] - Previous vs current status
5. [Slack] - Alert on status changes
6. [Update Database] - Save new status
Best Practices
1. Use Appropriate Input Types
ASIN is preferred when you have it:
- More reliable
- Faster processing
- Direct product access
URL for flexibility:
- Works with any Amazon product URL
- Handles URL variations
- Extracts ASIN automatically
2. Handle Response Data
Always check for valid responses:
// Check if request succeeded
{{ $json.status === 'valid' }}
// Safely access nested data
{{ $json.data?.price || 'Price not available' }}
// Handle missing products
{{ $json.data?.products?.length > 0 }}
3. Optimize API Calls
- Cache responses when appropriate
- Batch similar requests
- Use webhooks for real-time needs
- Implement exponential backoff for retries
4. Regional Considerations
Different regions may have:
- Different product availability
- Varying prices and currencies
- Region-specific features
- Unique product identifiers
Error Handling
Common Errors and Solutions
Error | Cause | Solution |
---|---|---|
Invalid ASIN | ASIN doesn't exist | Verify ASIN format (10 chars) |
Product Not Found | Product unavailable | Check region/marketplace |
Invalid URL | Malformed URL | Encode URL properly |
Rate Limited | Too many requests | Implement delays |
Error Response Example
{
"status": "error",
"message": "Product not found",
"error_code": "PRODUCT_NOT_FOUND",
"details": "ASIN B123456789 not found in US marketplace"
}
Advanced Integration Patterns
Multi-Region Price Comparison
// Define regions to check
const regions = ['us', 'uk', 'de', 'fr'];
const asin = 'B08N5WRWNW';
// Loop through regions
for (const region of regions) {
// Configure Data API with region
// Compare prices
// Find best deal
}
Dynamic Product Monitoring
// Get search terms from database
const searchTerms = $node["Database"].json;
// Search each term
for (const term of searchTerms) {
// Search products
// Filter by criteria
// Track new products
// Alert on matches
}
Competitive Analysis
// Get competitor ASINs
const competitorProducts = $node["Competitors"].json;
// Analyze each product
for (const asin of competitorProducts) {
// Get product details
// Extract pricing
// Calculate price position
// Generate insights
}
Debugging Data API Issues
1. Verify Input Parameters
// Log the actual request
console.log({
asin: $node["ScrapeOps"].parameter.amazonProductAsin,
country: $node["ScrapeOps"].parameter.amazonApiOptions.country
});
2. Check Response Status
// Examine the full response
if ($json.status !== 'valid') {
console.error('API Error:', $json.message);
}
3. Validate Data Completeness
// Ensure expected fields exist
const requiredFields = ['title', 'price', 'asin'];
const missingFields = requiredFields.filter(
field => !$json.data[field]
);
Future Data APIs
Coming soon:
- Walmart Data API - Products and search
- eBay Data API - Listings and sellers
- Google Shopping API - Product comparisons
- Target Data API - Products and inventory
- Best Buy Data API - Electronics focus
Next Steps
- See practical examples of complete Data API workflows
- Learn about Proxy API for custom scraping
- Explore Parser API for HTML parsing
Questions? Contact support@scrapeops.io for Data API assistance.