# Scrape a website into a structured JSON schema

**Use case:** 

Turn any web page into structured JSON that matches a schema you define — field-by-field extraction for AI agents, RAG, and data pipelines, no scraper code.

## Input

```json
{
  "urls": [
    "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html"
  ],
  "outputSchema": {
    "type": "object",
    "properties": {
      "title": {
        "type": "string"
      },
      "price": {
        "type": "string"
      },
      "availability": {
        "type": "string"
      }
    }
  },
  "maxInputTokens": 32000,
  "maxRuntimeSecs": 270,
  "proxyGeo": ""
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "string"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "result": {
    "label": "Result",
    "format": "object"
  },
  "schemaValid": {
    "label": "Schema valid",
    "format": "boolean"
  },
  "tokensUsed": {
    "label": "Tokens used",
    "format": "integer"
  },
  "inputTokens": {
    "label": "Input tokens",
    "format": "integer"
  }
}
```

## About this Actor

This example demonstrates how to use [Structured Data Extractor — URL to JSON](https://apify.com/shelvick/structured-extractor) with a specific input configuration. Visit the [Actor detail page](https://apify.com/shelvick/structured-extractor) to learn more, explore other use cases, and run it yourself.