> 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/products/cn/web-scraper-api/mu-biao/llms-he-ai/chatgpt.md). Agents can also search and read this documentation through its [MCP server](https://developers.oxylabs.io/~gitbook/mcp).

# ChatGPT

通过提交提示词提取 ChatGPT 响应，获取包含响应文本、Markdown 输出、引用、外部链接和购物商品详情的解析数据。

该 `chatgpt` source 可让你向其提交提示词 **ChatGPT** 并接收一个经过完整解析、结构化的响应，其中包括纯文本和 Markdown 答案、来源引用，以及购物商品和广告。

## 请求示例

以下代码示例演示如何使用 [**Push-Pull**](https://developers.oxylabs.io/products/cn/web-scraper-api/integration-methods/push-pull.md).

{% tabs %}
{% tab title="cURL" %}

```bash
curl 'https://data.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "chatgpt",
        "prompt": "best supplements for better sleep",
        "parse": true,
        "geo_location": "United States",
        "callback_url": "https://your-server.com/oxylabs-callback"
    }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from pprint import pprint

# Structure payload.
payload = {
    'source': 'chatgpt',
    'prompt': 'best supplements for better sleep',
    'parse': True,
    'geo_location': "United States",
    'callback_url': "https://your-server.com/oxylabs-callback"
}

# Get response.
response = requests.request(
    'POST',
    'https://data.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),
    json=payload,
)

# 将格式化后的响应打印到标准输出。
pprint(response.json())
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const https = require("https");

const username = "USERNAME";
const password = "PASSWORD";
const body = {
    source: "chatgpt",
    prompt: "best supplements for better sleep",
    parse: true,
    geo_location: "United States",
    callback_url: "https://your-server.com/oxylabs-callback"
};

const options = {
    hostname: "data.oxylabs.io",
    path: "/v1/queries",
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization:
            "Basic " + Buffer.from(`${username}:${password}`).toString("base64"),
    },
};

const request = https.request(options, (response) => {
    let data = "";

    response.on("data", (chunk) => {
        data += chunk;
    });

    response.on("end", () => {
        const responseData = JSON.parse(data);
        console.log(JSON.stringify(responseData, null, 2));
    });
});

request.on("error", (error) => {
    console.error("Error:", error);
});

request.write(JSON.stringify(body));
request.end();
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$params = array(
    'source' => 'chatgpt',
    'prompt' => 'best supplements for better sleep',
    'parse' => true,
    'geo_location' => "United States",
    'callback_url' => "https://your-server.com/oxylabs-callback"
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://data.oxylabs.io/v1/queries");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, "USERNAME" . ":" . "PASSWORD");


$headers = array();
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)

func main() {
const Username = "USERNAME"
const Password = "PASSWORD"

  payload := map[string]interface{}{
        "source": "chatgpt",
        "prompt": "best supplements for better sleep",
        "parse":  true,
        "geo_location": "United States",
        "callback_url": "https://your-server.com/oxylabs-callback",
    }

jsonValue, _ := json.Marshal(payload)

client := &http.Client{}
request, _ := http.NewRequest("POST",
"https://data.oxylabs.io/v1/queries",
bytes.NewBuffer(jsonValue),
)

request.SetBasicAuth(Username, Password)
response, _ := client.Do(request)

responseText, _ := ioutil.ReadAll(response.Body)
fmt.Println(string(responseText))
}
```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;

namespace OxyApi
{
    class Program
    {
        static async Task Main()
        {
            const string Username = "USERNAME";
            const string Password = "PASSWORD";

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

            var client = new HttpClient();

            Uri baseUri = new Uri("https://data.oxylabs.io");
            client.BaseAddress = baseUri;

            var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/queries");
            requestMessage.Content = JsonContent.Create(parameters);

            var authenticationString = $"{Username}:{Password}";
            var base64EncodedAuthenticationString = Convert.ToBase64String(System.Text.ASCIIEncoding.UTF8.GetBytes(authenticationString));
            requestMessage.Headers.Add("Authorization", "Basic " + base64EncodedAuthenticationString);

            var response = await client.SendAsync(requestMessage);
            var contents = await response.Content.ReadAsStringAsync();

            Console.WriteLine(contents);
        }
    }
}
```

{% endtab %}

{% tab title="Java" %}

```java
package org.example;

import okhttp3.*;
import org.json.JSONArray;
import org.json.JSONObject;

public class Main implements Runnable {
    private static final String AUTHORIZATION_HEADER = "Authorization";
    public static final String USERNAME = "USERNAME";
    public static final String PASSWORD = "PASSWORD";

    public void run() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("source", "chatgpt");
        jsonObject.put("prompt", "best supplements for better sleep");
        jsonObject.put("parse", true);
        jsonObject.put("geo_location", "United States");
        jsonObject.put("callback_url", "https://your-server.com/oxylabs-callback");

        Authenticator authenticator = (route, response) -> {
            String credential = Credentials.basic(USERNAME, PASSWORD);
            return response
                    .request()
                    .newBuilder()
                    .header(AUTHORIZATION_HEADER, credential)
                    .build();
        };

        var client = new OkHttpClient.Builder()
                .authenticator(authenticator)
                .build();

        var mediaType = MediaType.parse("application/json; charset=utf-8");
        var body = RequestBody.create(jsonObject.toString(), mediaType);
        var request = new Request.Builder()
                .url("https://data.oxylabs.io/v1/queries")
                .post(body)
                .build();

        try (var response = client.newCall(request).execute()) {
            if (response.body() != null) {
                try (var responseBody = response.body()) {
                    System.out.println(responseBody.string());
                }
            }
        } catch (Exception exception) {
            System.out.println("Error: " + exception.getMessage());
        }

        System.exit(0);
    }

    public static void main(String[] args) {
        new Thread(new Main()).start();
    }
}
```

{% endtab %}

{% tab title="JSON" %}

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

{% endtab %}
{% endtabs %}

使用以下方式提交任务 [**Push-Pull**](https://developers.oxylabs.io/products/cn/web-scraper-api/integration-methods/push-pull.md) 集成方法（包括 [批量查询](https://developers.oxylabs.io/products/cn/web-scraper-api/integration-methods/push-pull.md#batch-query)) 方法会立即返回 job ID，而不是结果。待任务状态为 `完成`时，获取解析后的响应。参见 [**集成方法**](https://developers.oxylabs.io/products/cn/web-scraper-api/integration-methods/push-pull.md) 在 LLMs 和 AI 页面查看完整的提交和获取流程。

### 请求参数

用于抓取 ChatGPT 的基本设置和自定义选项。

<table><thead><tr><th width="222">参数</th><th width="350.3333333333333">说明</th><th>默认值</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong><code>source</code></strong></mark></td><td>设置爬虫目标。使用 <code>chatgpt</code>.</td><td>–</td></tr><tr><td><mark style="background-color:green;"><strong><code>prompt</code></strong></mark></td><td>提交给 ChatGPT 的提示词或问题。最多 4,000 个字符。</td><td>–</td></tr><tr><td><code>callback_url</code></td><td><strong>推荐。</strong> 任务完成后我们发送通知的 URL。 <a href="https://developers.oxylabs.io/products/web-scraper-api/integration-methods/push-pull"><strong>更多信息</strong></a></td><td>–</td></tr><tr><td><code>search</code></td><td>设为 <code>true</code> 用于网页搜索。</td><td><code>false</code></td></tr><tr><td><code>parse</code></td><td>设为 <code>true</code> 用于结构化 JSON 结果。</td><td><code>false</code></td></tr><tr><td><code>geo_location</code></td><td>指定请求路由来源国家。 <a href="https://developers.oxylabs.io/products/cn/web-scraper-api/features/localization.md"><strong>更多信息</strong></a>. </td><td>–</td></tr></tbody></table>

&#x20;   \- 必填参数

## 结构化数据

一旦通过 Push-Pull 结果端点检索到任务，网页爬虫API 会返回一个 HTML 或 JSON 对象，其中包含 ChatGPT 输出，以及结果页面各元素的结构化数据。

在下面的示例中，长文本值被截短（`...`）并且数组仅保留前几项。

<details>

<summary><code>chatgpt</code> 结构化输出</summary>

```json
{
    "results": [
        {
            "job_id": "7513507166020492289",
            "status_code": 200,
            "url": "https://chatgpt.com/uc/6ac5fb18-4da4-83ea-a621-c610d8c36283",
            "content": {
                "prompt": "best supplements for better sleep",
                "response_text": "如果你的目标是改善睡眠，我会把补充剂方案保持简单。大多数“睡眠补充剂”的证据其实相当薄弱。最佳选择褪黑素——最适合调整作息、时差或入睡...",
                "markdown_text": "如果你的目标是 **更好的睡眠**，我会把补充剂方案保持简单。大多数“睡眠补充剂”的证据出人意料地薄弱。\n\n### 最佳选择\n\n1. **褪黑素——最适合调整作息、时差或...",
                "markdown_json": [
                    {
                        "children": [
                            {
                                "raw": "如果你的目标是 ",
                                "type": "text"
                            },
                            {
                                "children": [
                                    {
                                        "raw": "更好的睡眠",
                                        "type": "text"
                                    }
                                ],
                                "type": "strong"
                            },
                            {
                                "raw": "，我会把补充剂方案保持简单。大多数“睡眠补充剂”的证据其实相当薄弱。",
                                "type": "text"
                            }
                        ],
                        "type": "paragraph"
                    },
                    {
                        "type": "blank_line"
                    }
                ],
                "citations": [
                    {
                        "text": "NCCIH",
                        "title": "褪黑素：你需要了解的内容 | NCCIH",
                        "url": "https://www.nccih.nih.gov/health/melatonin-what-you-need-to-know?a70bf911_page=2&aa69e157_page=1&c159a325_page=2&utm_source=chatgpt.com"
                    },
                    {
                        "text": "NCCIH",
                        "title": "睡眠障碍与补充健康方法：有效性与安全性 | NCCIH",
                        "url": "https://www.nccih.nih.gov/health/sleep-disorders-and-complementary-health-approaches?utm_source=chatgpt.com"
                    },
                    {
                        "text": "PubMed",
                        "title": "老年人失眠的口服镁补充：系统综述与 Meta 分析 - PubMed",
                        "url": "https://pubmed.ncbi.nlm.nih.gov/33865376/?utm_source=chatgpt.com"
                    }
                ],
                "parse_status_code": 12000
            }
        }
    ]
}
```

</details>

当 ChatGPT 推荐商品时，响应还会包含 `shopping_products` 以及答案中显示的商品卡片。下面的示例来自提示词 `扁平足且低于 150 美元的最佳跑鞋有哪些？`:

<details open>

<summary><code>shopping_products</code> 示例</summary>

```json
...
  "shopping_products": [
                    {
                        "badge": "综合最佳",
                        "citations": [
                            {
                                "source": "扁平足跑者的鞋款",
                                "title": "2026 年扁平足最佳 8 款跑鞋",
                                "url": "https://www.runnersworld.com/gear/a25750345/running-shoes-flat-feet/?utm_source=chatgpt.com"
                            },
                            {
                                "source": "Runner's World",
                                "title": "我们最喜欢的稳定支撑跑鞋现在几乎打 8 折",
                                "url": "https://www.runnersworld.com/gear/a74094003/brooks-adrenaline-gts-october-sale-2026/?utm_source=chatgpt.com"
                            }
                        ],
                        "currency": null,
                        "description": "1. Brooks Adrenaline GTS 25\n综合最佳\n$125 on sale\n一款适合日常跑和长距离跑的全能型选择。GuideRails 在脚部内旋时提供温和稳定性，同时不会显得过于僵硬。\nBest for: 可靠支撑和日常训练。",
                        "image_page_title": "Brooks Adrenaline GTS 25 pánske bežecké topánky | Leitner Sport",
                        "image_page_url": "https://www.leitnersport.sk/eshop/brooks-adrenaline-gts-25-panske-bezecke-topanky",
                        "images": [
                            "https://images.openai.com/static-rsc-4/-_nwr1pfG8ye991Q_mloy_Sw9A4PSYyQzaFeHPIVK0kAHKVKUyYXTYwS9m8okvWA6lrHhznRGjw-5QSB6IoRM1FefeAANBpkIWq-U8cOhDFXxAhydmCqg8zKHtw5xX7JHBY6USX_m3ktqo2OkDTd64GwrtwGpLgWz_YIx5WJMcnd2-fOcvfLCBQ2q2whiDcQ?purpose=fullsize",
                            "https://images.openai.com/static-rsc-4/O7_Fr1GrO50BLbLHeJybIy7JToUvsWVHM-MRnq92fdTBY2bBse7WBUxvLOGTc5HoBJqj-ppSsEIcEr2cS96wckZnELSDi5JB_iXk80w8c84nHdgg_UfRw2PmHzh5K2nipQjjR5fFlQq3xIBTC80AGPUeiYwLV5zzuuPNLZb3P2PXnViLclAhwoP0gYeyPi44?purpose=fullsize",
                            "https://images.openai.com/static-rsc-4/Y9o0eWI02yWN0-gAW5SlixtWDvCeDgMIlY5_l3h8lUHuY5IW_rYndUaHstYlEJORPkm9HeX5HMfv8sY2ST7WehEiVLMwqnCgWKniiJYpGUJNdB3e2M6EnD6iVaeZoY8sxr6vn1NzUqFFZfLMV905LmYViOjLA_-Lgz2SDQ0EEepnbjxcYGCGmmWU6OOtHd5z?purpose=fullsize",
                            "https://images.openai.com/static-rsc-4/eBkFqh-W0WvgYCmEl43CAGCc6Gnt4Ryp70AGkAabrrXx6yn_ki3hAMEYEONskZeKu3tbbfYhOEuptxzEMcauc9Al2ymxWUzql1bxdvDOeuvSI8tFckjMCJWlbYto3GSNolXhUYv6Fb4MOmhUCEsClN8tgSF7_visxsL9t2DlMiWMQJvySOq_LiaVAFiKQSxI?purpose=fullsize",
                            "https://images.openai.com/static-rsc-4/5Exh1_JteT5QxYDn-rb2HGlw-RaBw-vA1zHDrJDQqisyQU1QXirusmO2nqQqj0UJd6ppqSiNdkyKdZJsnbk8j36T-AJH8iINjCxqgxSppUOL8HSsapDrIjsbEoD7GC-zcOhtYL4BrABvTG6pn5HfUHMShLFhAZXodNjQA200xOKXR0cgum8KFj9ea3tz50nc?purpose=fullsize",
                            "https://images.openai.com/static-rsc-4/InccpeyXQufhbnCFX0t6vBE7N66U7oY7qsSR6vr3hhzDg5OQlpa5Zu-9HRrUt44XVa_oSQoafiG5eAwbXZpMmU8UmImer0foBbRbO0pgt2ZjuA56Wiv4ExM-qCVMBc08N9hho4-f4Pm0HU_-frEAHmc2d51oEEHKcUzSfasDD9OU8YjKwcu1eiOaJvi2QCIl?purpose=fullsize"
                        ],
                        "price": null,
                        "price_str": "$125",
                        "rating": null,
                        "thumbnail": "https://images.openai.com/static-rsc-4/O2Bqob-_-Bs6Z7PviWstxsP9wCePklqoGx07MS20H-r-quUhKQ-9z_pr2I-HLJlwpvB9OP1iSSb_jnum5jg5wWy01I1G0liR0zBhtdsO-KWU2eYBPwMokt8H7nnxghlrDW1ugtfFsxAwByruujjHEt4XfmZTbfTxTcpDC8IKcRc?purpose=inline",
                        "title": "Brooks Adrenaline GTS 25",
                        "url": "https://www.brooksrunning.com/"
                    },
                    {
                        "badge": "平衡支撑最佳",
                        "citations": [
                            {
                                "source": "RunRepeat",
                                "title": "2026 年扁平足最佳 7 款跑鞋",
                                "url": "https://runrepeat.com/guides/best-flat-feet-running-shoes?utm_source=chatgpt.com"
                            },
                            {
                                "source": "Road Runner Sports",
                                "title": "扁平足最佳跑鞋",
                                "url": "https://www.roadrunnersports.com/blog/best-running-shoes-flat-feet/?utm_source=chatgpt.com"
                            }
                        ],
                        "currency": null,
                        "description": "2. ASICS GT-2000 15\n平衡支撑最佳\n$140–$150\n一款均衡的稳定支撑鞋，具有响应灵敏的缓震和自适应引导。如果你想要支撑，但又不想要最大支撑型跑鞋那种厚重感，这双值得一试。\nBest for: 日常里程、跑步机跑步和中等支撑。",
                        "image_page_title": "Asics GT-2000 15 Laufschuhe Herren | Plutosport",
                        "image_page_url": "https://www.plutosport.de/asics-gt-2000-15-laufschuhe-herren-1011c235-001",
                        "images": [
                            "https://images.openai.com/static-rsc-4/BO_Z8CKmL2QlNuP_2ECP1Ud6A7WAkHYR0Wj-nu4b0yV4Lgz_jBcdic8dRqX6_07ZtTll5pmnOb8v9CHg8dLvWu7vfbh_E-QCTG8zt0FSYfgkTgCdO6o-iZitNVYV33Lq0OSYhNoutGoUSKgPDCqaXmDmnktlmNuWxMHY6xfDuZTjlv2X8iDDqcP_NGpViIvE?purpose=fullsize",
                            "https://images.openai.com/static-rsc-4/mtAYtg3fr9TncCfQgbDCKsN0kJY7GOHjRc0kfphZLQidJ99YZAwDATMmLZFtnqZDszoN7Fma2TmpYrypqgbItq7NyJdaInYylqf5oL2qzabr1bJ-TdrM27FkWC6jKF69oov0oftFnetBx5dXPYliJ27LRH4On_RXWDKMtKeK8cRlZlpeayCeOoRpLdSTuILP?purpose=fullsize",
                            "https://images.openai.com/static-rsc-4/z3To9ui7l6_x0i9e3yeqD2MkZFxZTZVNKrcvOx02pCfapZbE49waYMFtvOPu1DWcw7D-Tge2LWN6PppwmnG09OXB8TereCu81iFTjV97-PyUDAbrUefgtl3f8WMvBZCRb-rV1uJaObdt8zcp2wUSDuOzGGnRqSEHdwfXlxman832mJt-do1MkG6TYT0x7zEr?purpose=fullsize",
                            "https://images.openai.com/static-rsc-4/qspg2X__xKWR-m5SBZtrlJa2VcOjOhFWV5R6SW1UcgFfiMUq6q_EdmIT0MYMRqRs5nM51olKFzxDHZZ-g_epwC6xbqpVy22CCQxHZHQ1YiEgZZE2NIpOHtpnrtiCkqnbMi5exkF1-4zcCyz64XCnnVliO1dItgKwyhJ31ziViBJCr3Qd0ilC05eMncw8--7v?purpose=fullsize",
                            "https://images.openai.com/static-rsc-4/z49nBl6_wyYNMrq0saUr5PcTjzCndaIWTtvw9MOp4Cv-pBv9DytMT5x6KrbV067LowRynbYZjradEvMpeOmjV8mpqN-I3KdbDfhimRjQ59QHeUFE5duCGGGRHF0_gS0pVHsiDYuUxD6gWBrxUUN4SLMcZAGDv4-u2w2bHpsHLl4EfuOUzARXnzT08rQCervX?purpose=fullsize",
                            "https://images.openai.com/static-rsc-4/y0AqGd1C-CQJPPK1UwX9oqoHdC-oCHup77ZkwBOidZHV2j_-G6Qjc3-wPbADXV-N5GfCEvNTuad_fWrfCIwOuEeWBkaCMP8fwOGlOvOs9GjsNMFO4Oln28HFW7BnbdzUbgTHaqBHBnPq-AjHkYfoyD_yRy7qT4u11dkDYn0c4reK8jzd_0eX57PtQxcI1tKF?purpose=fullsize"
                        ],
                        "price": null,
                        "price_str": "$140–$150",
                        "rating": null,
                        "thumbnail": "https://images.openai.com/static-rsc-4/nD6cECoYa6IOA1fn8_lVHaklxpFfR8dbgzLMAXiZcjcpoX072yzcpb41TZzEXqpEKi3DXl2aVJ9oz4YMQ8JfzK4vxF9XkqD-mjk1ArmuXLCwB-jEOZflYfx5-UIl7qYIrLjY50O9TA9yL4dHjkKDHMc3cq7rlwInCowaKo27reA?purpose=inline",
                        "title": "ASICS GT-2000 15",
                        "url": "https://www.asics.com/us/en-us/"
                    },
                    {
                        "badge": "适合初学者",
                        "citations": [
                            {
                                "source": "Road Runner Sports",
                                "title": "扁平足最佳跑鞋",
                                "url": "https://www.roadrunnersports.com/blog/best-running-shoes-flat-feet/?utm_source=chatgpt.com"
                            },
                            {
                                "source": "nordstrom.com",
                                "title": "Nordstrom 的黑银配色 Saucony Guide 19 跑鞋，12 码",
                                "url": "https://www.nordstrom.com/s/guide-19-running-shoe-men/8882467?color=black%2F+silver&size=12&utm_campaign=genai_shopping&utm_medium=organic&width=w&utm_source=chatgpt.com"
                            }
                        ],
                        "currency": "USD",
                        "description": "3. Saucony Guide 19\n适合初学者\n$150\n其宽大平台和 CenterPath 支撑系统有助于引导你的步伐，而缓震中底则使其适合日常训练。\nBest for: 想要稳定、舒适脚感的新跑者。",
                        "image_page_title": "Saucony Men's Guide 19 Cushioned Running Shoes | SportChek",
                        "image_page_url": "https://www.sportchek.ca/en/pdp/saucony-men-s-guide-19-cushioned-running-shoes-85626243f.html",
                        "price": 150,
                        "price_str": "$150",
                        "rating": null,
                        "thumbnail": "https://images.openai.com/static-rsc-4/I5aw-GmeQTLZ6h1oFBCGAewLRU8xi62tmzzNfNmK3kP2UUg3w67dYVnwexp6baDRlep_o3LxfpPanXy4Ru9X2ZF3YxVvp6j0K6t8S4qaqnznPmmZPcnuBlVicKkHHDueYksJ4j41DBflfn-lXCcVGwjBXiiiinJAA0S0Knk8S6E?purpose=inline",
                        "title": "Saucony Guide 19",
                        "url": "https://www.saucony.com/"
                    },
                    {
                        "badge": "轻盈脚感最佳",
                        "citations": [
                            {
                                "source": "扁平足跑者的鞋款",
                                "title": "2026 年扁平足最佳 8 款跑鞋",
                                "url": "https://www.runnersworld.com/gear/a25750345/running-shoes-flat-feet/?utm_source=chatgpt.com"
                            },
                            {
                                "source": "Yahoo 购物",
                                "title": "你需要稳定支撑跑鞋吗？足病医生和编辑推荐这 7 双适合步行和跑步的鞋",
                                "url": "https://shopping.yahoo.com/health/fitness/articles/stability-shoes-podiatrists-editors-recommend-191148720.html?utm_source=chatgpt.com"
                            }
                        ],
                        "currency": null,
                        "description": "4. HOKA Arahi 8\n轻盈脚感最佳\n$120–$150\nHOKA 的 H-Frame 支撑有助于限制过度内旋。摇椅式鞋底促进平稳过渡，而且这双鞋比许多稳定支撑款更轻盈、不笨重。\nBest for: 想要稳定性但又希望脚感更利落的跑者。",
                        "image_page_title": "Women's HOKA ONE ONE Arahi 8\n – Pacers Running",
                        "image_page_url": "https://runpacers.com/products/womens-hoka-one-one-arahi-8-birch-alabaster",
                        "price": null,
                        "price_str": "$120–$150",
                        "rating": null,
                        "thumbnail": "https://images.openai.com/static-rsc-4/SmiNYwJModoU7Yj6YqlH20ShcBErwjJXnGWYv4jp9uSHv8N93XwGEMFEgS1wqOOjyIEaaCrmrrV0bfTDJLnOWTe-POGXLnnNfvCHqOZSqCE9CJIIYpjl-aRt6K7EYIv0pcZ9v3QLf-bUCKsD6J4_h6s7dHXublF2JvZcVr0qK3U?purpose=inline",
                        "title": "HOKA Arahi 8",
                        "url": "https://www.hoka.com/"
                    },
                    {
                        "badge": "性价比最佳",
                        "citations": [
                            {
                                "source": "买家指南",
                                "title": "2026 年最佳稳定支撑跑鞋",
                                "url": "https://www.fleetfeet.com/running-shoe-buyers-guide/best-stability?utm_source=chatgpt.com"
                            },
                            {
                                "source": "Outside Online",
                                "title": "2026 年最佳 11 款稳定支撑跑鞋",
                                "url": "https://www.outsideonline.com/outdoor-gear/run/best-stability-shoes?scope=anon&utm_source=chatgpt.com"
                            }
                        ],
                        "currency": null,
                        "description": "5. New Balance Fresh Foam X 860 v14\n性价比最佳\n$100–$110 on sale\n一款带有宽大、稳定平台的日常训练鞋，兼具支撑与缓震。如果你想省钱，上一代也值得考虑，而且 New Balance 提供多种宽度选择。\nBest for: 注重预算的跑者和需要额外宽度的人。",
                        "image_page_title": "New Balance 紐巴倫 Fresh Foam X 860v14 男 慢跑鞋_M860S14-2E - PChome 24h購物",
                        "image_page_url": "https://24h.pchome.com.tw/prod/DXAX69-A900IXKZ7",
                        "price": null,
                        "price_str": "$100–$110",
                        "rating": null,
                        "thumbnail": "https://images.openai.com/static-rsc-4/jGTPZGasulixP1nGGqKd_Ei9ikMqELyMaGGO7M07EDpUWml8q61iIk1rNoMLp1wsq5bYm7xNkaN6u6LuPUoxMrqmhgsF-2vcUQIJV7oh98Ym4tDBVDngu9T80zSrlaFhvh55emHlsBTck3Qhut_DVmFuyId4lWrRroOuLeiWvEI?purpose=inline",
                        "title": "New Balance Fresh Foam X 860 v14",
                        "url": "https://www.newbalance.com/"
                    }
                ]
    ...
```

</details>

{% hint style="warning" %}
响应的组成可能因查询是否来自 **桌面端** 或 **移动端** 设备而异。
{% endhint %}

### 输出数据字典

#### HTML 示例

<figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-cb12a6dab81c0843699e150f596d72e0b5041eda%2FScreenshot%202025-07-21%20at%2012.54.42.png?alt=media" alt=""><figcaption></figcaption></figure>

#### JSON 结构

所有 LLM 目标都会返回相同的顶级 `job` 和 `results[]` 封装。参见 [LLMs 和 AI](https://developers.oxylabs.io/api-reference/cn/zhuan-yong-zhua-qu-qi/llm-yu-ai-zhua-qu-qi.md) 查看完整的元数据参考。

下表显示 ChatGPT 特定字段 `results[].content` 字段：

{% hint style="info" %}
特定结果类型的项目和字段数量可能会因提交的提示而异。

此外，解析后的字段遵循 ChatGPT 当前的布局，当 ChatGPT 更改布局时也可能随之变化。
{% endhint %}

<table><thead><tr><th width="173">字段</th><th width="476">说明</th><th width="90">类型</th></tr></thead><tbody><tr><td><code>prompt</code></td><td>提交以生成结果的提示词。</td><td>字符串</td></tr><tr><td><code>response_text</code></td><td>来自 ChatGPT 的纯文本响应。</td><td>字符串</td></tr><tr><td><code>markdown_text</code></td><td>以 Markdown 形式呈现的 ChatGPT 响应。</td><td>字符串</td></tr><tr><td><code>markdown_json</code></td><td>Markdown 响应的结构化 JSON 表示。每个条目包含 <code>type</code> 和 <code>children</code>.</td><td>数组</td></tr><tr><td><mark style="background-color:yellow;"><code>citations</code></mark></td><td>响应来源引用列表。对象包含 <code>title</code>, <code>url</code>, <code>text</code>，以及 <code>description</code>.</td><td>数组</td></tr><tr><td><mark style="background-color:yellow;"><code>links</code></mark></td><td>内联来源链接详情对象列表： <code>url</code> 和 <code>text</code>.</td><td>数组</td></tr><tr><td><mark style="background-color:yellow;"><code>shopping_products</code></mark></td><td>ChatGPT 推荐的商品列表，如答案中的商品卡片所示。对象包含 <code>title</code>, <code>url</code> (商品页面链接)， <code>price</code>, <code>price_str</code>, <code>currency</code>, <code>商家</code> (销售该商品的商店)， <code>badge</code> (ChatGPT 为该商品添加的标签，例如 "综合最佳")， <code>description</code> (ChatGPT 对该商品的描述)， <code>thumbnail</code>, <code>image_page_title</code> 和 <code>image_page_url</code> (卡片图片来源网页的标题和 URL，可能与 <code>商家</code>), <code>rating</code> (商店列表中的商品星级评分)， <code>citations</code>，以及 <code>offers</code>.</td><td>数组</td></tr><tr><td><code>shopping_products.offers</code></td><td>该商品的商家报价。ChatGPT 通常每个商品列出一个商店。对象包含 <code>商家</code>, <code>price</code>, <code>price_str</code>, <code>currency</code>, <code>url</code>，以及 <code>details</code> (可用性和配送详情，按页面显示)。</td><td>数组</td></tr><tr><td><code>shopping_products.citations</code></td><td>ChatGPT 为该商品引用的来源。对象包含 <code>source</code> (网站或出版物名称)， <code>title</code>，以及 <code>url</code>.</td><td>数组</td></tr><tr><td><mark style="background-color:yellow;"><code>ads</code></mark></td><td>广告详情，包含 <code>url</code>, <code>title</code>, <code>image_url</code>, <code>description</code>，以及一个 <code>advertiser_info</code> 对象。</td><td>数组</td></tr><tr><td><mark style="background-color:yellow;"><code>ads.advertiser_info</code></mark></td><td>包含广告主信息的对象 <code>url</code>, <code>name</code>，以及 <code>image_data</code>.</td><td>对象</td></tr><tr><td><code>raw_response</code></td><td>来自 ChatGPT 的原始流式响应，每个条目一行。</td><td>字符串数组</td></tr><tr><td><code>parse_status_code</code></td><td><code>12000</code> – 成功。否则，解析器未能提取部分或全部结构化字段。</td><td>整数</td></tr></tbody></table>

&#x20;    － 条件性返回，仅当内容出现在 LLM 的响应中。


---

# 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 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/products/cn/web-scraper-api/mu-biao/llms-he-ai/chatgpt.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 `automate deployments from our CI pipeline` 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.
