> 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-targets/llms-and-ai.md).

# LLMs and AI

Oxylabs LLM scrapers let you submit prompts to leading AI platforms and receive structured and parsed responses. Supported targets:

* [ChatGPT](/api-targets/llms-and-ai/chatgpt.md) – source: `chatgpt`
* [Gemini](/api-targets/llms-and-ai/gemini.md) – source: `gemini`
* [Perplexity](/api-targets/llms-and-ai/perplexity.md) – source: `perplexity`

{% hint style="success" %}
All dedicated LLM & AI scrapers support **custom browser instructions**. [**Learn more**](/products/web-scraper-api/features/js-rendering-and-browser-control.md#browser-instructions)**.**
{% endhint %}

### Integration method

LLM & AI sources use the [**Push-Pull**](/products/web-scraper-api/integration-methods/push-pull.md) integration method. Instead of holding the connection open until the response is ready, you submit a job, and collect the result once it's finished:

1. **Submit the job:** send your prompt to the Push-Pull endpoint. You get back a job ID immediately, not the result.
2. **Wait for it to finish:** either let us notify you with `callback_url` (recommended), or [check the job status](/products/web-scraper-api/integration-methods/push-pull.md#check-job-status) yourself.
3. **Retrieve the result:** once the status is `done`, fetch the parsed response.

{% hint style="info" %}
**Realtime and Proxy Endpoint are not available** for `chatgpt`, `gemini`, and `perplexity` sources. These targets take longer to complete than a synchronous connection allows, so Push-Pull is the only supported method.
{% endhint %}

## Request sample

All LLM targets use mostly same request parameters, with main difference in the maximum prompt length.

Submit the payload to the Push-Pull endpoint – see the individual target pages for full code examples.

```json
{
  "source": "chatgpt",
  "prompt": "best supplements for better sleep",
  "parse": true,
  "geo_location": "United States",
  "callback_url": "https://your-server.com/oxylabs-callback"
}
```

<table><thead><tr><th width="195.5">Parameter</th><th width="452.5">Description</th><th width="117">Type</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong><code>source</code></strong></mark></td><td>The LLM target to scrape. Allowed values: <code>chatgpt</code>, <code>perplexity</code>, <code>gemini</code>.</td><td>string</td></tr><tr><td><mark style="background-color:green;"><strong><code>prompt</code></strong></mark></td><td>Query or prompt to submit. Maximum length: 4,000 characters for <code>chatgpt</code>; 8,000 characters for <code>perplexity</code> and <code>gemini</code>.</td><td>string</td></tr><tr><td><code>callback_url</code></td><td><strong>Recommended.</strong> URL where we deliver a notification once the job completes, so you don't have to check the status yourself. <a href="/spaces/BQ7Zf9paoN3FTeGcyfY1/pages/DijMC0XcEbNczNgRaHIV"><strong>More info</strong></a>.</td><td>string</td></tr><tr><td><code>parse</code></td><td>Set to <code>true</code> to receive a structured JSON response.</td><td>boolean</td></tr><tr><td><code>geo_location</code></td><td>Geographic location to route the request from (e.g., <code>"United States"</code>).</td><td>string</td></tr><tr><td><code>browser_instructions</code></td><td>Execute optional custom browser instructions when rendering JavaScript. <a href="/spaces/BQ7Zf9paoN3FTeGcyfY1/pages/pGs7q0aw7gpLmDsoGTdt#browser-instructions"><strong>More info</strong></a>.</td><td>object</td></tr></tbody></table>

&#x20;    \- mandatory parameter

{% hint style="success" %}
**Note:** JavaScript rendering is enabled by default for all LLM targets. Do not include `render` in your request payload.
{% endhint %}

## Response

All LLM targets return the same top-level data structure. (see the individual target pages for the full response field reference).

### Submitting the job

Submitting returns the job details, including the ID you'll use to collect the result. It does **not** contain the scraped data.

<table><thead><tr><th width="196">Field</th><th width="452">Description</th><th width="114">Type</th></tr></thead><tbody><tr><td><code>job.id</code></td><td>Unique identifier for the scraping job. Use this to retrieve the result.</td><td>string</td></tr><tr><td><code>job.status</code></td><td>Current status of the job: <code>pending</code> while it runs, <code>done</code> when the result is ready, <code>faulted</code> if it failed (retrieve the result only once the status is <code>done</code>)</td><td>string</td></tr><tr><td><code>job.source</code></td><td>Submitted <code>source</code> value.</td><td>string</td></tr><tr><td><code>job.parse</code></td><td>Submitted <code>parse</code> value.</td><td>boolean</td></tr><tr><td><code>job.prompt</code></td><td>Original prompt in the request.</td><td>string</td></tr><tr><td><code>job.geo_location</code></td><td>Geolocation used for the request.</td><td>string</td></tr><tr><td><code>job.created_at</code></td><td>Job creation timestamp (UTC, <code>YYYY-MM-DD HH:MM:SS</code>).</td><td>string</td></tr><tr><td><code>job.updated_at</code></td><td>Job update timestamp.</td><td>string</td></tr></tbody></table>

### Retrieving results

Once the job status is `done`, retrieve the result using the `job.id` you received. The parsed content specific to each target is found inside `results[].content` (see the individual target pages for the full field reference).

<table><thead><tr><th width="196">Field</th><th width="452">Description</th><th width="114">Type</th></tr></thead><tbody><tr><td><code>results[].job_id</code></td><td>Job ID associated with the result.</td><td>string</td></tr><tr><td><code>results[].status_code</code></td><td>HTTP status code of page fetch.</td><td>integer</td></tr><tr><td><code>results[].url</code></td><td>Target LLM page.</td><td>string</td></tr><tr><td><code>results[].content</code></td><td>LLM response data. Fields vary by target.</td><td>object</td></tr></tbody></table>

### Response data by target

The table below shows which data fields are available for each LLM target.&#x20;

|                                                                        | [**ChatGPT**](/api-targets/llms-and-ai/chatgpt.md) | [**Gemini**](/api-targets/llms-and-ai/gemini.md) | [**Perplexity**](/api-targets/llms-and-ai/perplexity.md) |
| ---------------------------------------------------------------------- | :------------------------------------------------: | :----------------------------------------------: | :------------------------------------------------------: |
| Prompt input                                                           |                          ✓                         |                         ✓                        |                             ✓                            |
| Parsed output (JSON)                                                   |                          ✓                         |                         ✓                        |                             ✓                            |
| Plain text response                                                    |                          ✓                         |                         ✓                        |                             –                            |
| Markdown output                                                        |                          ✓                         |                         ✓                        |                             ✓                            |
| Markdown JSON tree                                                     |                          ✓                         |                         –                        |                             ✓                            |
| <mark style="background-color:yellow;">Search / related queries</mark> |                          ✓                         |                         –                        |                             ✓                            |
| <mark style="background-color:yellow;">Citations / sources</mark>      |                          ✓                         |                         ✓                        |                             ✓                            |
| <mark style="background-color:yellow;">Shopping results</mark>         |                          ✓                         |                         –                        |                             ✓                            |
| <mark style="background-color:yellow;">Ads</mark>                      |                          ✓                         |                         –                        |                             –                            |
| Geolocation                                                            |                          ✓                         |                         ✓                        |                             ✓                            |
| LLM model used                                                         |                          ✓                         |                         ✓                        |                             ✓                            |

&#x20;    – conditional, returned only when content is in the LLM's response.


---

# 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 current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.oxylabs.io/api-targets/llms-and-ai.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
