# Price From Any URL API (`khadinakbar/price-from-url-api`) Actor

Extract current public product price, currency, availability, and title from any product-page URL. MCP-ready JSON for agents and price pipelines.

- **URL**: https://apify.com/khadinakbar/price-from-url-api.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** E-commerce, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 validated price extracteds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Price From Any URL API

Extract the **current public product price, currency, and availability** from any product-detail URL you already have. Paste up to 50 HTTP(S) product pages, and receive one validated dataset row per accepted URL with price, currency, title, stock signal when exposed, source URL, and ISO 8601 collection time.

This is a lean **price-from-URL** API for agents, sheets, and price-check workflows—not a competitor-monitoring suite. For same-currency own-vs-competitor gaps and alert flags, use the sibling Actor [`wiser-alternative`](https://apify.com/khadinakbar/wiser-alternative). Choose a dedicated marketplace Actor when you need catalog search, reviews, or site-specific listing discovery.

### Best fit

Use when you already have public product URLs (from a feed, scrape, or CRM) and need a reproducible price snapshot for MCP tools, BI, or internal review. It returns public price, currency, availability, brand/SKU/GTIN when exposed, retailer hostname, extraction and retrieval methods, source and canonical URLs, and `collectedAt`.

A row is billable only after both a public product title and a current price have been validated and written to the dataset. Pages that expose neither, or only one of those fields, produce no `price-extracted` charge.

### Input

`urls` is the only required field: a list of 1–50 public product-detail URLs.

```json
{
    "urls": [
        "https://www.nike.com/t/air-force-1-07-mens-shoes-WrLlWX/CW2288-111"
    ],
    "maxConcurrency": 3,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
}
```

`maxConcurrency` (1–5, default 3) limits simultaneous page fetches. Residential proxy is the recommended default for many retailers; platform proxy usage is billed separately to the run user under PPE usage pass-through.

### Output

Each dataset item is one current public product-page price extraction.

| Field | Meaning |
| ----- | ------- |
| `price`, `currency` | Current public price and ISO currency when exposed. |
| `originalPrice`, `availability` | Pre-discount price and stock signal when exposed. |
| `sku`, `gtin`, `brand` | Public product identifiers when exposed. |
| `retailer` | Hostname-derived retailer label. |
| `extractionMethod`, `retrievalMethod` | `json_ld` / `meta_html`, plus `static_html` or `rendered_page`. |
| `sourceUrl`, `canonicalUrl`, `collectedAt` | Evidence and freshness (ISO 8601). |
| `provenance` | Always `public_product_page` for accepted rows. |

```json
{
    "resultId": "0:2026-09-17T12:00:00.000Z",
    "productTitle": "Air Force 1 '07",
    "price": 115,
    "currency": "USD",
    "originalPrice": null,
    "availability": "in_stock",
    "brand": "Nike",
    "sku": "CW2288-111",
    "gtin": null,
    "imageUrl": "https://example.com/af1.jpg",
    "sourceUrl": "https://www.nike.com/t/air-force-1-07-mens-shoes-WrLlWX/CW2288-111",
    "canonicalUrl": "https://www.nike.com/t/air-force-1-07-mens-shoes-WrLlWX/CW2288-111",
    "retailer": "nike.com",
    "extractionMethod": "json_ld",
    "retrievalMethod": "static_html",
    "collectedAt": "2026-09-17T12:00:00.000Z",
    "provenance": "public_product_page"
}
```

Every run also writes `OUTPUT` and `RUN_SUMMARY` in the default key-value store. Terminal outcomes are `COMPLETE`, `PARTIAL`, `VALID_EMPTY`, `INVALID_INPUT`, `UPSTREAM_FAILED`, or `CONFIG_ERROR`. A successful platform status alone is not proof of useful data—inspect the dataset and these terminal records.

### How it works

1. Validate `urls` (1–50 HTTP/HTTPS product pages).
2. Fetch each page over static HTML first (JSON-LD Product offer preferred, then product meta / constrained DOM).
3. If static HTML lacks a validated title+price pair, queue a bounded rendered-page fallback for that URL.
4. Persist only rows with both a product title and a current price; charge `price-extracted` once per persisted row.
5. Write `OUTPUT` / `RUN_SUMMARY` with accepted counts, fallback telemetry, and named-event reconciliation.

A generic landing-page title paired only with a bare `.price` element is rejected as a false positive so hollow marketing pages are not billed.

### Sibling route: wiser-alternative

| Need | Actor |
| ---- | ----- |
| Price + currency from URLs you already have | **price-from-url-api** (this Actor) |
| Own price vs competitor URLs, same-currency gap, alert threshold | [`wiser-alternative`](https://apify.com/khadinakbar/wiser-alternative) |

Both share the same public-page extraction spine. This Actor omits comparison, own-price, and alert fields.

### Pricing and cost controls

**Pay per event (PPE)** with caller-paid platform usage:

| Event | Price (USD) |
| ----- | ----------- |
| `apify-actor-start` | $0.00005 |
| `price-extracted` (primary) | $0.015 |

One `price-extracted` event is charged only after the page provides both a product title and a current price and the row is persisted. Invalid input, empty pages, and transport failures do not create that event.

Apify compute and any selected proxy usage are billed separately to the run user. Keep batches small while evaluating a retailer and set an Apify run charge cap that matches your budget. This Actor makes no external paid data-provider API calls beyond Apify Proxy when you enable it.

Example: a ten-URL batch that yields eight validated rows creates eight `price-extracted` events plus the run-start event and applicable platform usage.

### API example

```bash
curl -X POST 'https://api.apify.com/v2/acts/khadinakbar~price-from-url-api/runs?token=YOUR_APIFY_TOKEN' \
  -H 'content-type: application/json' \
  -d '{
    "urls": ["https://www.nike.com/t/air-force-1-07-mens-shoes-WrLlWX/CW2288-111"],
    "maxConcurrency": 1
  }'
```

Retrieve the default dataset and the `OUTPUT` record from the run before treating prices as actionable.

### AI-agent / MCP prompt card

> For each provided public product URL, return the latest validated price, currency, availability, source URL, and collection time. Do not invent prices. Treat `PARTIAL`, `VALID_EMPTY`, `INVALID_INPUT`, and `UPSTREAM_FAILED` as deliberate outcomes. Prefer this Actor for raw price-from-URL; use wiser-alternative when the caller supplies an own price and needs a same-currency gap.

An MCP agent should inspect the dataset plus `OUTPUT` before continuing. Retry a corrected public product URL, or route a site-specific catalog need to a dedicated marketplace Actor.

### Honest limits

- Public product pages only. Login walls, private pricing, and cart-only totals are out of contract.
- No SKU matching, currency conversion, historical archives, MAP enforcement, or automated repricing.
- Some retailers block static and rendered fetches; those URLs finish as request failures or no-price outcomes without a hollow success.
- Variant / size / region prices may differ from the default offer the page exposes—confirm on the source URL before commercial decisions.
- Respect each retailer’s terms of service and applicable law. You are responsible for lawful use of the returned public data.

### FAQ

**Why did a URL return no row?** The page did not expose both a product title and a parseable current price after static and (when queued) rendered recovery, or the request failed upstream.

**Is SUCCEEDED enough?** No. Check dataset row count, `OUTPUT.outcome`, `RUN_SUMMARY`, and `price-extracted` charges.

**Can I compare against my own price?** Use [`wiser-alternative`](https://apify.com/khadinakbar/wiser-alternative) for that workflow.

### Support

Open an Issue on the Actor page for reproducible failures (URL, run ID, expected vs observed). Custom pipelines and dedicated retailer routes are available on request.

# Changelog

This Actor's version history is a separate document: https://apify.com/khadinakbar/price-from-url-api/changelog.md

# Actor input Schema

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

Public HTTP(S) product-detail URLs to extract prices from. One validated price row is charged only when both a product title and a current price are persisted.

## `maxConcurrency` (type: `integer`):

Limits simultaneous public-page requests. Use a low value for sensitive retailers. Default: 3.

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy configuration for public product pages. Platform usage is billed separately to the run user.

## Actor input object example

```json
{
  "urls": [
    "https://www.nike.com/t/air-force-1-07-mens-shoes-WrLlWX/CW2288-111"
  ],
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `prices` (type: `string`):

One validated public product-price row per accepted URL.

## `compactOutput` (type: `string`):

Outcome, accepted count, rendered fallback telemetry, failure counts, and charged event counts.

## `runSummary` (type: `string`):

Detailed terminal diagnostics, retrieval-route telemetry, and public-data boundary.

# 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.nike.com/t/air-force-1-07-mens-shoes-WrLlWX/CW2288-111"
    ],
    "maxConcurrency": 3,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/price-from-url-api").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.nike.com/t/air-force-1-07-mens-shoes-WrLlWX/CW2288-111"],
    "maxConcurrency": 3,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/price-from-url-api").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.nike.com/t/air-force-1-07-mens-shoes-WrLlWX/CW2288-111"
  ],
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call khadinakbar/price-from-url-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/price-from-url-api"
        }
    }
}
```

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/otrAvGG6aqpotpIde/builds/o0PyVHZfzbSxPiAS6/openapi.json
