Website Title, Keywords, and Description
Website Title, Keywords, and Description#
Retrieves a website's title, keywords, and description (TDK).| Request URL#
Request URL: https://tools.gname.com/v1/query| Request Method#
Request body format: multipart/form-data.| Request Parameters#
| Field | Parameter | Type | Required | Description |
|---|
| APPID | appid | String | Yes | API application ID. See Common Parameters. |
| Timestamp | timestamp | Integer | Yes | Current Unix timestamp in seconds. The difference from server time must not exceed 300 seconds. |
| Signature | sign | String | Yes | Request signature. See Signature Method. |
| Query Type | code | String | Yes | Always pass site_tdk. |
| Domain | ym | String | Yes | Domain to query, such as baidu.com, without a protocol, port, or path. |
| Query Mode | user_agent | Integer | No | Select a direct query or simulate a specific search engine crawler. See the values below. |
| Value | Meaning |
|---|
0 | Direct query |
2 | Baidu crawler |
3 | 360 crawler |
4 | Sogou crawler |
5 | Shenma crawler |
The current endpoint defaults to 1 when user_agent is omitted. To perform a direct query, explicitly pass 0.appid, timestamp, code, ym, and any additional fields actually sent must be included in the signature calculation. Exclude sign itself.| Response Envelope#
| Field | Parameter | Type | Description |
|---|
| Status Code | code | Integer | Request processing status. 1 indicates success; other values indicate failure. |
| Message | msg | String | Message describing the request processing result. |
| Response Data | data | Object / Array | An object containing the query result on success. On failure, this may be an error details object or an empty array; not all fields are guaranteed to be present. |
| Response Data#
On a successful query, the following fields are in data.| Field | Parameter | Type | Description |
|---|
| APPID | appid | String | API application ID used for this request. |
| Query Type | code | String | Query type for this request. The value is site_tdk. |
| Domain | ym | String | Domain queried in this request. |
| Points Charged | cost_points | Integer | Query package points actually charged for this query, based on the current price of the query type. |
| Query Record ID | rw_id | String | Unique ID for this query record, used for tracing and reconciliation. |
| Query Result | result | Object | Website Title, Keywords, and Description result. |
The following fields are in data.result.| Field | Parameter | Type | Description |
|---|
| Request Status | err_code | String / Integer | Request status. 200 indicates a successful HTTP request. You must also check the inner query status, data.code. |
| Request Message | err_msg | String | Request message, such as ok. This alone does not establish business success. |
| Query Response | data | Object | Query status and the specific business result. |
| Result Updated At | gxsj | String | Time when the query result was updated, in YYYY-MM-DD HH:mm:ss format. |
The following fields are in data.result.data.| Field | Parameter | Type | Description |
|---|
| Query Status | code | String / Integer | 1 indicates query success; other values indicate failure. Read the business result for indexing, SEO weight, or risk status. |
| Query Message | msg | String | Result message. It may be empty or omitted. Determine success from the status code. |
| Detailed Result | data | Object | Detailed business result. See the fields below. |
The following fields are in data.result.data.data.| Field | Parameter | Type | Description |
|---|
| Domain | ym | String | Website domain queried in this request. |
| Website Title | title | String | Title text of the website page. |
| Keyword | keywords | String | Meta Keywords of the website page. Empty if not set or unavailable. |
| Description | description | String | Meta Description of the website page. Empty if not set or unavailable. |
| Additional Query Information | cha_info | Object | Additional query information returned by the data source. |
The following fields are in data.result.data.data.cha_info.| Field | Parameter | Type | Description |
|---|
| Query Category | c | String | Query category returned by the data source, such as info. |
| Domain | ym | String | Website domain queried in this request. |
| Query Mode Identifier | ua | String | Query mode used for this request, corresponding to the user_agent request parameter. See Request Parameters for value meanings. Defaults to 1 if user_agent is omitted. |
| Example Response#
{
"code": 1,
"msg": "查询成功",
"data": {
"appid": "2026102222460250146194",
"code": "site_tdk",
"ym": "baidu.com",
"cost_points": 1,
"rw_id": "20261028160353_affdff2ab2a3882534b41c3b111b46d5",
"result": {
"err_code": "200",
"err_msg": "ok",
"data": {
"code": "1",
"msg": "ok",
"data": {
"ym": "baidu.com",
"title": "百度一下,你就知道",
"keywords": "",
"description": "全球领先的中文搜索引擎、致力于让网民更便捷地获取信息,找到所求。百度超过千亿的中文网页数据库,可以瞬间找到相关的搜索结果。",
"cha_info": {
"c": "info",
"ym": "baidu.com",
"ua": "1"
}
}
},
"gxsj": "2026-10-28 16:03:53"
}
}
}
Modified at 2026-10-29 13:15:55