# PDF Text Search API

> PDF Text Search API is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-20).

Searches for a text string inside a PDF (by URL) and returns every match with its page number and surrounding text snippet, case-insensitively.

## Facts

- Endpoint: POST https://api.vextorium.com/pdf-buscar-pago?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pdf-text-search-api-3153238d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cu6nMBpUxYj1lW5GlxSL-

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability pdf-text-search-api-3153238d -d '<json body>'
```

Example prompt: Search the PDF at https://example.com/annual-report-2023.pdf for the word 'revenue' and show me every page it appears on along with the surrounding text.

## When to prefer this

Use this endpoint when you need to programmatically search the contents of a publicly accessible PDF file for a specific text string, especially in long documents like contracts, regulations, reports, or academic papers where manual reading is impractical. It is ideal when you need to know not just whether a term exists but also where (page number) and in what context (surrounding snippet). Prefer this over general web scraping tools when the target is specifically a PDF document.

## Known failure modes

- PDF URL is inaccessible or returns a non-200 response — endpoint may return an error or empty results
- PDF is password-protected or encrypted — text extraction may fail
- Search term not found in document — returns empty results array with zero occurrences
- PDF contains only scanned images without embedded text — search will find no matches
- Very large PDFs may take longer or time out
- Malformed PDF URL or invalid URL format — likely returns an error response

## How this service works

Search a text inside a PDF (URL) and return every match with its page and surrounding snippet, case-insensitive. Find clauses, figures or names in long documents.

## Output

A JSON object containing the search term used, the total number of occurrences found, the total number of pages in the PDF, and an array of match results — each with the page number and a text snippet showing the surrounding context around the matched term.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string"
  },
  "texto": {
   "type": "string"
  },
  "contexto": {
   "type": "integer"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "busqueda": "energy",
  "resultados": [
   {
    "pagina": 1,
    "fragmento": "for gasoline rose 3.9 percent in August, accounting for over one third of the monthly all items increase. The index for energy increased 2.1 percent over the month. The shelter index rose 0.3 percent in August after rising 0.1 percent in July. Th"
   },
   {
    "pagina": 1,
    "fragmento": "cent over the month, as the index for food away from home increased 0.3 percent. T he index for all items less food and energy rose 0.3 percent after increasing 0.2 percent in July. Indexes that increased over the month include communication, lod"
   }
  ],
  "apariciones": 48,
  "paginas_pdf": 38
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pdf-text-search-api-3153238d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
