---
title: "AgentSearch Web Extract"
method: POST
path: "/v1/agentsearch-web-extract-v1"
tags: ["web"]
---

# AgentSearch Web Extract

`POST /v1/agentsearch-web-extract-v1`

## Request

- Base URL: `https://agent.pocket.network`
- URL: `https://agent.pocket.network/v1/agentsearch-web-extract-v1`
- Auth: none required

Fetch a URL and get it back ready for an LLM or RAG pipeline: clean markdown (headings and links kept), plain text, the title, the page's links and fetch metadata. POST /v1/extract with {url} and optional formats and max_chars. JSON in, JSON out, errors included. Pay per request in USDC; no account, no API key.

## Request body

- object: An extraction request. The body is JSON and is bounded by the service at 16 KiB.
  - `url` string, required: The page to fetch (http or https).
  - `formats` string[]: Which renderings to return. Defaults to the service's own choice.
  - `max_chars` integer: Cap on returned characters (default 50000).

## Response `200`

The upstream response, served after payment settles.

- object: For POST /v1/extract, a JSON object with request_id, url, title, markdown, text, links (href and text), meta (status_code, content_type, fetched_at, chars, truncated) and error (null on success). A bad request answers 400 with `{ error: { code, message, request_id } }`.

## Other responses

- `400`: Malformed request.
- `402`: Payment required. The x402 v2 terms are in the PAYMENT-REQUIRED header and, identically, in this body; sign the chosen option and retry with the PAYMENT-SIGNATURE header. The receipt arrives in PAYMENT-RESPONSE.
- `503`: This service is not currently available to serve.

---

[API](https://skmtc.dev/pocket/apis/pocket-agentic-portal.md) · [All operations](https://skmtc.dev/pocket/apis/pocket-agentic-portal/llms.txt) · [OpenAPI document](https://skmtc.dev/pocket/apis/pocket-agentic-portal/revisions/96d2176db014?raw)
