API documentation

Base URL: https://urltoprice.com. All responses are UTF-8 JSON with snake_case field names; times are in UTC (ISO 8601).

Getting started

  1. Sign up. The trial starts right away.
  2. Create an API key under “Keys”. It's shown only once, so save it.
  3. Send a request with a product page URL.

Authentication

Pass your API key in the Authorization: Bearer pa_… or X-Api-Key: pa_… header. Don't put the key in the request URL, and don't embed it in code that runs in your users' browsers.

Price by URL

GET /v1/price?url=…
ParameterDescription
urlProduct page URL, http or https, up to 2000 characters. Required. Tracking parameters such as utm_* and gclid are stripped, so URLs that differ only in those count as the same page.
max_ageHow many seconds a stored result is considered fresh. Default 3600 (one hour), minimum 300, maximum 604800 (one week).
waitHow many seconds to wait for a new page to load, from 0 to 120, default 60. If it isn't ready in time, you get a 202.

You can also send the same thing as POST /v1/price with the body {"url": "…", "max_age": 3600, "wait": 60} and the Content-Type: application/json header, which is handy for long URLs.

Response

200 OK means the price was found, or the page says the product is out of stock:

{
  "url": "https://shop.example.com/product/12345",
  "price": 129.00,
  "old_price": 159.00,
  "currency": "USD",
  "in_stock": true,
  "title": "Wireless headphones, black",
  "details": {
    "image": "https://cdn.example.com/12345/1.jpg",
    "images": ["https://cdn.example.com/12345/1.jpg", "https://cdn.example.com/12345/2.jpg"],
    "description": "Over-ear headphones with 40 hours of playback …",
    "brand": "Example",
    "mpn": "EX-40B",
    "sku": "12345",
    "specs": [{ "name": "Battery life", "value": "40 hours" }]
  },
  "source": "jsonld",
  "city": null,
  "checked_at": "2026-12-03T20:15:04Z",
  "cached": false
}
FieldDescription
urlThe normalized URL: tracking parameters and fragment removed, query parameters sorted.
priceCurrent price for a shopper, as a number. null if the product is out of stock and the page shows no price.
currencyISO 4217 currency code (USD, EUR, …), or null if the store doesn't specify one.
in_stocktrue: available to buy; false: out of stock or pre-order only; null: the page doesn't say.
old_priceThe crossed-out price before the discount, when the page shows it, else null.
titleProduct title from the page.
detailsPictures, description, brand, the maker's part number (mpn), the store's article number (sku) and key specs. What is filled depends on the store; any field may be null.
sourceWhere the price came from: jsonld, microdata, meta for page markup; site for the site's own data; vision when read from a screenshot and checked against the page text.
cityThe city the price is for, on the few sites that report it, else null.
checked_atWhen the page was loaded.
cachedtrue if the response comes from a stored load no older than max_age.

Slow pages: 202

If the page doesn't load within wait seconds, the API returns 202 Accepted with a Retry-After header and keeps loading in the background. Repeat the same request a few seconds later: it picks up the load in progress or returns its result. A 202 doesn't count toward your quota.

{
  "url": "https://shop.example.com/product/12345",
  "status": "pending",
  "message": "The page is loading, repeat the same request in a few seconds",
  "retry_after": 10
}

Many URLs at once

POST /v1/prices

Up to 100 URLs in one request, and no more than your plan's requests per minute. max_age and wait work as in Price by URL and apply to every URL.

curl -X POST "https://urltoprice.com/v1/prices" \
  -H "Authorization: Bearer pa_…" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://shop.example.com/product/12345", "https://store.example.org/item/678"], "wait": 60}'

200 OK lists every URL with its own status: ok with the same fields as for a single URL, pending while the page is still loading, error with an error object. Ask again only for the pending ones.

{
  "results": [
    {
      "url": "https://shop.example.com/product/12345",
      "status": "ok",
      "price": 129.00,
      "currency": "USD",
      "in_stock": true,
      "title": "Wireless headphones, black",
      …
    },
    { "url": "https://store.example.org/item/678", "status": "pending" }
  ],
  "pending": 1,
  "message": "Some pages are still loading: repeat the request for the URLs with status pending only",
  "retry_after": 10
}

Errors

An error response contains an error object with a machine-readable code and a description:

