---
title: "POST /v1/data/url/scrape"
method: POST
path: "/v1/data/url/scrape"
---

# POST /v1/data/url/scrape

`POST /v1/data/url/scrape`

## Request

- Base URL: `https://api.nano-gpt.com/api`
- URL: `https://api.nano-gpt.com/api/v1/data/url/scrape`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
  - none

Public Data API facade for URL scraping. Supports normal API-key billing and accountless x402 quotes when called without Authorization or x-api-key and with x-x402: true. The request body uses urls: [...].

## Headers

- `x-x402` 'true'

## Request body

- ScrapeUrlsRequest
  - `urls` string[], required: Array of URLs to scrape (maximum 5 URLs per request)

## Response `200`

Web scraping response with results for each URL

- ScrapeUrlsResponse
  - `results` object[], required: Array of scraping results for each URL
    - `url` string, required: The URL that was scraped
    - `success` boolean, required: Whether the scraping was successful
    - `title` string: Page title if successfully scraped
    - `content` string: Raw HTML content
    - `markdown` string: Formatted markdown version of the content
    - `error` string: Error message if scraping failed
  - `summary` object, required
    - `requested` number, required: Number of URLs in the original request
    - `processed` number, required: Number of valid URLs that were processed
    - `successful` number, required: Number of URLs successfully scraped
    - `failed` number, required: Number of URLs that failed to scrape
    - `totalCost` number, required: Total cost in USD (only for successful scrapes)

## Other responses

- `400`: Bad Request - Please provide an array of URLs to scrape
- `401`: Unauthorized - Invalid session or API key
- `402`: Payment Required - authenticated insufficient balance or opted-in accountless x402 quote
- `429`: Too Many Requests - Rate limit exceeded
- `500`: Internal Server Error - An error occurred while processing your request

## Changes

- **2026-11-03** `cc8b07d75689`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nano-gpt/apis/nanogpt-api/changes/v1/data/url/scrape/post.md)

---

[API](https://skmtc.dev/nano-gpt/apis/nanogpt-api.md) - [All operations](https://skmtc.dev/nano-gpt/apis/nanogpt-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nano-gpt/apis/nanogpt-api/revisions/cc8b07d75689?raw)
