> 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/dian-zi-shang-wu/etsy.md).

# Etsy

了解如何开始抓取 Etsy。

使用 网页爬虫API，您可以抓取各种类型的 **Etsy** 页面；下面是所有受支持爬虫及其各自 `source` 值的概览。响应会在 `content`中返回页面 HTML，采用 [Realtime](https://developers.oxylabs.io/products/cn/web-scraper-api/integration-methods/realtime.md) 和 [Push-Pull](https://developers.oxylabs.io/products/cn/web-scraper-api/integration-methods/push-pull.md)。产品页面也可以通过 structured data 以及 `parse: true`，请参见 [商品](#product).

{% hint style="warning" %}
对于某些目标，我们的系统 **强制进行 JavaScript 渲染** 即使您未设置 `render`；这些请求会计为已渲染流量。强制渲染的目标列表以及如何关闭渲染，请见 [对特定页面强制渲染](https://developers.oxylabs.io/products/cn/web-scraper-api/features/js-rendering-and-browser-control.md#forcing-rendering-on-specific-pages).
{% endhint %}

<table><thead><tr><th width="250">Source</th><th>说明</th></tr></thead><tbody><tr><td><code>etsy_search</code></td><td><a href="#search"><strong>搜索页</strong></a> 用于您选择的搜索词。</td></tr><tr><td><code>etsy_product</code></td><td><a href="#product"><strong>商品页</strong></a> 您选择的产品 ID。提供专用解析器。</td></tr></tbody></table>

任何其他 Etsy 页面都可以通过传入其 `url` 即可抓取，无需 `source` 其他参数。

{% hint style="info" %}
除了下面列出的参数外，您还可以添加其他参数，例如 `user_agent_type`, `geo_location`, `render`等，以自定义您的抓取请求。更多信息见 [这里](https://developers.oxylabs.io/products/cn/web-scraper-api/features.md).
{% endhint %}

## 搜索

### 请求示例

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

```bash
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "etsy_search",
        "query": "earrings"
    }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from pprint import pprint

# Structure payload.
payload = {
    'source': 'etsy_search',
    'query': 'earrings'
}

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

# Instead of response with job status and results url, this will return the
# JSON response with the result.
pprint(response.json())
```

{% endtab %}

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

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

const username = "USERNAME";
const password = "PASSWORD";
const body = {
    source: "etsy_search",
    query: "earrings"
};

const options = {
    hostname: "realtime.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="HTTP" %}

```http
您提交的整个字符串必须进行 URL 编码。

https://realtime.oxylabs.io/v1/queries?source=etsy_search&query=earrings&access_token=12345abcde
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$params = array(
    'source' => 'etsy_search',
    'query' => 'earrings'
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://realtime.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": "etsy_search",
        "query": "earrings",
    }

    jsonValue, _ := json.Marshal(payload)

    client := &http.Client{}
    request, _ := http.NewRequest("POST",
        "https://realtime.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 = "etsy_search",
                query = "earrings"
            };

            var client = new HttpClient();

            Uri baseUri = new Uri("https://realtime.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.JSONObject;
import java.util.concurrent.TimeUnit;

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", "etsy_search");
        jsonObject.put("query", "earrings");

        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)
                .readTimeout(180, TimeUnit.SECONDS)
                .build();

        var mediaType = MediaType.parse("application/json; charset=utf-8");
        var body = RequestBody.create(jsonObject.toString(), mediaType);
        var request = new Request.Builder()
                .url("https://realtime.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": "etsy_search",
    "query": "earrings"
}
```

{% endtab %}
{% endtabs %}

### 请求参数值 <a href="#request-parameter-values" id="request-parameter-values"></a>

<table><thead><tr><th width="180">参数</th><th>说明</th><th width="160">默认值</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong><code>source</code></strong></mark></td><td>设置抓取器。</td><td><code>etsy_search</code></td></tr><tr><td><mark style="background-color:green;"><strong><code>query</code></strong></mark></td><td>要搜索商品的关键词或短语。</td><td>-</td></tr><tr><td><code>start_page</code></td><td>起始页码。</td><td>1</td></tr><tr><td><code>store_id</code></td><td>可选的店铺位置筛选，见 <a href="#localization-and-filtering">本地化和过滤</a>.</td><td>-</td></tr></tbody></table>

&#x20;   \- 必填参数

## 商品 <a href="#product" id="product"></a>

### 请求示例

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

```bash
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "etsy_product",
        "product_id": "1858266469",
        "parse": true
    }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from pprint import pprint

# Structure payload.
payload = {
    'source': 'etsy_product',
    'product_id': '1858266469',
    'parse': True
}

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

# Instead of response with job status and results url, this will return the
# JSON response with the result.
pprint(response.json())
```

{% endtab %}

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

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

const username = "USERNAME";
const password = "PASSWORD";
const body = {
    source: "etsy_product",
    product_id: "1858266469",
    parse: true
};

const options = {
    hostname: "realtime.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="HTTP" %}

```http
您提交的整个字符串必须进行 URL 编码。

https://realtime.oxylabs.io/v1/queries?source=etsy_product&product_id=1858266469&parse=true&access_token=12345abcde
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$params = array(
    'source' => 'etsy_product',
    'product_id' => '1858266469',
    'parse' => true
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://realtime.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": "etsy_product",
        "product_id": "1858266469",
        "parse": true,
    }

    jsonValue, _ := json.Marshal(payload)

    client := &http.Client{}
    request, _ := http.NewRequest("POST",
        "https://realtime.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 = "etsy_product",
                product_id = "1858266469",
                parse = true
            };

            var client = new HttpClient();

            Uri baseUri = new Uri("https://realtime.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.JSONObject;
import java.util.concurrent.TimeUnit;

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", "etsy_product");
        jsonObject.put("product_id", "1858266469");
        jsonObject.put("parse", true);

        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)
                .readTimeout(180, TimeUnit.SECONDS)
                .build();

        var mediaType = MediaType.parse("application/json; charset=utf-8");
        var body = RequestBody.create(jsonObject.toString(), mediaType);
        var request = new Request.Builder()
                .url("https://realtime.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": "etsy_product",
    "product_id": "1858266469",
    "parse": true
}
```

{% endtab %}
{% endtabs %}

### 请求参数值 <a href="#request-parameter-values" id="request-parameter-values"></a>

<table><thead><tr><th width="180">参数</th><th>说明</th><th width="160">默认值</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong><code>source</code></strong></mark></td><td>设置抓取器。</td><td><code>etsy_product</code></td></tr><tr><td><mark style="background-color:green;"><strong><code>product_id</code></strong></mark></td><td>产品页面 URL 中的 listing ID，例如 <code>etsy.com/listing/</code><strong><code>1858266469</code></strong><code>/freshwater-pearl-drop-earringsbridal</code>.</td><td>-</td></tr><tr><td><code>parse</code></td><td>设置为时返回解析后的数据 <code>true</code>。查看输出数据字典。</td><td><code>false</code></td></tr></tbody></table>

&#x20;   \- 必填参数

### 响应示例 <a href="#response-example" id="response-example"></a>

某个 listing 的解析后产品页面 `1858266469`:

```json
{
    "results": [
        {
            "content": {
                "url": "https://www.etsy.com/listing/1858266469/freshwater-pearl-drop-earringsbridal",
                "price": 28,
                "title": "Freshwater Pearl Drop Earrings,Bridal Pearl Earrings,18K Gold Dangle Earrings,Wedding Earrings,Bridesmaid Gift,Wedding Gift,Bridal Jewelry",
                "images": [
                    "https://i.etsystatic.com/55594479/r/il/8c24e4/6566024892/il_75x75.6566024892_rdzf.jpg",
                    "https://v.etsystatic.com/video/upload/ar_1:1,c_fill,h_105,q_auto,w_105/WhatsApp_Video_2025-01-13_at_22.30.02_saxoj7.jpg",
                    "https://i.etsystatic.com/55594479/r/il/8784b7/6614140713/il_75x75.6614140713_mhgj.jpg",
                    "https://i.etsystatic.com/55594479/r/il/9febbb/6614140547/il_75x75.6614140547_6x1v.jpg",
                    "https://i.etsystatic.com/55594479/r/il/90ccaf/6566024810/il_75x75.6566024810_c7qt.jpg"
                ],
                "seller": {
                    "url": "https://www.etsy.com/shop/Divanjewelrygold?ref=shop-header-name&listing_id=1858266469&from_page=listing",
                    "title": "Divanjewelrygold",
                    "rating": 4.7059,
                    "best_seller": false,
                    "star_seller": false
                },
                "currency": "USD",
                "shipping": {
                    "from": ""
                },
                "avg_price": 33.33,
                "max_price": 36,
                "min_price": 28,
                "old_price": 35,
                "categories": [
                    {
                        "title": "Homepage"
                    },
                    {
                        "title": "Jewelry"
                    },
                    {
                        "title": "Earrings"
                    },
                    {
                        "title": "Dangle & Drop Earrings"
                    }
                ],
                "customized": false,
                "product_id": "1858266469",
                "variation_count": 3,
                "parse_status_code": 12000
            },
            "created_at": "2025-03-04 12:25:23",
            "updated_at": "2025-03-04 12:25:37",
            "page": 1,
            "url": "https://www.etsy.com/listing/1858266469/freshwater-pearl-drop-earringsbridal",
            "job_id": "7302665462838490113",
            "is_render_forced": false,
            "status_code": 200,
            "parser_type": "etsy_product"
        }
    ]
}
```

### 输出数据字典 <a href="#output-data-dictionary" id="output-data-dictionary"></a>

下表列出了我们解析的每个产品页面元素的详细列表，以及它们的说明和数据类型。表中还包括一些元数据。

<table><thead><tr><th width="237">键</th><th width="372">说明</th><th>类型</th></tr></thead><tbody><tr><td><code>url</code></td><td>Etsy 产品页面的 URL。</td><td>字符串</td></tr><tr><td><code>price</code></td><td>产品价格。</td><td>浮点数</td></tr><tr><td><code>title</code></td><td>产品标题。</td><td>字符串</td></tr><tr><td><code>images</code></td><td>产品图片 URL 数组。</td><td>数组</td></tr><tr><td><code>卖家</code></td><td>卖家对象，包含卖家详情（见下文）。</td><td>对象</td></tr><tr><td><code>currency</code></td><td>价格所使用的货币。</td><td>字符串</td></tr><tr><td><code>shipping</code></td><td>配送对象，包含配送详情。</td><td>对象</td></tr><tr><td><code>shipping.from</code></td><td>配送的发货国。</td><td>字符串</td></tr><tr><td><code>avg_price</code></td><td>跨产品变体的平均价格。</td><td>浮点数</td></tr><tr><td><code>min_price</code></td><td>跨产品变体的最低价格。</td><td>浮点数</td></tr><tr><td><code>max_price</code></td><td>跨产品变体的最高价格。</td><td>浮点数</td></tr><tr><td><code>old_price</code></td><td>产品折扣前的原价。</td><td>浮点数</td></tr><tr><td><code>categories</code></td><td>产品所属的类目对象数组。</td><td>数组</td></tr><tr><td><code>categories.title</code></td><td>类目标题。</td><td>字符串</td></tr><tr><td><code>customized</code></td><td>表示产品是否可定制。</td><td>布尔值</td></tr><tr><td><code>product_id</code></td><td>产品的唯一标识符。</td><td>字符串</td></tr><tr><td><code>variation_count</code></td><td>该产品可用变体数量。</td><td>整数</td></tr><tr><td><code>parse_status_code</code></td><td>解析任务的状态码。您可以查看所述的解析器状态码 <strong>这里</strong>.</td><td>整数</td></tr><tr><td><code>created_at</code></td><td>抓取任务创建时的时间戳。</td><td>时间戳</td></tr><tr><td><code>updated_at</code></td><td>抓取任务完成时的时间戳。</td><td>时间戳</td></tr><tr><td><code>page</code></td><td>结果分页中的页码。</td><td>整数</td></tr><tr><td><code>status_code</code></td><td>被抓取页面的 HTTP 状态码。</td><td>整数</td></tr><tr><td><code>parser_type</code></td><td>用于提取数据的解析器类型。</td><td>字符串</td></tr><tr><td><code>job_id</code></td><td>与该抓取任务关联的任务 ID。</td><td>字符串</td></tr></tbody></table>

#### **卖家**

<table><thead><tr><th width="237">键（seller）</th><th width="372">说明</th><th>类型</th></tr></thead><tbody><tr><td><code>url</code></td><td>卖家页面的 URL。</td><td>字符串</td></tr><tr><td><code>title</code></td><td>卖家的名称。</td><td>字符串</td></tr><tr><td><code>rating</code></td><td>卖家的评分。</td><td>浮点数</td></tr><tr><td><code>best_seller</code></td><td>表示卖家是否为畅销卖家。</td><td>布尔值</td></tr><tr><td><code>star_seller</code></td><td>表示卖家是否为星级卖家。</td><td>布尔值</td></tr><tr><td><code>reviews_count</code></td><td>卖家的评价数量（可选）。</td><td>整数</td></tr></tbody></table>

## 本地化和过滤 <a href="#localization-and-filtering" id="localization-and-filtering"></a>

在搜索页面上，Etsy 会按访客所在国家的货币和语言显示价格。使用 `geo_location` 加上国家名称即可获取该市场的结果，例如 `英国` （英式英语，价格以 £ 显示）或 `德国` （德语，价格以 € 显示）。如果不使用 `geo_location`，则结果将按美国（US $）返回。Etsy 不支持将邮政编码作为 `geo_location` Etsy 上的值。可接受的值请参见 [Proxy location](https://developers.oxylabs.io/products/cn/web-scraper-api/features/localization/proxy-location.md).

<table><thead><tr><th width="115.4765625">参数</th><th width="130.69921875">适用于</th><th>说明</th><th width="90">默认值</th></tr></thead><tbody><tr><td><code>store_id</code></td><td><code>etsy_search</code></td><td>店铺位置筛选器，类型为整数。使用 Etsy 添加到搜索 URL 中的 location ID 作为 <code>locationQuery</code> 当你在网站上选择店铺位置时，例如 <code>2635167</code> 用于英国，或 <code>6252001</code> 用于美国。</td><td>-</td></tr></tbody></table>

```json
{
    "source": "etsy_search",
    "query": "earrings",
    "store_id": 2635167
}
```


---

# 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/dian-zi-shang-wu/etsy.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.