{
  "url": "https://shop.example.com/product/12345",
  "error": {
    "code": "no_price",
    "message": "No structured price on the page …",
    "page_title": "Product not found"
  },
  "checked_at": "2026-12-03T20:15:04Z",
  "cached": false
}
HTTPCodeWhat happened
400invalid_url, invalid_jsonThe URL is missing or isn't http(s), or the POST body isn't JSON.
400too_manyMore URLs in one request than allowed.
401invalid_keyThe API key is missing, invalid or revoked.
402no_subscriptionNo active plan, or the paid period has ended.
422not_loaded, no_answer, too_largeThe page didn't load, took too long or is too large.
422invalid_pageThe site returned a verification page instead of the product.
422no_price, price_not_in_text, no_screenshot, model_failedThe page loaded, but no price could be found on it. Check page_title.
429rate_limitedPer-minute limit exceeded; the Retry-After header says how many seconds to wait.
429quota_exceededYour plan's responses for this month are used up.
503unavailablePage loading is temporarily unavailable; try again later.

Errors for a given URL are cached for 10 minutes: repeating the request during that time returns the same error without reloading the page.

Remaining quota

GET /v1/account

Your plan, its period and how many responses are left this month. This request doesn't count toward your quota.

{
  "plan": "business",
  "active": true,
  "paid_until": "2027-01-01T10:00:00Z",
  "month_start": "2026-12-01T10:00:00Z",
  "month_end": "2027-01-01T10:00:00Z",
  "requests_limit": 50000,
  "requests_used": 1234,
  "requests_left": 48766,
  "per_minute": 120
}

Limits and billing

  • Only 200 responses count toward your monthly quota: those with a price or “out of stock”, including cached ones.
  • In a request for many URLs every URL with status ok counts as one, and each URL takes one of the minute's requests.
  • 202, 4xx and 5xx responses are free.
  • The per-minute limit applies to all API keys on the account combined.

Examples

curl -G "https://urltoprice.com/v1/price" \
  -H "Authorization: Bearer pa_your_key" \
  --data-urlencode "url=https://shop.example.com/product/12345"
import time
import requests

def get_price(url):
    while True:
        r = requests.get("https://urltoprice.com/v1/price",
                         params={"url": url},
                         headers={"Authorization": "Bearer pa_your_key"},
                         timeout=130)
        if r.status_code == 202:  # the page is still loading
            time.sleep(int(r.headers.get("Retry-After", 10)))
            continue
        return r.status_code, r.json()

status, data = get_price("https://shop.example.com/product/12345")
if status == 200:
    print(data["price"], data["currency"], data["in_stock"])
else:
    print(data["error"]["code"], data["error"]["message"])
// Node.js 18+ or a browser (don't expose your API key in your users' browsers)
async function getPrice(url) {
  const api = new URL("https://urltoprice.com/v1/price");
  api.searchParams.set("url", url);
  for (;;) {
    const r = await fetch(api, { headers: { Authorization: "Bearer pa_your_key" } });
    if (r.status === 202) {
      await new Promise(ok => setTimeout(ok, 10_000));
      continue;
    }
    return { status: r.status, data: await r.json() };
  }
}

const { status, data } = await getPrice("https://shop.example.com/product/12345");
console.log(status, data.price, data.currency, data.in_stock);
<?php
function getPrice(string $url): array {
    $api = "https://urltoprice.com/v1/price?" . http_build_query(["url" => $url]);
    do {
        $ch = curl_init($api);
        curl_setopt_array($ch, [
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_TIMEOUT => 130,
            CURLOPT_HTTPHEADER => ["Authorization: Bearer pa_your_key"],
        ]);
        $body = curl_exec($ch);
        $status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
        curl_close($ch);
        if ($status == 202) sleep(10);
    } while ($status == 202);
    return [$status, json_decode($body, true)];
}

[$status, $data] = getPrice("https://shop.example.com/product/12345");
if ($status == 200) echo $data["price"], " ", $data["currency"];
using System.Net.Http.Headers;
using System.Net.Http.Json;
using System.Text.Json;

var http = new HttpClient { Timeout = TimeSpan.FromSeconds(130) };
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "pa_your_key");

var api = "https://urltoprice.com/v1/price?url=" + Uri.EscapeDataString("https://shop.example.com/product/12345");
HttpResponseMessage r;
while ((r = await http.GetAsync(api)).StatusCode == System.Net.HttpStatusCode.Accepted)
    await Task.Delay(TimeSpan.FromSeconds(10));

var data = await r.Content.ReadFromJsonAsync<JsonElement>();
if (r.IsSuccessStatusCode)
    Console.WriteLine($"{data.GetProperty("price")} {data.GetProperty("currency")}");