# Read product prices and availability from product pages

**Use case:** 

Six product pages of a public online shop, one row per page: product name, SKU, brand, price and currency, availability, rating, the organization behind the shop and the breadcrumb path, all read from the schema.org markup the page publishes. Replace the list with your own product pages, or those of competitors, to build a price and stock table.

## Input

```json
{
  "startUrls": [
    "https://deathwishcoffee.com/products/light-roast-10oz",
    "https://deathwishcoffee.com/products/gingerdead-coffee",
    "https://deathwishcoffee.com/products/coconut-caramel-coffee",
    "https://deathwishcoffee.com/products/white-chocolate-pistachio-coffee",
    "https://deathwishcoffee.com/products/bodum-portable-french-press",
    "https://deathwishcoffee.com/products/fight-or-flight-sampler-kit"
  ],
  "crawlSameSite": false,
  "maxPagesPerSite": 20,
  "onlyPagesWithData": false,
  "includeRawJsonLd": false,
  "maxItems": 0,
  "onlyNew": false,
  "stateName": "default",
  "notifyWhenEmpty": false,
  "requestIntervalMs": 1000
}
```

## Output

```json
{
  "url": {
    "label": "Address that was requested",
    "format": "string"
  },
  "productName": {
    "label": "Name of the first Product found (Product, ProductGroup or IndividualProduct)",
    "format": "string"
  },
  "brand": {
    "label": "Brand name of that product",
    "format": "string"
  },
  "sku": {
    "label": "SKU of that product",
    "format": "string"
  },
  "gtin": {
    "label": "GTIN, EAN or UPC of that product (gtin, gtin8, gtin12, gtin13, gtin14)",
    "format": "string"
  },
  "price": {
    "label": "Price of the first offer as a number (null when missing or not a number)",
    "format": "number"
  },
  "priceCurrency": {
    "label": "Currency of the first offer, ISO 4217 code in capitals",
    "format": "string"
  },
  "availability": {
    "label": "Availability of the first offer without the schema.org prefix: InStock, OutOfStock, PreOrder ...",
    "format": "string"
  },
  "ratingValue": {
    "label": "Average rating from the product aggregateRating",
    "format": "number"
  },
  "ratingCount": {
    "label": "Number of ratings behind the average (ratingCount or reviewCount)",
    "format": "integer"
  },
  "offersCount": {
    "label": "Number of offers declared for the product (offerCount of an AggregateOffer, else the offers listed)",
    "format": "integer"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Structured Data Extractor: JSON-LD, Schema.org, Open Graph Actor is ready to run with the inputs already set for "Read product prices and availability from product pages". [Sign up or log in](https://console.apify.com/create-task-from-example/NYYDddM6gb16Oc6Pg) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Read product prices and availability from product pages" task

The Structured Data Extractor: JSON-LD, Schema.org, Open Graph Actor will start running based on the input automatically. You can also change all the input fields, like pages or websites, add more pages of the same site, and more, to match your specific use case.

### 3. Receive the "Read product prices and availability from product pages" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as address that was requested, name of the first product found (product, productgroup or individualproduct), brand name of that product, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Read product prices and availability from product pages" task via API](https://apify.com/rowcraft/structured-data-extractor.md).

## About this Actor

This example demonstrates how to use [Structured Data Extractor: JSON-LD, Schema.org, Open Graph](https://apify.com/rowcraft/structured-data-extractor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/rowcraft/structured-data-extractor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/rowcraft/structured-data-extractor.md

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`).
