> ## 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.

# Quickstart

> Make your first Hydrafetch call in under a minute.

## Let your agent do the setup

If you code with an agent, hand it this instead of reading the rest of this page. It reads our live endpoint list, looks at your project, and wires up the first call itself.

```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.
```

<Tip>
  Already have a codebase and want to know where this belongs in it? Paste [this
  prompt](https://hydrafetch.com/#where-it-fits) instead — it audits the repository and reports
  which scraping code we would replace, with file paths and a credit estimate.
</Tip>

## 1. Get your API key

Your key lives in your [dashboard](https://app.hydrafetch.com). It looks like `hf_...` and is scoped to your workspace, which holds your credit balance. Keep it secret — treat it like a password.

<Note>
  In the private beta, keys are provisioned for you. Email [team@hydrafetch.com](mailto:team@hydrafetch.com) to get one.
</Note>

## 2. Scrape your first page

Send a URL to `/v1/web/scrape` with your key in the `X-API-Key` header. By default you get back clean Markdown.

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

  ```javascript Node theme={null}
  const res = await fetch("https://api.hydrafetch.com/v1/web/scrape", {
    method: "POST",
    headers: {
      "X-API-Key": "hf_your_key_here",
      "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 requests

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

## 3. Read the response

Every scrape returns the page, the page's own metadata, how much to trust the extraction, and what the call cost:

```json theme={null}
{
  "data": {
    "url": "https://example.com",
    "finalUrl": "https://example.com/",
    "status": 200,
    "cached": false,
    "metadata": {
      "title": "Example Domain",
      "pageType": "article",
      "wordCount": 19,
      "description": "Illustrative examples in documents.",
      "language": "en",
      "author": null,
      "siteName": null,
      "publishedTime": null,
      "image": null
    },
    "quality": { "confidence": 0.94, "complete": true, "blocked": false },
    "usage": { "creditsUsed": 1, "creditsRemaining": 4999, "freshness": "fresh" },
    "markdown": "# Example Domain\n\nThis domain is for use in illustrative examples..."
  }
}
```

`metadata` is what the page declares about itself — any field the page doesn't publish comes back `null`. `quality` tells you how much to trust the extraction; see [Extraction quality](/concepts/quality).

## 4. Ask for more

Want more than Markdown? Request additional [formats](/concepts/formats):

```bash theme={null}
curl -X POST https://api.hydrafetch.com/v1/web/scrape \
  -H "X-API-Key: hf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "formats": ["markdown", "links", "structured"]
  }'
```

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/key.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=b93ecee0af6f88190e37943e72c84735" href="/authentication" width="18" height="18" data-path="icons/key.svg">
    How keys, workspaces, and credits fit together.
  </Card>

  <Card title="Formats" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/layers.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=eed78667f725d33cd5193a7118a8ba5c" href="/concepts/formats" width="18" height="18" data-path="icons/layers.svg">
    Markdown, structured data, extracted JSON, and more.
  </Card>

  <Card title="Crawl a whole site" icon="https://mintcdn.com/hydrafetch/DnAi7n_kype0jB2E/icons/sitemap.svg?fit=max&auto=format&n=DnAi7n_kype0jB2E&q=85&s=cffc277c9028dc4743694521f28f8088" href="/endpoints/crawl" width="18" height="18" data-path="icons/sitemap.svg">
    Go from one page to every page.
  </Card>

  <Card title="API Reference" icon="https://mintcdn.com/hydrafetch/koPVMLXM3S4OTC3p/icons/code.svg?fit=max&auto=format&n=koPVMLXM3S4OTC3p&q=85&s=ce116045b848b9f082595f6161ed7383" href="/api-reference" width="18" height="18" data-path="icons/code.svg">
    Every endpoint, with a live playground.
  </Card>
</CardGroup>
