> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 异步请求

```txt wrap theme={null}
https://trends.google.com/trends/explore?q=pizza&brd_trends=timeseries,geo_map&brd_json=1
```

<ParamField path="async" type="boolean" default="false">
  在请求 URL 中设置 `async=true` 以启用异步请求。

  ```txt wrap theme={null}
  https://api.brightdata.com/request?async=true
  ```
</ParamField>

<Warning>
  趋势仅支持解析结果，即 `brd_json=1`
</Warning>

<Warning>
  我们仅支持 Google 趋势中的"现在热门"标签。不支持其他标签（例如"探索"、"首页"），因为它们需要登录访问才能实现完整功能。
</Warning>

## 参数

<ParamField query="q" type="string" required>
  搜索查询参数。指定您想要在 Google 上搜索的关键字或短语。

  ```Example theme={null}
  https://trends.google.com/trends/explore?q=pizza
  ```
</ParamField>

<ParamField query="brd_trends" type="string">
  要在 Google 趋势结果中显示特定的小部件数据，请使用以下小部件参数之一：

  * `timeseries`：检索时间序列小部件数据。
  * `geo_map`：检索地理地图小部件数据。

  ```txt wrap theme={null}
  https://trends.google.com/trends/explore?q=pizza&brd_trends=timeseries,geo_map&brd_json=1
  ```

  <Tip>
    \*\*对于多个小部件：\*\*用逗号分隔。例如 `timeseries,geo_map`
  </Tip>
</ParamField>

