# Product Price API: Live Price & Stock from Product Pages (`apricot_blackberry/product-offer-extractor`) Actor

Product URL in; price, currency, stock status and source confidence out, from JSON-LD, microdata and OpenGraph. Standby API. From $0.002 per offer.

- **URL**: https://apify.com/apricot_blackberry/product-offer-extractor.md
- **Developed by:** [Creator Fusion](https://apify.com/apricot_blackberry) (community)
- **Categories:** E-commerce, AI, Developer tools
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 offer extracteds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Product Price API: Live Price & Stock from Product Pages

This **Product Price API** takes a product URL from any store that publishes **schema.org** data (Shopify, WooCommerce, BigCommerce, IKEA and more) and returns price, currency, availability and a source-and-confidence trail, read from the schema.org JSON-LD, microdata and OpenGraph tags the page already publishes.

Run it in batches of up to 5,000 URLs, or call the Standby endpoint `GET /offer?url=` from an agent.

### Who it's for

- **AI shopping agents** that must cite a price: every row says which source produced `price`, `currency` and `availability`, whether sources agree, and a 0 to 1 `confidence`.
- **Agent backends** that need one product answer inside a chat turn (Standby `GET /offer`).
- **Price analysts** pulling a few thousand competitor URLs into Sheets every morning (`flat` view).
- **n8n, Make and Zapier users** who want a scheduled "URL in, price out" step.

### Sample output

One row from a real captured IKEA product page (`ikea-pdp-billy-20522046` fixture, offline smoke run; `url` shown as the live page URL). You can download the dataset as JSON, CSV, Excel or HTML.

```json
{
  "status": "ok",
  "url": "https://www.ikea.com/us/en/p/billy-bookcase-white-20522046/",
  "finalUrl": "https://www.ikea.com/us/en/p/billy-bookcase-white-20522046/",
  "name": "BILLY Bookcase - white 31 1/2x11x79 1/2 \"",
  "brand": "IKEA",
  "sku": "205.220.46",
  "gtin": null,
  "price": 79,
  "priceType": "offer",
  "lowPrice": null,
  "highPrice": null,
  "currency": "USD",
  "availability": "in_stock",
  "condition": "new",
  "variant": {"id": null, "selection": "single", "count": 1},
  "image": "https://www.ikea.com/us/en/images/products/billy-bookcase-white__1590272_pe1038911_s5.jpg",
  "fieldSources": {"price": "jsonld", "currency": "jsonld", "availability": "jsonld"},
  "sourcesFound": ["jsonld", "opengraph"],
  "sourcesAgree": null,
  "confidence": 0.9,
  "warnings": [],
  "warningsText": "",
  "fetchedAt": "2026-11-06T15:24:18.489Z",
  "fetchMs": 531
}
```

`warningsText` is the `warnings` list joined with `; `, kept for the CSV view. A multi-variant page (for example a Shopify `ProductGroup`) fills `variant` with `{"id": "1001", "selection": "first_in_stock", "count": 3}`.

Dataset views: **overview** (url, name, price, currency, availability, confidence, status) and **flat** (26 CSV-safe columns, including `variant.id`, `fieldSources.price`, `warningsText`, `error.code`).

#### How extraction works

- Extraction order: JSON-LD (`Product`, `ProductGroup.hasVariant[]`, `Offer`, `AggregateOffer`, also inside `@graph`) then microdata, then OpenGraph (`product:price:*`, `og:price:*`), then meta fallbacks (`<meta itemprop>`, `twitter:data1`).
- `offers.price` wins over `priceSpecification`. `AggregateOffer` returns `price = lowPrice` with `priceType: "aggregate_low"`.
- Availability is one enum: `in_stock`, `out_of_stock`, `preorder`, `backorder`, `limited`, `discontinued`, `sold_out`, `online_only`, `in_store_only`, `unknown`.
- Currency is checked against ISO-4217 (invalid becomes `null` plus a warning). Locale prices such as `1.299,00` are parsed. JPY and KRW keep 0 decimals.
- Multi-variant pages: `variantStrategy` picks the variant (see Inputs); the row records how (`variant.selection`).
- Listing and category pages are not guessed: a product is only taken from a list when its URL matches the page you asked for.

Confidence starts at 0.5, then +0.3 if the price came from JSON-LD, +0.1 if two or more sources agree on price (within 0.5%), +0.1 for a valid currency, -0.3 if sources disagree, -0.1 if the variant was guessed. It is clamped to 0 to 1.

### Pricing

Pay per event.

| Event | FREE | BRONZE | SILVER and above | When it fires |
|---|---|---|---|---|
| `offer-extracted` | $0.002 | $0.0018 | $0.0015 | A row with a price. `variantStrategy: "all"` charges once per variant row. |
| `no-offer` | $0.0005 | $0.0005 | $0.0004 | Page fetched and parsed, no price found. |
| `offer-extracted-browser` | $0.006 | $0.005 | $0.0045 | Reserved for a future browser fallback. Not used yet. |

That is $2 per 1,000 prices at the FREE tier. Worked examples (plus the $0.00005 `apify-actor-start` event):

| Run | FREE | BRONZE | SILVER and above |
|---|---|---|---|
| 1 Standby `GET /offer` with a price | $0.002 | $0.0018 | $0.0015 |
| 1,000 URLs: 950 priced, 30 `NO_OFFER`, 20 `BLOCKED` | 950 x $0.002 + 30 x $0.0005 = **$1.915** | 950 x $0.0018 + 30 x $0.0005 = **$1.725** | 950 x $0.0015 + 30 x $0.0004 = **$1.437** |
| 100 product pages x 4 variants with `variantStrategy: "all"` | 400 x $0.002 = **$0.80** | 400 x $0.0018 = **$0.72** | 400 x $0.0015 = **$0.60** |
Errors (`BLOCKED`, `FETCH_FAILED`, `INVALID_URL`, `TIMEOUT`, `BUDGET_EXHAUSTED`) are never charged. The run stops cleanly at your maximum charge: remaining URLs are written as `BUDGET_EXHAUSTED` rows. Residential proxy traffic is billed by Apify on top of these events (see Limits).

### Inputs

Only `urls` is required.

| Field | Type | Default | Description |
|---|---|---|---|
| `urls` | string\[] (1 to 5,000) | required (prefill: the IKEA BILLY URL) | Product page URLs. |
| `variantStrategy` | `url_param` / `first_in_stock` / `lowest_price` / `all` | `url_param` | `url_param` matches the `?variant=` value against offer URLs and SKUs, else falls back to first in stock. `all` returns one row per variant. |
| `proxy` | proxy object | `{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}` | Many retailers block datacenter IPs, so residential with browser-like headers is the default. |
| `useResidentialOnBlock` | boolean | `true` | If blocked on a non-residential proxy, retry once on RESIDENTIAL. |
| `includeRawSources` | boolean | `false` | Attach raw JSON-LD and OpenGraph tags as `raw`. |
| `renderJs` | `never` / `auto` | `never` | Reserved. `auto` currently behaves like `never`. |
| `timeoutSecs` | integer 5 to 30 | `15` | Per-URL fetch timeout. |

Minimal input:

```json
{ "urls": ["https://www.ikea.com/us/en/p/billy-bookcase-white-20522046/"] }
```

With options:

```json
{
  "urls": ["https://shop.example.com/products/trail-mug?variant=1003"],
  "variantStrategy": "url_param",
  "proxy": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] },
  "timeoutSecs": 20
}
```

#### Errors

Failed URLs produce `{ "status": "error", "input": "...", "url": "...", "error": { "code": "...", "message": "..." } }` in the same dataset:

| Code | Meaning | Charged |
|---|---|---|
| `NO_OFFER` | Page loaded, no price found (the row keeps `name` and `sourcesFound`). | Yes, `no-offer` |
| `BLOCKED` | 403/429, captcha or challenge page. | No |
| `FETCH_FAILED` | Network error, 4xx/5xx, or not an HTML page. | No |
| `INVALID_URL` | Not a public http(s) URL. | No |
| `TIMEOUT` | Fetch timed out. | No |
| `BUDGET_EXHAUSTED` | Maximum charge reached. | No |

### Use with AI agents (MCP)

Agents find this actor by searching the Apify Store for "product price API", "price and availability" or "schema.org product". Connect any MCP client (Claude, Cursor, VS Code, n8n AI Agent) to:

```text
https://mcp.apify.com?tools=apricot_blackberry/product-offer-extractor
```

Example `call-actor` arguments. Only `urls` is required; put the spending cap in `callOptions.maxTotalChargeUsd`, never in the input:

```json
{
  "actor": "apricot_blackberry/product-offer-extractor",
  "input": { "urls": ["https://www.ikea.com/us/en/p/billy-bookcase-white-20522046/"] },
  "callOptions": { "maxTotalChargeUsd": 0.05 }
}
```

Each row says which source produced `price`, `currency` and `availability` (`fieldSources`) and a 0 to 1 `confidence`, so an agent can cite it. Always set `maxTotalChargeUsd`: when it is reached the remaining URLs come back as free `BUDGET_EXHAUSTED` rows. For a single lookup inside a chat turn, the Standby `GET /offer` below is faster.

### API

Run the actor and fetch the rows in one call (`maxTotalChargeUsd` is a query parameter, not input):

```bash
curl -X POST "https://api.apify.com/v2/acts/apricot_blackberry~product-offer-extractor/run-sync-get-dataset-items?maxTotalChargeUsd=0.05" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "content-type: application/json" \
  -d '{"urls":["https://www.ikea.com/us/en/p/billy-bookcase-white-20522046/"]}'
```

Spreadsheet export: `https://api.apify.com/v2/datasets/<datasetId>/items?view=flat&format=csv`.

JavaScript (`npm install apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('apricot_blackberry/product-offer-extractor').call(
    { urls: ['https://www.ikea.com/us/en/p/billy-bookcase-white-20522046/'] },
    { maxTotalChargeUsd: 0.05 },
);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const r of items) console.log(r.status, r.name, r.price, r.currency, r.availability);
```

Python (`pip install apify-client`):

```python
import os
from decimal import Decimal
from apify_client import ApifyClient

client = ApifyClient(token=os.environ["APIFY_TOKEN"])
run = client.actor("apricot_blackberry/product-offer-extractor").call(
    run_input={"urls": ["https://www.ikea.com/us/en/p/billy-bookcase-white-20522046/"]},
    max_total_charge_usd=Decimal("0.05"),
)
for row in client.dataset(run["defaultDatasetId"]).list_items().items:
    print(row["status"], row.get("name"), row.get("price"), row.get("currency"))
```

### Standby API (for agents)

Base URL `https://apricot-blackberry--product-offer-extractor.apify.actor` (copy the exact URL from the actor's API tab). Authenticate with `Authorization: Bearer <APIFY_TOKEN>`. Same events and prices as batch runs. p95 target: 2 s warm for HTTP-only pages; hard limit 10 s per request.

```text
GET https://apricot-blackberry--product-offer-extractor.apify.actor/offer?url=<url-encoded product url>&variant=<optional variant id or sku>
Authorization: Bearer <APIFY_TOKEN>
```

Success, HTTP 200: `{ "status": "ok", "offer": { ...same fields as a dataset row... } }`

Error envelope: `{ "status": "error", "error": { "code": "...", "message": "...", "httpStatus": 422 }, "requestId": "..." }`

| HTTP | Code |
|---|---|
| 400 | `INVALID_URL` |
| 422 | `NO_OFFER` (charged `no-offer`) |
| 502 | `FETCH_FAILED`, `BLOCKED` |
| 504 | `TIMEOUT` |
| 429 | `BUDGET_EXHAUSTED` |
| 500 | `INTERNAL` |

The readiness probe `GET /` with header `x-apify-container-server-readiness-probe` returns `200 {"ok":true}`. Standby uses the Actor's input defaults (proxy, `variantStrategy`, timeout); `variantStrategy: "all"` is treated as `url_param`.

### Integrations (n8n, Make, Zapier)

#### n8n (HTTP Request node)

- Method `GET`, URL `https://apricot-blackberry--product-offer-extractor.apify.actor/offer`
- Query parameter `url` = `{{ $json.productUrl }}` (n8n encodes it)
- Header `Authorization` = `Bearer <APIFY_TOKEN>`
- Next node: Google Sheets "Append row" with `{{ $json.offer.price }}` and `{{ $json.offer.availability }}`.

For scheduled batches use the Apify node "Run Actor", then "Get dataset items" with `view=flat`.

#### Make and Zapier

Use "Apify > Run an Actor" with the input `{"urls": ["..."]}`, then "Get Dataset Items" (view `flat`) and map `price`, `currency`, `availability` into your Sheet or database. Zapier works the same way with its Apify app.

### FAQ

**Which stores work?** Any page that publishes schema.org Product data, microdata or OpenGraph product tags, which includes most Shopify, WooCommerce and BigCommerce stores. Amazon is not supported.

**Am I charged when no price is found?** $0.0005 at the FREE tier ($0.0004 at SILVER and above). Errors are free.

**How do agents call it?** Through MCP or the Standby `GET /offer?url=`.

**Why did I get a price from a different variant?** The row's `variant.selection` tells you. Pass `?variant=<id>` in the URL, or set `variantStrategy`.

**Is the price real-time?** Each request fetches the page live and reads what the server returns at that moment. It does not render JavaScript, so prices injected only by scripts are not seen.

### Limits

- Reads only what the server returns in HTML: no JavaScript rendering, logins, carts or personalised prices.
- Sites that block automated requests return `BLOCKED` (free). Residential proxy usage is billed by Apify separately; set a maximum charge per run to cap spend. Large retailers such as Amazon, Walmart, LEGO, B\&H, Newegg and Etsy block most automated traffic.
- Body size is capped at 3 MB per page. Private, loopback and non-public hosts are rejected.
- Scraped content is data only; the Actor never follows instructions found in pages.

### Support

Built by Creator Fusion LLC (Creator Fusion Labs). Questions: contact@creatorfusion.net

If this Actor saved you time, please leave a review on its [Apify Store page](https://apify.com/apricot_blackberry/product-offer-extractor). Honest reviews, good or bad, are how other people decide whether to trust it, and we read every one. Found a problem? Open an issue on the Issues tab and we will fix it.

# Actor input Schema

## `urls` (type: `array`):

Product page URLs, one per line, 1 to 5,000 per run; one result row per URL. Any page that publishes schema.org Product data, microdata or OpenGraph product tags works (most Shopify, WooCommerce and BigCommerce stores). Amazon is not supported. Example: https://www.ikea.com/us/en/p/billy-bookcase-white-20522046/

## `variantStrategy` (type: `string`):

How to pick among variants on multi-variant pages. url_param uses the ?variant= value in the URL (matched against offer URLs and SKUs) and falls back to first_in_stock. all returns one row per variant and charges each row. Example: url_param

## `includeRawSources` (type: `boolean`):

Attach the raw JSON-LD blocks and OpenGraph tags to each row as raw. Adds size; useful for debugging. Example: false

## `renderJs` (type: `string`):

Reserved for a browser fallback. never (default) is HTTP-only. auto is accepted but currently behaves like never. Example: never

## `proxy` (type: `object`):

Apify Proxy settings in the standard proxy editor format (kept as the field name proxy). Defaults to Apify RESIDENTIAL proxy with browser-like headers, because many retailers block datacenter IPs; residential traffic is billed by Apify on top of the events. Example: {"useApifyProxy": true, "apifyProxyGroups": \["RESIDENTIAL"]}

## `useResidentialOnBlock` (type: `boolean`):

If the first attempt is blocked (HTTP 403/429 or a captcha page) and the proxy above is not already residential, retry once on RESIDENTIAL. Blocked pages end as BLOCKED error rows and are never charged. Example: true

## `timeoutSecs` (type: `integer`):

Fetch timeout per URL in seconds, an integer from 5 to 30. Example: 15

## Actor input object example

```json
{
  "urls": [
    "https://www.ikea.com/us/en/p/billy-bookcase-white-20522046/"
  ],
  "variantStrategy": "url_param",
  "includeRawSources": false,
  "renderJs": "never",
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "useResidentialOnBlock": true,
  "timeoutSecs": 15
}
```

# Actor output Schema

## `results` (type: `string`):

URL, product name, price, currency, availability, confidence and status per product URL.

## `flat` (type: `string`):

26 CSV-safe columns (variant, price source and error code flattened), ready for Google Sheets.

## `allItems` (type: `string`):

Every row with nested variant, fieldSources, sourcesFound, warnings and (with includeRawSources) raw.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://www.ikea.com/us/en/p/billy-bookcase-white-20522046/"
    ],
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("apricot_blackberry/product-offer-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": ["https://www.ikea.com/us/en/p/billy-bookcase-white-20522046/"],
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("apricot_blackberry/product-offer-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.ikea.com/us/en/p/billy-bookcase-white-20522046/"
  ],
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call apricot_blackberry/product-offer-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apricot_blackberry/product-offer-extractor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/QOGFzIjrlqsfAdfnz/builds/Tq7mqhYN6WtsDT8ZA/openapi.json
