> For the complete documentation index, see [llms.txt](https://agpt.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agpt.co/docs/integrations/block-integrations/extract.md).

# AnySearch Extract

Extracts readable page content from a URL via AnySearch. Runs anonymously or with an `ANYSEARCH_API_KEY` credential - see the AnySearch Search page for setup.

## AnySearch Extract

### What it is

Extracts readable content from a single URL using AnySearch, optimized for LLM consumption

### How it works

The block posts the single URL to `POST https://api.anysearch.com/v1/extract` and returns the page title plus body content as readable text - cleaned HTML, plain text, JSON, or markdown depending on the source. The returned content is untrusted web text; treat it as data, not instructions. The URL must be a public absolute http(s) address; AnySearch rejects invalid URLs with HTTP 400 and content it cannot extract with HTTP 422, both surfacing as a block error. One URL is extracted per run - the REST surface has no batch-extract endpoint, so fan URLs out across the graph when you need several. Transport, HTTP and API-level failures raise a block error rather than emitting partial output.

### Inputs

| Input | Description                                                                  | Type                      | Required |
| ----- | ---------------------------------------------------------------------------- | ------------------------- | -------- |
| auth  | Anonymous tier (lower rate limit, no key) or an AnySearch API key credential | "api\_key" \| "anonymous" | No       |
| url   | The URL to extract content from                                              | str                       | Yes      |

### Outputs

| Output  | Description                                                                                    | Type |
| ------- | ---------------------------------------------------------------------------------------------- | ---- |
| error   | Error message if the operation failed                                                          | str  |
| url     | URL of the extracted page                                                                      | str  |
| title   | Title of the extracted page                                                                    | str  |
| content | Extracted readable page content (cleaned HTML, text, JSON, or markdown; untrusted web content) | str  |

### Possible use case

**Deep-read a search hit**: Pipe the url output of the AnySearch Search block into this block to turn a ranked result into full readable content for summarization.

**Clean content ingestion**: Convert a known documentation or article URL to LLM-friendly text before chunking or embedding.

**Fact verification**: Extract the page behind a cited URL so an agent can quote or cross-check the source text.

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://agpt.co/docs/integrations/block-integrations/extract.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