<RequestExample>
  ```shell cURL highlight={1} theme={null}
    curl -X POST https://api.brightdata.com/request?async=true \
    --header "Content-Type: application/json" \
    --header "Authorization: Bearer API_KEY" \
    --data '{
      "zone": "serp_api1",
      "url": "https://trends.google.com/trends/explore?q=pizza&brd_trends=timeseries,geo_map&brd_json=1",
      "format": "raw"
    }'
  ```

  ```shell Native proxy highlight={4} theme={null}
  curl -i --silent --compressed \
    -H "Content-Type: application/json"
    -H "Authorization: Bearer API_KEY" \
    -d $'{"country":"us","query":{"q":"pizza"}}'
    "https://api.brightdata.com/serp/req?customer=CUSTOMER_USERNAME&zone=ZONE_NAME"
  ```

  ```js Node.js highlight={2} theme={null}
  (async () => {
    const response = await fetch('https://api.brightdata.com/request?async=true', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer API_KEY'
      },
      body: JSON.stringify({
        zone: 'serp_api1',
        url: 'https://trends.google.com/trends/explore?q=pizza&brd_trends=timeseries,geo_map&brd_json=1',
        format: 'raw'
      })
    });
    
    const data = await response.text();
    console.log(data);
  })();
  ```

  ```python Python highlight={17} theme={null}
  import requests

  # API Configuration
  headers = {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer API_KEY',
  }

  payload = {
      'zone': 'serp_api1',
      'url': 'https://trends.google.com/trends/explore?q=pizza&brd_trends=timeseries,geo_map&brd_json=1',
      'format': 'raw'
  }

  # Make the request
  response = requests.post(
      'https://api.brightdata.com/request?async=true', 
      json=payload, 
      headers=headers
  )

  print(response.text)
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "widgets": [
      {
        "data": {
          "default": {
            "timelineData": [
              {
                "time": "1740268800",
                "formattedTime": "Feb 23 – Mar 1, 2025",
                "formattedAxisTime": "Feb 23, 2025",
                "value": [
                  73
                ],
                "hasData": [
                  true
                ],
                "formattedValue": [
                  "73"
                ]
              },
              {
                "time": "1740873600",
                "formattedTime": "Mar 2 – 8, 2025",
                "formattedAxisTime": "Mar 2, 2025",
                "value": [
                  68
                ],
                "hasData": [
                  true
                ],
                "formattedValue": [
                  "68"
                ]
              },
              {
                "time": "1741478400",
                "formattedTime": "Mar 9 – 15, 2025",
                "formattedAxisTime": "Mar 9, 2025",
                "value": [
                  69
                ],
                "hasData": [
                  true
                ],
                "formattedValue": [
                  "69"
                ]
              },
              {
                "time": "1742083200",
                "formattedTime": "Mar 16 – 22, 2025",
                "formattedAxisTime": "Mar 16, 2025",
                "value": [
                  70
                ],
                "hasData": [
                  true
                ],
                "formattedValue": [
                  "70"
                ]
              },
              {
                "time": "1742688000",
                "formattedTime": "Mar 23 – 29, 2025",
                "formattedAxisTime": "Mar 23, 2025",
                "value": [
                  69
                ],
                "hasData": [
                  true
                ],
                "formattedValue": [
                  "69"
                ]
              },
              {
                "time": "1743292800",
                "formattedTime": "Mar 30 – Apr 5, 2025",
                "formattedAxisTime": "Mar 30, 2025",
                "value": [
                  73
                ],
                "hasData": [
                  true
                ],
                "formattedValue": [
                  "73"
                ]
              },
              {
                "time": "1743897600",
                "formattedTime": "Apr 6 – 12, 2025",
                "formattedAxisTime": "Apr 6, 2025",
                "value": [
                  67
                ],
                "hasData": [
                  true
                ],
                "formattedValue": [
                  "67"
                ]
              },
              {
                "time": "1744502400",
                "formattedTime": "Apr 13 – 19, 2025",
                "formattedAxisTime": "Apr 13, 2025",
                "value": [
                  71
                ],
                "hasData": [
                  true
                ],
                "formattedValue": [
                  "71"
                ]
              },
              {
                "time": "1745107200",
                "formattedTime": "Apr 20 – 26, 2025",
                "formattedAxisTime": "Apr 20, 2025",
                "value": [
                  71
                ],
                "hasData": [
                  true
                ],
                "formattedValue": [
                  "71"
                ]
              },
              {
                "time": "1745712000",
                "formattedTime": "Apr 27 – May 3, 2025",
                "formattedAxisTime": "Apr 27, 2025",
                "value": [
                  67
                ],
                "hasData": [
                  true
                ],
                "formattedValue": [
                  "67"
                ]
              }
            ],
            "averages": []
          }
        },
        "id": "TIMESERIES",
        "type": "fe_line_chart",
        "title": "Interest over time"
      },
      {
        "data": {
          "default": {
            "geoMapData": [
              {
                "geoCode": "PR",
                "geoName": "Puerto Rico",
                "value": [
                  100
                ],
                "formattedValue": [
                  "100"
                ],
                "maxValueIndex": 0,
                "hasData": [
                  true
                ]
              },
              {
                "geoCode": "IE",
                "geoName": "Ireland",
                "value": [
                  89
                ],
                "formattedValue": [
                  "89"
                ],
                "maxValueIndex": 0,
                "hasData": [
                  true
                ]
              },
              {
                "geoCode": "MF",
                "geoName": "St. Martin",
                "value": [
                  0
                ],
                "formattedValue": [
                  ""
                ],
                "maxValueIndex": 0,
                "hasData": [
                  false
                ]
              },
              {
                "geoCode": "VI",
                "geoName": "U.S. Virgin Islands",
                "value": [
                  0
                ],
                "formattedValue": [
                  ""
                ],
                "maxValueIndex": 0,
                "hasData": [
                  false
                ]
              },
              {
                "geoCode": "CA",
                "geoName": "Canada",
                "value": [
                  78
                ],
                "formattedValue": [
                  "78"
                ],
                "maxValueIndex": 0,
                "hasData": [
                  true
                ]
              },
              {
                "geoCode": "US",
                "geoName": "United States",
                "value": [
                  73
                ],
                "formattedValue": [
                  "73"
                ],
                "maxValueIndex": 0,
                "hasData": [
                  true
                ]
              },
              {
                "geoCode": "SX",
                "geoName": "Sint Maarten",
                "value": [
                  0
                ],
                "formattedValue": [
                  ""
                ],
                "maxValueIndex": 0,
                "hasData": [
                  false
                ]
              },
              {
                "geoCode": "BL",
                "geoName": "St. Barthélemy",
                "value": [
                  0
                ],
                "formattedValue": [
                  ""
                ],
                "maxValueIndex": 0,
                "hasData": [
                  false
                ]
              },
              {
                "geoCode": "AG",
                "geoName": "Antigua & Barbuda",
                "value": [
                  0
                ],
                "formattedValue": [
                  ""
                ],
                "maxValueIndex": 0,
                "hasData": [
                  false
                ]
              },
              {
                "geoCode": "MQ",
                "geoName": "Martinique",
                "value": [
                  0
                ],
                "formattedValue": [
                  ""
                ],
                "maxValueIndex": 0,
                "hasData": [
                  false
                ]
              }
            ]
          }
        },
        "id": "GEO_MAP",
        "type": "fe_geo_chart_explore",
        "title": "Interest by region"
      },
      {
        "data": {
          "default": {
            "rankedList": [
              {
                "rankedKeyword": [
                  {
                    "query": "pizza hut",
                    "value": 100,
                    "formattedValue": "100",
                    "hasData": true,
                    "link": "/trends/explore?q=pizza+hut&date=today+12-m"
                  },
                  {
                    "query": "pizza near me",
                    "value": 85,
                    "formattedValue": "85",
                    "hasData": true,
                    "link": "/trends/explore?q=pizza+near+me&date=today+12-m"
                  },
                  {
                    "query": "dominos pizza",
                    "value": 31,
                    "formattedValue": "31",
                    "hasData": true,
                    "link": "/trends/explore?q=dominos+pizza&date=today+12-m"
                  },
                  {
                    "query": "dominos",
                    "value": 30,
                    "formattedValue": "30",
                    "hasData": true,
                    "link": "/trends/explore?q=dominos&date=today+12-m"
                  },
                  {
                    "query": "domino's pizza",
                    "value": 24,
                    "formattedValue": "24",
                    "hasData": true,
                    "link": "/trends/explore?q=domino's+pizza&date=today+12-m"
                  },
                  {
                    "query": "pizza oven",
                    "value": 17,
                    "formattedValue": "17",
                    "hasData": true,
                    "link": "/trends/explore?q=pizza+oven&date=today+12-m"
                  },
                  {
                    "query": "pizza dough",
                    "value": 17,
                    "formattedValue": "17",
                    "hasData": true,
                    "link": "/trends/explore?q=pizza+dough&date=today+12-m"
                  },
                  {
                    "query": "pizza delivery",
                    "value": 15,
                    "formattedValue": "15",
                    "hasData": true,
                    "link": "/trends/explore?q=pizza+delivery&date=today+12-m"
                  },
                  {
                    "query": "city pizza",
                    "value": 12,
                    "formattedValue": "12",
                    "hasData": true,
                    "link": "/trends/explore?q=city+pizza&date=today+12-m"
                  },
                  {
                    "query": "pizza house",
                    "value": 12,
                    "formattedValue": "12",
                    "hasData": true,
                    "link": "/trends/explore?q=pizza+house&date=today+12-m"
                  },
                  {
                    "query": "best pizza near me",
                    "value": 12,
                    "formattedValue": "12",
                    "hasData": true,
                    "link": "/trends/explore?q=best+pizza+near+me&date=today+12-m"
                  },
                  {
                    "query": "crust pizza",
                    "value": 12,
                    "formattedValue": "12",
                    "hasData": true,
                    "link": "/trends/explore?q=crust+pizza&date=today+12-m"
                  },
                  {
                    "query": "pizza time",
                    "value": 11,
                    "formattedValue": "11",
                    "hasData": true,
                    "link": "/trends/explore?q=pizza+time&date=today+12-m"
                  },
                  {
                    "query": "pizza place",
                    "value": 10,
                    "formattedValue": "10",
                    "hasData": true,
                    "link": "/trends/explore?q=pizza+place&date=today+12-m"
                  },

  ```
</ResponseExample>
