# Query with Localization

Baidu results can be localized by setting the interface language used during the query.

### Parameter for Language

The SERP API provides an optional parameter to control the UI language for your Baidu search:

**`ct` (Optional):**

* `0` = **All languages** (no language restriction; default behavior)
* `1` = **Simplified Chinese** (简体中文)
* `2` = **Traditional Chinese** (繁體中文)

**Notes**

* `ct` affects the Baidu UI/interface we simulate and tends to bias snippets/results toward that script. It does **not** translate content.
* Avoid combining strict localization with domain scoping: if you use `q6` (site filter)
* Some verticals/pages may partially ignore `ct`.

### Example

To customize your SERP API request with a specific interface language, include the `ct` parameter in your GET request.

```bash
curl --location 'https://serp-api.netnut.io/search/get-html?siteType=baidu&wd=%E6%B6%88%E6%81%AF&ct=1&rawHtml=1' \
--header 'Authorization: Basic base64(username:password)'
```

**Expected Result:**

* Interface/script preference: **Simplified Chinese**.
* Results/snippets favor **简体中文** content where available.
* Baidu simulates a user searching with a **Chinese (Simplified) UI**.

### API Response Example

```json
{
  "url": "https://www.baidu.com/s?wd=%E6%B6%88%E6%81%AF&ct=1",
  "engine": "baidu",
  "general": {
    "id": "string",
    "timestamp": "2025-08-20 14:16:24 UTC",
    "baidu_url": "https://www.baidu.com/s?wd=%E6%B6%88%E6%81%AF&ct=1",
    "resultscount": 0
  },
  "input": {
    "wd": "消息",
    "ct": "1",
    "device": "desktop",
    "engine": "baidu"
  },
  "organic_results": [
    {
      "position": 1,
      "title": "string",
      "snippet": "string",
      "link": "string",
      "displayed_link": "string",
      "tracking_link": "string",
      "thumbnail": "string"
    }
  ],
  "pagination": {
    "current": 1,
    "next": "string",
    "other_pages": {
      "2": "string",
      "3": "string"
    }
  },
  "html": "string"
}

```


---

# Agent Instructions: 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:

```
GET https://help.netnut.io/netnut-documentation/netnut-scraper-apis/serp-api/baidu-search/api-example/query-with-localization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
