# Get product data from online stores via API

**Use case:** 

Get structured product data from store pages without writing a scraper per shop. Give the task product URLs from different stores and it returns name, description, SKU, images, price and currency from the schema.org and Open Graph data each page publishes. The example input mixes a custom shop and a Shopify store.

## Input

```json
{
  "startUrls": [
    {
      "url": "https://www.adafruit.com/product/4296"
    },
    {
      "url": "https://www.muji.us/products/body-fit-cushion"
    }
  ],
  "maxItems": 50,
  "crawl": false,
  "maxPagesPerCrawl": 50,
  "maxConcurrency": 5
}
```

## Output

```json
{
  "name": {
    "label": "Name",
    "format": "text"
  },
  "brand": {
    "label": "Brand",
    "format": "text"
  },
  "price": {
    "label": "Price",
    "format": "number"
  },
  "priceCurrency": {
    "label": "Currency",
    "format": "text"
  },
  "availability": {
    "label": "Availability",
    "format": "text"
  },
  "sku": {
    "label": "SKU",
    "format": "text"
  },
  "ratingValue": {
    "label": "Rating",
    "format": "number"
  },
  "url": {
    "label": "URL",
    "format": "link"
  }
}
```

## How it works

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

The Product Data API & Scraper - Prices & Stock Actor is ready to run with the inputs already set for "Get product data from online stores via API". [Sign up or log in](https://console.apify.com/create-task-from-example/UfZDwVuwYhv70Ndzm) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Get product data from online stores via API" task

The Product Data API & Scraper - Prices & Stock Actor will start running based on the input automatically. You can also change all the input fields, like start urls, max results, and more, to match your specific use case.

### 3. Receive the "Get product data from online stores via API" 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 name, brand, price, 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 "Get product data from online stores via API" task via API](https://apify.com/rocketyard/product-schema-scraper.md).

## FAQ

### How do I call the product data API from code?

Send the product data API task's input in a POST to https://api.apify.com/v2/acts/rocketyard~product-schema-scraper/run-sync-get-dataset-items with your Apify API token. The response is the product list as JSON.

### Which stores does it work on?

The product data API task works on pages that publish schema.org Product data or Open Graph product tags, as most Shopify and WooCommerce stores do. Pages without it return a free error item saying so.

### Why does one page return several records?

A page can publish one record per variant, such as size or color. The product data API task returns each of them, and the type field tells a ProductGroup apart from a Product.

## About this Actor

This example demonstrates how to use [Product Data API & Scraper - Prices & Stock](https://apify.com/rocketyard/product-schema-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/rocketyard/product-schema-scraper.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/rocketyard/product-schema-scraper.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`).
