> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/api-reference/dedicated-scrapers/llm-and-ai-scrapers.md).

# LLM & AI Scrapers

Reference for Web API's ChatGPT, Gemini, and Perplexity scraper endpoints. Async-only, with parameters and response fields.

<table><thead><tr><th width="168.5">Scraper</th><th>Endpoints</th></tr></thead><tbody><tr><td><a href="#chatgpt">ChatGPT</a></td><td><code>/chatgpt</code></td></tr><tr><td><a href="#gemini">Gemini</a></td><td><code>/gemini</code></td></tr><tr><td><a href="#perplexity">Perplexity</a></td><td><code>/perplexity</code></td></tr></tbody></table>

### ChatGPT

#### `POST /v1/async/scrape/chatgpt`

Returns ChatGPT's answer to a question.

**Modes:** async · batch

<table><thead><tr><th width="139.5">Name</th><th width="104.5">Type</th><th width="98">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>query</code></td><td>string</td><td>yes</td><td>The question to ask</td></tr><tr><td><code>search</code></td><td>boolean</td><td>no</td><td><code>true</code> allows browsing for current information with citations. <code>false</code> answers from training data only. No neutral default</td></tr><tr><td><code>output</code></td><td>array of strings</td><td>no</td><td>Formats to return: <code>markdown</code>, <code>html</code>, <code>json</code>, <code>screenshot</code>. Default <code>["html"]</code>. <code>json</code> returns parsed fields. <code>screenshot</code> requires <code>run_js: true</code></td></tr><tr><td><code>json</code></td><td>object</td><td>no</td><td>Custom extraction: <code>{"prompt": string}</code> or <code>{"schema": object}</code>, never both. Overrides the built-in parser</td></tr><tr><td><code>location</code></td><td>string</td><td>no</td><td>Two-letter country code to fetch from, e.g. <code>DE</code></td></tr><tr><td><code>device</code></td><td>string</td><td>no</td><td><code>desktop</code> (default) or <code>mobile</code></td></tr><tr><td><code>run_js</code></td><td>boolean</td><td>no</td><td>Executes page JavaScript before capture. Slower — use a client timeout of 120 seconds or more</td></tr><tr><td><code>callback_url</code></td><td>string</td><td>no</td><td>Webhook URL for the finished job. Async only. Malformed URLs are rejected with <code>400</code></td></tr><tr><td><code>storage</code></td><td>object</td><td>no</td><td>Delivers the result to a bucket instead of the response: <code>{"type": string, "url": string}</code>. <code>type</code> is <code>s3</code>, <code>s3_gzip</code>, <code>s3_compatible</code>, <code>gcs</code>, or <code>tos</code>. Async only. <code>url</code> is not validated</td></tr></tbody></table>

**Response fields** – `results[].json`

| Field           | Description             |
| --------------- | ----------------------- |
| `response_text` | Answer as plain text    |
| `markdown_text` | Answer as Markdown      |
| `model`         | The model that answered |

Responses may differ between identical requests. There is no realtime path.

### Gemini

#### `POST /v1/async/scrape/gemini`

Returns Gemini's answer to a question.

**Modes:** async · batch

<table><thead><tr><th width="149">Name</th><th width="103.5">Type</th><th width="99.5">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>query</code></td><td>string</td><td>yes</td><td>The question to ask</td></tr><tr><td><code>output</code></td><td>array of strings</td><td>no</td><td>Formats to return: <code>markdown</code>, <code>html</code>, <code>json</code>, <code>screenshot</code>. Default <code>["html"]</code>. <code>json</code> returns parsed fields. <code>screenshot</code> requires <code>run_js: true</code></td></tr><tr><td><code>json</code></td><td>object</td><td>no</td><td>Custom extraction: <code>{"prompt": string}</code> or <code>{"schema": object}</code>, never both. Overrides the built-in parser</td></tr><tr><td><code>location</code></td><td>string</td><td>no</td><td>Two-letter country code to fetch from, e.g. <code>DE</code></td></tr><tr><td><code>device</code></td><td>string</td><td>no</td><td><code>desktop</code> (default) or <code>mobile</code></td></tr><tr><td><code>run_js</code></td><td>boolean</td><td>no</td><td>Executes page JavaScript before capture. Slower — use a client timeout of 120 seconds or more</td></tr><tr><td><code>callback_url</code></td><td>string</td><td>no</td><td>Webhook URL for the finished job. Async only. Malformed URLs are rejected with <code>400</code></td></tr><tr><td><code>storage</code></td><td>object</td><td>no</td><td>Delivers the result to a bucket instead of the response: <code>{"type": string, "url": string}</code>. <code>type</code> is <code>s3</code>, <code>s3_gzip</code>, <code>s3_compatible</code>, <code>gcs</code>, or <code>tos</code>. Async only. <code>url</code> is not validated</td></tr></tbody></table>

**Response fields** – `results[].json`

| Field           | Description             |
| --------------- | ----------------------- |
| `response_text` | Answer as plain text    |
| `markdown_text` | Answer as Markdown      |
| `model`         | The model that answered |

Responses may differ between identical requests. There is no realtime path.

### Perplexity

#### `POST /v1/async/scrape/perplexity`

Returns Perplexity's answer to a question, with its cited sources.

**Modes:** async · batch

<table><thead><tr><th width="139.5">Name</th><th width="94.5">Type</th><th width="99.5">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>query</code></td><td>string</td><td>yes</td><td>The question to ask</td></tr><tr><td><code>output</code></td><td>array of strings</td><td>no</td><td>Formats to return: <code>markdown</code>, <code>html</code>, <code>json</code>, <code>screenshot</code>. Default <code>["html"]</code>. <code>json</code> returns parsed fields. <code>screenshot</code> requires <code>run_js: true</code></td></tr><tr><td><code>json</code></td><td>object</td><td>no</td><td>Custom extraction: <code>{"prompt": string}</code> or <code>{"schema": object}</code>, never both. Overrides the built-in parser</td></tr><tr><td><code>location</code></td><td>string</td><td>no</td><td>Two-letter country code to fetch from, e.g. <code>DE</code></td></tr><tr><td><code>device</code></td><td>string</td><td>no</td><td><code>desktop</code> (default) or <code>mobile</code></td></tr><tr><td><code>run_js</code></td><td>boolean</td><td>no</td><td>Executes page JavaScript before capture. Slower — use a client timeout of 120 seconds or more</td></tr><tr><td><code>callback_url</code></td><td>string</td><td>no</td><td>Webhook URL for the finished job. Async only. Malformed URLs are rejected with <code>400</code></td></tr><tr><td><code>storage</code></td><td>object</td><td>no</td><td>Delivers the result to a bucket instead of the response: <code>{"type": string, "url": string}</code>. <code>type</code> is <code>s3</code>, <code>s3_gzip</code>, <code>s3_compatible</code>, <code>gcs</code>, or <code>tos</code>. Async only. <code>url</code> is not validated</td></tr></tbody></table>

**Response fields** – `results[].json`

| Field             | Description     |
| ----------------- | --------------- |
| `answer_results`  | The answer      |
| `related_queries` | Related queries |

Responses may differ between identical requests. There is no realtime path.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.oxylabs.io/api-reference/dedicated-scrapers/llm-and-ai-scrapers.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
