# ScrapeGraphAI — Orthogonal API

> Pay-per-use API on Orthogonal. Each call is billed to your Orthogonal balance.
> Base API: `https://api.orth.sh/v1/run` · [llms.txt](https://orthogonal.com/llms.txt) · [browse all APIs](https://orthogonal.com/discover)

Scrape URLs, extract structured data with LLMs, search and scrape top results, crawl websites, and monitor pages for changes.

**Verified:** yes

## Access

**Run API:** `POST https://api.orth.sh/v1/run`
**Auth:** `Authorization: Bearer $ORTHOGONAL_API_KEY`
Get an API key at https://orthogonal.com/dashboard/settings/api-keys

Every call goes through the unified Run API: send the API `slug`, the endpoint `path`, and the `query`/`body` parameters. The response is `{ "success": true, "price": "<usd>", "data": { ... } }`.

## Endpoints

### Scrape a URL

Fetches a URL and returns the requested format(s): markdown, html, links, images, summary, json, branding, screenshot.

`POST /api/scrape`

**Estimated cost:** Dynamic — use `"dryRun": true` in the Run API request to check the exact cost before calling.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | URL to scrape |
| `formats` | array | No | Output formats array. Each item has a type (markdown, html, screenshot, json, links, images, summary, branding) and optional mode (normal, reader, prune). Defaults to [{"type":"markdown","mode":"normal"}] |
| `contentType` | string | No | Force content type (text/html, application/pdf, image/jpeg, etc.) |
| `fetchConfig` | object | No | Fetch options: mode (auto/fast/js), stealth (bool), timeout (ms), wait (ms), headers, cookies, country (2-letter), scrolls (0-100) |

```bash
curl -X POST 'https://api.orth.sh/v1/run' \
  -H 'Authorization: Bearer $ORTHOGONAL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"api":"scrapegraphai","path":"/api/scrape","body":{"url":"<string>","formats":"<array>","contentType":"<string>","fetchConfig":"<object>"}}'
```

### Start Crawl

Start a website crawl from a seed URL with configurable depth and page limits.

`POST /api/crawl`

**Estimated cost:** Dynamic — use `"dryRun": true` in the Run API request to check the exact cost before calling.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Seed URL to crawl |
| `formats` | array | No | Output formats |
| `maxDepth` | number | No | Max crawl depth (default 2) |
| `maxPages` | number | No | Max pages (1-1000, default 50) |
| `maxLinksPerPage` | number | No | Max links per page (default 10) |
| `allowExternal` | boolean | No | Follow external links (default false) |
| `includePatterns` | array | No | URL patterns to include |
| `excludePatterns` | array | No | URL patterns to exclude |
| `contentTypes` | array | No | Allowed content types |
| `fetchConfig` | object | No | Fetch options |

```bash
curl -X POST 'https://api.orth.sh/v1/run' \
  -H 'Authorization: Bearer $ORTHOGONAL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"api":"scrapegraphai","path":"/api/crawl","body":{"url":"<string>","formats":"<array>","maxDepth":"<number>","maxPages":"<number>","maxLinksPerPage":"<number>","allowExternal":"<boolean>","includePatterns":"<array>","excludePatterns":"<array>","contentTypes":"<array>","fetchConfig":"<object>"}}'
```

### Create Monitor

Create a monitor to track changes on a URL at a given interval.

`POST /api/monitor`

**Estimated cost:** Dynamic — use `"dryRun": true` in the Run API request to check the exact cost before calling.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | URL to monitor |
| `interval` | string | Yes | Cron interval expression (1-100 chars) |
| `name` | string | No | Monitor name (max 200 chars) |
| `formats` | array | No | Output formats to track |
| `webhookUrl` | string | No | Webhook URL to notify on changes |
| `fetchConfig` | object | No | Fetch options |

```bash
curl -X POST 'https://api.orth.sh/v1/run' \
  -H 'Authorization: Bearer $ORTHOGONAL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"api":"scrapegraphai","path":"/api/monitor","body":{"url":"<string>","interval":"<string>","name":"<string>","formats":"<array>","webhookUrl":"<string>","fetchConfig":"<object>"}}'
```

### Update Monitor

Update a monitor configuration.

`PATCH /api/monitor/{id}`

**Cost:** Free

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Path parameter — substitute directly into the endpoint `path`. |
| `name` | string | No | Monitor name |
| `formats` | array | No | Output formats |
| `interval` | string | No | Cron interval |
| `webhookUrl` | string | No | Webhook URL |
| `fetchConfig` | object | No | Fetch options |
| `id` | string | Yes | Monitor UUID (path parameter) |

```bash
# Replace {id} in "path" with real values before sending
curl -X POST 'https://api.orth.sh/v1/run' \
  -H 'Authorization: Bearer $ORTHOGONAL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"api":"scrapegraphai","path":"/api/monitor/{id}","method":"PATCH","query":{"id":"<string>"},"body":{"name":"<string>","formats":"<array>","interval":"<string>","webhookUrl":"<string>","fetchConfig":"<object>"}}'
```

### Get Monitor Activity

Get paginated tick activity for a monitor, including diffs.

`GET /api/monitor/{id}/activity`

**Cost:** Free

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Path parameter — substitute directly into the endpoint `path`. |
| `id` | string | Yes | Monitor UUID (path parameter) |
| `cursor` | string | No | Pagination cursor (ISO 8601) |
| `limit` | number | No | Results per page (1-100, default 20) |

```bash
# Replace {id} in "path" with real values before sending
curl -X POST 'https://api.orth.sh/v1/run' \
  -H 'Authorization: Bearer $ORTHOGONAL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"api":"scrapegraphai","path":"/api/monitor/{id}/activity","method":"GET","query":{"id":"<string>","cursor":"<string>","limit":"<number>"}}'
```

### Delete Monitor

Delete a monitor by ID.

`DELETE /api/monitor/{id}`

**Cost:** Free

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Path parameter — substitute directly into the endpoint `path`. |
| `id` | string | Yes | Monitor UUID (path parameter) |

```bash
# Replace {id} in "path" with real values before sending
curl -X POST 'https://api.orth.sh/v1/run' \
  -H 'Authorization: Bearer $ORTHOGONAL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"api":"scrapegraphai","path":"/api/monitor/{id}","method":"DELETE","query":{"id":"<string>"}}'
```

### Pause Monitor

Pause an active monitor.

`POST /api/monitor/{id}/pause`

**Cost:** Free

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Path parameter — substitute directly into the endpoint `path`. |
| `id` | string | Yes | Monitor UUID (path parameter) |

```bash
# Replace {id} in "path" with real values before sending
curl -X POST 'https://api.orth.sh/v1/run' \
  -H 'Authorization: Bearer $ORTHOGONAL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"api":"scrapegraphai","path":"/api/monitor/{id}/pause","query":{"id":"<string>"}}'
```

### Resume Monitor

Resume a paused monitor.

`POST /api/monitor/{id}/resume`

**Cost:** Free

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Path parameter — substitute directly into the endpoint `path`. |
| `id` | string | Yes | Monitor UUID (path parameter) |

```bash
# Replace {id} in "path" with real values before sending
curl -X POST 'https://api.orth.sh/v1/run' \
  -H 'Authorization: Bearer $ORTHOGONAL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"api":"scrapegraphai","path":"/api/monitor/{id}/resume","query":{"id":"<string>"}}'
```

### Get Monitor

Get details of a specific monitor by ID.

`GET /api/monitor/{id}`

**Cost:** Free

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Path parameter — substitute directly into the endpoint `path`. |
| `id` | string | Yes | Monitor UUID (path parameter) |

```bash
# Replace {id} in "path" with real values before sending
curl -X POST 'https://api.orth.sh/v1/run' \
  -H 'Authorization: Bearer $ORTHOGONAL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"api":"scrapegraphai","path":"/api/monitor/{id}","method":"GET","query":{"id":"<string>"}}'
```

### Extract Structured JSON

LLM-driven extraction from a URL, HTML, or markdown input with a prompt and optional JSON schema.

`POST /api/extract`

**Estimated cost:** Dynamic — use `"dryRun": true` in the Run API request to check the exact cost before calling.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `prompt` | string | Yes | Extraction prompt (1-10000 chars) |
| `url` | string | No | URL to extract from |
| `html` | string | No | Raw HTML to extract from |
| `markdown` | string | No | Markdown to extract from |
| `schema` | object | No | JSON schema for structured output |
| `mode` | string | No | Content mode: normal, reader, or prune |
| `contentType` | string | No | Force content type |
| `fetchConfig` | object | No | Fetch options: mode, stealth, timeout, wait, headers, cookies, country, scrolls |

```bash
curl -X POST 'https://api.orth.sh/v1/run' \
  -H 'Authorization: Bearer $ORTHOGONAL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"api":"scrapegraphai","path":"/api/extract","body":{"prompt":"<string>","url":"<string>","html":"<string>","markdown":"<string>","schema":"<object>","mode":"<string>","contentType":"<string>","fetchConfig":"<object>"}}'
```

### Search the web

Runs a search, scrapes the top N result URLs, optionally runs LLM extraction with prompt and schema.

`POST /api/search`

**Estimated cost:** Dynamic — use `"dryRun": true` in the Run API request to check the exact cost before calling.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query (1-500 chars) |
| `numResults` | number | No | Number of results to scrape (1-20, default 3) |
| `format` | string | No | Output format: html or markdown (default markdown) |
| `mode` | string | No | Content mode: normal, reader, or prune (default prune) |
| `prompt` | string | No | LLM extraction prompt (1-10000 chars) |
| `schema` | object | No | JSON schema for structured extraction |
| `locationGeoCode` | string | No | Geo code for location-based results (max 10 chars) |
| `timeRange` | string | No | Time filter: past_hour, past_24_hours, past_week, past_month, past_year |
| `fetchConfig` | object | No | Fetch options |

```bash
curl -X POST 'https://api.orth.sh/v1/run' \
  -H 'Authorization: Bearer $ORTHOGONAL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"api":"scrapegraphai","path":"/api/search","body":{"query":"<string>","numResults":"<number>","format":"<string>","mode":"<string>","prompt":"<string>","schema":"<object>","locationGeoCode":"<string>","timeRange":"<string>","fetchConfig":"<object>"}}'
```

---

Full details and an interactive quickstart: https://orthogonal.com/discover/scrapegraphai
