PricesAPI Documentation
Real-time pricing data from thousands of retailers worldwide.
The PricesAPI provides programmatic access to product pricing data, seller information, and historical price trends. Build price comparison tools, track competitor pricing, or integrate live product offers into your application.
Base URL
https://api.pricesapi.io/api/v1Authentication
All API requests require authentication using an API key. Simply add your API key as a query parameter to any request:
curl "https://api.pricesapi.io/api/v1/products/search?q=iphone&api_key=your_api_key"Alternative: Header-Based Authentication
You can also pass your API key via the x-api-key header if preferred:
-H "x-api-key: $your_api_key"Keep your API key secure! Never commit API keys to version control or expose them in client-side code. Your API key starts with pricesapi_ prefix.
Quick Start
Get started with a simple product search request:
// Simple GET request with query parameter
const apiKey = 'your_api_key';
const url = `https://api.pricesapi.io/api/v1/products/search?q=laptop&limit=10&api_key=${apiKey}`;
const response = await fetch(url);
const data = await response.json();
console.log(data);Rate Limits
API rate limits depend on your subscription plan:
| Plan | Monthly Limit | Rate |
|---|---|---|
| Personal | 1,000 requests | 10 req/min |
| Developer | 25,000 requests | 60 req/min |
| Business | 100,000 requests | 300 req/min |
| Enterprise | 500,000+ requests | 1000 req/min |
Search Products
GET /api/v1/products/searchSearch for products across all retailers.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| q | string | Search query (required) |
| limit | integer | Results per page (default: 20, max: 100) |
| offset | integer | Pagination offset (default: 0) |
Example Request
curl "https://api.pricesapi.io/api/v1/products/search?q=macbook+pro&limit=10" \
-H "x-api-key: your_api_key"Example Response
{
"success": true,
"data": {
"query": "macbook pro",
"results": [
{
"id": "12345",
"title": "MacBook Pro 14-inch M3",
"image": "https://example.com/image.jpg",
"offerCount": 12
},
{
"id": "12346",
"title": "MacBook Pro 16-inch M3 Max",
"image": "https://example.com/image2.jpg",
"offerCount": 8
}
],
"total": 10
}
}Get Product Offers
GET /api/v1/products/:id/offersRetrieve current pricing and offers for a specific product from all available sellers.
⚡ Real-Time Scraping
This endpoint performs real-time scraping to fetch the latest prices. Response times may vary from 5-30 seconds depending on the number of retailers.
Example Request
curl "https://api.pricesapi.io/api/v1/products/3669/offers" \
-H "x-api-key: your_api_key"Example Response
{
"success": true,
"data": {
"id": 3669,
"title": "Playstation 5 Console",
"image": "https://encrypted-tbn1.gstatic.com/shopping?q=tbn:ANd9GcSD2iUaA2...",
"offerCount": 13,
"offers": [
{
"seller": "BIG W",
"seller_url": "https://www.bigw.com.au",
"price": 629,
"currency": "AUD",
"rating": 4.868,
"reviewCount": 129,
"stock": "In stock",
"delivery_info": "Free delivery between Fri – Tue",
"productTitle": "PlayStation 5 Console 1TB - EA SPORTS FC 26 Bundle",
"url": "https://www.bigw.com.au/product/playstation-5-console-1tb-ea-sports-fc-26-bundle/p/6052552"
},
{
"seller": "EB Games Australia",
"seller_url": "https://www.ebgames.com.au",
"price": 643,
"currency": "AUD",
"rating": 4.792,
"reviewCount": 58,
"stock": "In stock",
"delivery_info": "Delivery between 28 Nov – 5 Dec $17.29",
"productTitle": "PlayStation 5 (Slim) Disc Console + EA Sports FC 26 Bundle",
"url": "https://www.ebgames.com.au/product/ps5/335472-playstation"
},
{
"seller": "Amazon",
"seller_url": "https://www.amazon.com.au",
"price": 796.36,
"currency": "AUD",
"rating": 4.498,
"reviewCount": 622,
"stock": "In stock",
"delivery_info": null,
"productTitle": "PlayStation 5 Console",
"url": "https://www.amazon.com.au/dp/B08HHV8945"
}
]
}
}Supported Countries
The API supports price comparison across 18 countries. Use the country query parameter to specify the target market.
Country Parameter
Add ?country=CODE to your request. Default is us if not specified.
GET /api/v1/products/:id/offers?country=ukAmericas
- 🇺🇸US - United States
- 🇨🇦CA - Canada
- 🇧🇷BR - Brazil
- 🇲🇽MX - Mexico
Europe
- 🇬🇧UK - United Kingdom
- 🇩🇪DE - Germany
- 🇫🇷FR - France
- 🇮🇹IT - Italy
- 🇪🇸ES - Spain
- 🇳🇱NL - Netherlands
- 🇸🇪SE - Sweden
- 🇵🇱PL - Poland
Asia-Pacific & Middle East
- 🇦🇺AU - Australia
- 🇯🇵JP - Japan
- 🇮🇳IN - India
- 🇸🇬SG - Singapore
- 🇦🇪AE - UAE
- 🇸🇦SA - Saudi Arabia
Example with Country Parameter
# Get prices in the UK
curl "https://api.pricesapi.io/api/v1/products/3669/offers?country=uk" \
-H "x-api-key: your_api_key"Error Codes
The API uses standard HTTP status codes and returns detailed error information:
| Code | Error | Description |
|---|---|---|
| 401 | MISSING_API_KEY | API key not provided |
| 401 | INVALID_API_KEY | API key is invalid or expired |
| 403 | CREDITS_EXCEEDED | Monthly API limit reached |
| 404 | PRODUCT_NOT_FOUND | Product ID does not exist |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests |
| 500 | INTERNAL_ERROR | Server error |
Error Response Format
{
"success": false,
"error": {
"code": "INVALID_API_KEY",
"message": "API key is invalid",
"details": "The provided API key was not found"
}
}Complete Code Examples
Full examples showing how to search for products and retrieve pricing data:
const API_KEY = 'your_api_key';
const BASE_URL = 'https://api.pricesapi.io/api/v1';
async function searchProducts(query) {
const response = await fetch(
`${BASE_URL}/products/search?q=${query}&limit=10`,
{
headers: {
'x-api-key': API_KEY
}
}
);
const data = await response.json();
return data;
}
async function getProductOffers(productId) {
const response = await fetch(
`${BASE_URL}/products/${productId}/offers`,
{
headers: {
'x-api-key': API_KEY
}
}
);
const data = await response.json();
return data;
}
// Example usage
searchProducts('laptop').then(data => {
console.log(`Found ${data.data.total} products`);
if (data.data.results.length > 0) {
const productId = data.data.results[0].id;
return getProductOffers(productId);
}
}).then(offersData => {
if (offersData) {
console.log(`Found ${offersData.data.offerCount} offers`);
}
});