> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hydrafetch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hydrafetch

> Turn any URL into clean Markdown and structured data your model can use. Scrape, crawl, search and extract — one API, one credit a page.

Hydrafetch is a web data API for LLMs and agents. Send a URL and get back clean Markdown, the page's own structured data, schema-shaped JSON, links, or a summary. Both panels below are real responses from the live API — the same Wikipedia article, scraped two different ways.

<div className="hidden dark:block">
  <Columns cols={2}>
    <Card title="Clean Markdown" img="https://mintcdn.com/hydrafetch/adU8jiad9sEhYAfC/images/home/scrape-dark.png?fit=max&auto=format&n=adU8jiad9sEhYAfC&q=85&s=45116734948713005f264ca683ef06bc" href="/endpoints/scrape" width="2400" height="800" data-path="images/home/scrape-dark.png">
      The page ships 59,769 tokens of nav, scripts and boilerplate. Your model reads
      6,831 tokens of article.
    </Card>

    <Card title="Structured data" img="https://mintcdn.com/hydrafetch/adU8jiad9sEhYAfC/images/home/structured-dark.png?fit=max&auto=format&n=adU8jiad9sEhYAfC&q=85&s=e185f579558e9705cd378eb91b9057ed" href="/concepts/formats" width="2400" height="800" data-path="images/home/structured-dark.png">
      Every page also comes back as normalized fields — title, site, type, language,
      published date — with no LLM involved.
    </Card>
  </Columns>
</div>

<div className="block dark:hidden">
  <Columns cols={2}>
    <Card title="Clean Markdown" img="https://mintcdn.com/hydrafetch/adU8jiad9sEhYAfC/images/home/scrape-light.png?fit=max&auto=format&n=adU8jiad9sEhYAfC&q=85&s=d2f9d34db3e6ae50370e1f496b30a088" href="/endpoints/scrape" width="2400" height="800" data-path="images/home/scrape-light.png">
      The page ships 59,769 tokens of nav, scripts and boilerplate. Your model reads
      6,831 tokens of article.
    </Card>

    <Card title="Structured data" img="https://mintcdn.com/hydrafetch/adU8jiad9sEhYAfC/images/home/structured-light.png?fit=max&auto=format&n=adU8jiad9sEhYAfC&q=85&s=2f3c346170148fe90c6fbfbc2ad5c6e9" href="/concepts/formats" width="2400" height="800" data-path="images/home/structured-light.png">
      Every page also comes back as normalized fields — title, site, type, language,
      published date — with no LLM involved.
    </Card>
  </Columns>
</div>

## Building with an agent

