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/v1

Authentication

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:

javascript
// 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:

PlanMonthly LimitRate
Personal1,000 requests10 req/min
Developer25,000 requests60 req/min
Business100,000 requests300 req/min
Enterprise500,000+ requests1000 req/min

Get Product Offers

GET /api/v1/products/:id/offers

Retrieve 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

json
{
  "success": true,
  "data": {
    "id": 2919949736654117913,
    "title": "Apple iPhone 17 512GB White",
    "image": "https://example.com/image.jpg",
    "offerCount": 5,
    "offers": [
      {
        "seller": "Best Buy",
        "seller_url": "https://www.bestbuy.com",
        "price": 1199,
        "currency": "USD",
        "rating": 4.8,
        "reviewCount": 1892,
        "stock": "In stock",
        "delivery_info": "Free delivery by Fri",
        "productTitle": "Apple iPhone 17 512GB White",
        "url": "https://www.bestbuy.com/site/apple-iphone-17-512gb-white"
      },
      {
        "seller": "Amazon",
        "seller_url": "https://www.amazon.com",
        "price": 1199,
        "currency": "USD",
        "rating": 4.7,
        "reviewCount": 3421,
        "stock": "In stock",
        "delivery_info": "Free Prime delivery",
        "productTitle": "Apple iPhone 17 512GB (White)",
        "url": "https://www.amazon.com/dp/B0D1234567"
      },
      {
        "seller": "Apple",
        "seller_url": "https://www.apple.com",
        "price": 1199,
        "currency": "USD",
        "rating": 4.9,
        "reviewCount": 5841,
        "stock": "In stock",
        "delivery_info": "Free delivery",
        "productTitle": "iPhone 17 512GB White Unlocked",
        "url": "https://www.apple.com/shop/buy-iphone/iphone-17"
      }
    ]
  }
}

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 au (Australia) if not specified.

GET /api/v1/products/:id/offers?country=uk

Americas

  • 🇺🇸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:

Authentication Errors

CodeErrorDescription
401MISSING_API_KEYAPI key not provided in request
401INVALID_API_KEY_FORMATAPI key doesn't start with pricesapi_ prefix
401INVALID_API_KEYAPI key not found in database
403SUBSCRIPTION_CANCELLEDYour subscription has been cancelled
403CREDITS_EXCEEDEDMonthly API credits limit reached
429RATE_LIMIT_EXCEEDEDToo many requests per minute

Request Errors

CodeErrorDescription
400MISSING_QUERYSearch query parameter 'q' is required
400MISSING_PRODUCT_IDProduct ID is required in URL path
400INVALID_PRODUCT_IDProduct ID must be a valid number
400INVALID_LIMITLimit must be a positive integer
404PRODUCT_NOT_FOUNDProduct ID does not exist in database
404NOT_FOUNDRequested endpoint does not exist

Server Errors

CodeErrorDescription
500SEARCH_FAILEDProduct search failed
500PRICES_FAILEDFailed to fetch product prices
500VALIDATION_ERRORFailed to validate API key

Error Response Format

json
{
  "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`);
  }
});