# Scrape a list page into a JSON array with your own schema

**Use case:** 

Write your own JSON Schema with an array to get every item of a category, search or listing page in one record. This example lists every book on a Books to Scrape category page with its title, price as a number and stock. The schema is checked on every page; pages whose answer still fails it are free.

## Input

```json
{
  "startUrls": [
    {
      "url": "https://books.toscrape.com/catalogue/category/books/poetry_23/index.html"
    }
  ],
  "preset": "product",
  "jsonSchema": {
    "type": "object",
    "properties": {
      "category": {
        "type": "string",
        "description": "Category name shown on the page"
      },
      "books": {
        "type": "array",
        "description": "Every book listed on this page, in page order",
        "items": {
          "type": "object",
          "properties": {
            "title": {
              "type": "string"
            },
            "price": {
              "type": "number",
              "description": "Price as a number, without the £ sign"
            },
            "inStock": {
              "type": "boolean"
            }
          },
          "required": [
            "title",
            "price",
            "inStock"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "category",
      "books"
    ],
    "additionalProperties": false
  },
  "model": "claude-haiku-5-5",
  "maxPageChars": 60000,
  "maxRetriesOnInvalid": 1,
  "respectRobotsTxt": true,
  "includePageText": false
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "link"
  },
  "status": {
    "label": "Status"
  },
  "valid": {
    "label": "Valid",
    "format": "boolean"
  },
  "data": {
    "label": "Data",
    "format": "object"
  },
  "preset": {
    "label": "Preset"
  },
  "validationErrors": {
    "label": "Validation errors",
    "format": "array"
  },
  "truncated": {
    "label": "Truncated",
    "format": "boolean"
  },
  "model": {
    "label": "Model"
  },
  "error": {
    "label": "Error"
  }
}
```

## How it works

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

The AI Web Scraper – JSON Schema Data Extractor Actor is ready to run with the inputs already set for "Scrape a list page into a JSON array with your own schema". [Sign up or log in](https://console.apify.com/create-task-from-example/hglyRfsxiRzQdVKu9) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Scrape a list page into a JSON array with your own schema" task

The AI Web Scraper – JSON Schema Data Extractor Actor will start running based on the input automatically. You can also change all the input fields, like start urls, preset schema, and more, to match your specific use case.

### 3. Receive the "Scrape a list page into a JSON array with your own schema" 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, valid, 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 "Scrape a list page into a JSON array with your own schema" task via API](https://apify.com/brisaworks/schema-json-extractor.md).

## About this Actor

This example demonstrates how to use [AI Web Scraper – JSON Schema Data Extractor](https://apify.com/brisaworks/schema-json-extractor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/brisaworks/schema-json-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/brisaworks/schema-json-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`).