These docs are written to be read by a model as well as a person. Every page is available as
Markdown by appending `.md` to its URL, and the API describes itself at
[`/mcp/tools`](https://api.hydrafetch.com/mcp/tools) and
[`/openapi.json`](https://api.hydrafetch.com/openapi.json), both without a key.

The fastest way to start is to let your agent read that and wire it up:

```text Prompt theme={null}
Read https://hydrafetch.com/agents.md and set up Hydrafetch in this project.

Use the HYDRAFETCH_API_KEY environment variable, never a hardcoded key. Then make one scrape call against a URL that is relevant to what this project does, and show me the markdown it returns and what it cost.
```

Published skills go further: [`where-to-use-hydrafetch`](https://hydrafetch.com/.well-known/agent-skills/where-to-use-hydrafetch/SKILL.md)
audits a codebase for where we fit, and the
[full index](https://hydrafetch.com/.well-known/agent-skills/index.json) covers scraping for
context, company research, schema extraction and dataset building.

## Start here

<CardGroup cols={3}>
  <Card title="Scrape" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/markdown.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=99978311844d5cd234e2eda5718b96f8" href="/endpoints/scrape" width="18" height="18" data-path="icons/markdown.svg">
    One URL in, clean Markdown and structured data out. The core primitive.
  </Card>

  <Card title="Map" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/route.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=a90e59c4049b15132bda8bdb33dae436" href="/endpoints/map" width="18" height="18" data-path="icons/route.svg">
    Discover every URL on a site, fast, before you decide what to pull.
  </Card>

  <Card title="Crawl" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/spider-web.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=8e85f0aba01eebd1c66a46d77891383e" href="/endpoints/crawl" width="18" height="18" data-path="icons/spider-web.svg">
    Walk a whole site and scrape every page as one asynchronous job.
  </Card>

  <Card title="Search" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/globe-search.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=c6b1e0d936179bfd17cf422c976cde8e" href="/endpoints/search" width="18" height="18" data-path="icons/globe-search.svg">
    Run a query and get ranked results, each scraped to clean data.
  </Card>

  <Card title="Extract" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/brackets-sparkle.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=07468c79969f3468b9c0aed4e71ac90a" href="/endpoints/extract" width="18" height="18" data-path="icons/brackets-sparkle.svg">
    Pull schema-shaped JSON from pages, with per-field confidence and sources.
  </Card>

  <Card title="Media" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/image.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=0fea9a1d13e00de7a3a82e670ef0a255" href="/endpoints/media" width="18" height="18" data-path="icons/image.svg">
    Capture a full-page screenshot or collect a page's images.
  </Card>
</CardGroup>

## Why Hydrafetch

<Columns cols={2}>
  <Card title="LLM-ready by default" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/markdown.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=99978311844d5cd234e2eda5718b96f8" horizontal width="18" height="18" data-path="icons/markdown.svg">
    Output is clean Markdown and normalized structured data. No boilerplate, no
    navigation cruft, no half-rendered pages.
  </Card>

  <Card title="One surface for the whole job" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/layers.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=eed78667f725d33cd5193a7118a8ba5c" horizontal width="18" height="18" data-path="icons/layers.svg">
    Scrape, crawl, map, search, and extract share the same options and the same clean
    response shape.
  </Card>

  <Card title="Trustworthy extraction" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/target.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=379230e902df6dcb6c68987271563188" horizontal width="18" height="18" data-path="icons/target.svg">
    Structured extraction can return, per field, how confident it is and the exact
    passage a value came from.
  </Card>

  <Card title="Predictable cost" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/gauge.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=70970b1e5a9495b267194e7bbc11d0d7" horizontal width="18" height="18" data-path="icons/gauge.svg">
    Every call is billed in credits, charged only on success, and each response tells
    you what it consumed.
  </Card>
</Columns>

## Your first call

Send a URL, get clean Markdown back.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.hydrafetch.com/v1/web/scrape \
    -H "X-API-Key: $HYDRAFETCH_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "url": "https://example.com" }'
  ```

  ```ts TypeScript theme={null}
  const res = await fetch("https://api.hydrafetch.com/v1/web/scrape", {
    method: "POST",
    headers: {
      "X-API-Key": process.env.HYDRAFETCH_API_KEY!,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ url: "https://example.com" }),
  });

  const { data } = await res.json();
  console.log(data.markdown);
  ```

  ```python Python theme={null}
  import os, requests

  res = requests.post(
      "https://api.hydrafetch.com/v1/web/scrape",
      headers={"X-API-Key": os.environ["HYDRAFETCH_API_KEY"]},
      json={"url": "https://example.com"},
  )
  print(res.json()["data"]["markdown"])
  ```
</CodeGroup>

## How it works

<Steps>
  <Step title="Get an API key">
    Every request carries your key in the `X-API-Key` header. See [Authentication](/authentication).
  </Step>

  <Step title="Call an endpoint">
    Send a URL, or a query, to the endpoint that fits your job. Most calls return clean
    data synchronously.
  </Step>

  <Step title="Get clean data back">
    Responses are LLM-ready: Markdown, structured entities, extracted JSON, links,
    summaries, or images.
  </Step>
</Steps>

## Base URL

All endpoints live under a single versioned base URL:

```
https://api.hydrafetch.com/v1/web
```

Ready to make your first call? Head to the [Quickstart](/quickstart).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.