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

# Stophy API documentation

> Stophy is one API to search the web, read any page as Markdown or JSON, crawl a site, pull fields from pages and drive a cloud browser.

Search, read, and act on the web. Send a URL or a query to one API and get Markdown, JSON or a finished task back. A failed call costs nothing.

## Make your first request

[Get an API key](https://docs.stophy.dev/get-credentials.md) and set it as `STOPHY_API_KEY`. This call reads `example.com` as Markdown. The TypeScript and Python tabs use the [SDKs](https://docs.stophy.dev/sdks.md).

```bash cURL theme={null}
curl -X POST https://api.stophy.dev/v1/scrape \
  -H "Authorization: Bearer $STOPHY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com", "formats": ["markdown"] }'
```

```typescript TypeScript theme={null}
import { Stophy } from "stophy";

const stophy = new Stophy();
const { data } = await stophy.scrape({ url: "https://example.com", formats: ["markdown"] });
console.log(data.markdown);
```

```python Python theme={null}
from stophy import Stophy

stophy = Stophy()
result = stophy.scrape(url="https://example.com", formats=["markdown"])
print(result["data"]["markdown"])
```

The page text is in `data.markdown`. `data.metadata` has the title, the site's status code and `costUsd`, what the call cost.

```json theme={null}
{
  "success": true,
  "data": {
    "markdown": "This domain is for use in documentation examples without needing permission. …",
    "metadata": { "title": "Example Domain", "statusCode": 200, "costUsd": 0.001 }
  }
}
```

## Other ways to start

| You want | Start here |
| - | - |
| Your coding agent to sign up and set it up | [Agent quickstart](https://docs.stophy.dev/agent-quickstart.md) |
| Stophy tools in Claude, Codex, Cursor or another MCP client | [MCP server](https://docs.stophy.dev/install-mcp.md) |
| Commands in a terminal or CI | [CLI](https://docs.stophy.dev/install-cli.md) |
| Your coding agent to pick the right call | [Skills](https://docs.stophy.dev/install-skill.md) |

Agents can read [llms.txt](https://docs.stophy.dev/llms.txt) for the page index or [llms-full.txt](https://docs.stophy.dev/llms-full.txt) for every page. Any page is Markdown at its URL plus `.md`.

## Choose an API

Crawl follows links from one URL to find pages. A batch reads a list of URLs you already have. Extract reads the pages you name. Agent finds the pages itself.

| You have | You want | Use |
| - | - | - |
| A URL | The page as Markdown, links, a screenshot or JSON | [Scrape](https://docs.stophy.dev/scrape/overview) |
| A URL on a site with its own data | A video, listing or profile as JSON | [Scrape with a parser](https://docs.stophy.dev/scrape/prebuilt-parsers) |
| A site | Every URL on it | [Map](https://docs.stophy.dev/map/overview) |
| A site | The content of its pages | [Crawl](https://docs.stophy.dev/crawl/overview) |
| A list of URLs | Their content, as a background job | [Batches](https://docs.stophy.dev/batches/overview) |
| A query | Ranked web, news, image, video or research results | [Search](https://docs.stophy.dev/search/overview) |
| Pages and the fields you want | The values, each checked against the page | [Extract](https://docs.stophy.dev/extract/overview) |
| A task in plain words | An answer with a quote for each field | [Agent](https://docs.stophy.dev/agent/overview) |
| A PDF, Word, Excel or PowerPoint file | Its text as Markdown | [Parse](https://docs.stophy.dev/parse/overview) |
| A site that needs clicks or a login | A browser you control | [Browser sessions](https://docs.stophy.dev/browser/overview) |
| A site with a search box or a form | What the form returns | [Browser tasks](https://docs.stophy.dev/browser/tasks.md) |
| A page that changes | A record of each change | [Monitors](https://docs.stophy.dev/monitors/overview) |

## Next

* [Pricing](https://docs.stophy.dev/account/pricing.md) and [Rate limits](https://docs.stophy.dev/production/rate-limits.md) before you ship.
* [Errors](https://docs.stophy.dev/api-reference/errors.md): every code and its fix.
* [API reference](https://docs.stophy.dev/api-reference/introduction.md) for every field.


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