# Ecommerce Product Data Scraper with CSS Selectors

**Use case:** 

Extract product titles, prices, availability, links, and metadata from static ecommerce pages with fast HTTP requests and no-code CSS selectors.

## Input

```json
{
  "startUrls": [
    {
      "url": "https://books.toscrape.com/"
    }
  ],
  "extractionRules": [
    {
      "name": "products",
      "selector": ".product_pod h3 a",
      "type": "attribute",
      "attribute": "title",
      "multiple": true
    },
    {
      "name": "prices",
      "selector": ".product_pod .price_color",
      "type": "text",
      "multiple": true
    }
  ],
  "pageFunction": "",
  "linkSelector": "a[href]",
  "globs": [
    {
      "glob": "https://books.toscrape.com/catalogue/**"
    }
  ],
  "excludes": [
    {
      "glob": "**/*.{jpg,jpeg,png,gif,svg,pdf,zip}"
    }
  ],
  "sameDomainOnly": true,
  "maxCrawlingDepth": 1,
  "maxPagesPerCrawl": 1,
  "maxResultsPerCrawl": 1,
  "includePageMetadata": true,
  "includeJsonLd": true,
  "removeEmptyFields": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "additionalHeaders": {},
  "maxConcurrency": 20,
  "maxRequestRetries": 3,
  "requestTimeoutSecs": 45,
  "respectRobotsTxtFile": true,
  "customData": {},
  "debugLog": false
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "link"
  },
  "statusCode": {
    "label": "Status"
  },
  "title": {
    "label": "Title"
  },
  "description": {
    "label": "Description"
  },
  "canonicalUrl": {
    "label": "Canonical",
    "format": "link"
  },
  "language": {
    "label": "Language"
  },
  "h1": {
    "label": "Headings",
    "format": "array"
  },
  "image": {
    "label": "Image",
    "format": "link"
  }
}
```

## How it works

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

The No-Code CSS Selector Scraper - Fast Cheerio HTTP Crawler Actor is ready to run with the inputs already set for "Ecommerce Product Data Scraper with CSS Selectors". [Sign up or log in](https://console.apify.com/create-task-from-example/L9p6pMvWZOSSdfL7d) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Ecommerce Product Data Scraper with CSS Selectors" task

The No-Code CSS Selector Scraper - Fast Cheerio HTTP Crawler Actor will start running based on the input automatically. You can also change all the input fields, like start urls, CSS extraction rules, and more, to match your specific use case.

### 3. Receive the "Ecommerce Product Data Scraper with CSS Selectors" 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 URL, status, title, 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 "Ecommerce Product Data Scraper with CSS Selectors" task via API](https://apify.com/sonic_scraper/cheerio-web-scraper.md).

## About this Actor

This example demonstrates how to use [No-Code CSS Selector Scraper - Fast Cheerio HTTP Crawler](https://apify.com/sonic_scraper/cheerio-web-scraper.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/sonic_scraper/cheerio-web-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/sonic_scraper/cheerio-web-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`).
