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

# Whois 查询

> 查询域名的注册商、注册日期和域名服务器。

# Whois 查询

查询一个域名由谁管理、什么时候到期。每次查询返回当前的注册记录：注册商及其 IANA 编号、注册时间、最近更新时间和到期时间、域名状态码、域名服务器、是否启用 DNSSEC，记录中列出注册人组织和国家时一并返回。可以用来盯想要的域名什么时候到期、核实合作方域名注册了多久，或者盘点一批域名资产。

```json theme={"dark"}
{
  "target": "github.com"
}
```

通过 target 提供域名；子域名会按其注册域名查询。支持 .com、.net、.org 等通用后缀，以及 .uk、.ai 等国家和地区后缀。每返回一条注册记录计 5 积分。

## 标准结果字段

任务结果使用下方稳定的 SocQ 字段。系统会统一来源特有的字段名和格式，但不会推断或补充来源未提供的数据。如需缩小返回字段集合，MCP 查询使用 `fields`，Typed 工具使用 `_result_fields`，CLI 使用 `--result-fields`。声明字段的值为 `null` 时仍会保留。

| 字段 | 类型 | 可空 | 说明 |
| - | - | - | - |
| `id` | `string` | 是 | 注册域名本身，作为标识。 |
| `platform` | `string` | 否 | 结果所属的平台，例如 `instagram` 或 `linkedin`。 |
| `resource` | `string` | 否 | 该结果对应的 SocQ 资源，例如 `videos` 或 `comments`。 |
| `type` | `string` | 否 | 结果项的类别，例如 `video`、`post` 或 `comment`。 |
| `url` | `string` | 是 | 该域名的首页地址。 |
| `published_at` | `string` | 是 | 域名首次注册的时间，使用 ISO 8601 格式。 |
| `collected_at` | `string` | 否 | SocQ 采集或处理该结果的时间，使用 ISO 8601 格式。 |
| `domain` | `string` | 是 | 已注册的域名。 |
| `registrar` | `string` | 是 | 管理该域名的注册商名称。 |
| `registrar_iana_id` | `string` | 是 | 注册商的 IANA 编号。 |
| `registrant_organization` | `string` | 是 | 注册人所属组织，以公开注册记录为准。 |
| `registrant_country` | `string` | 是 | 注册人所在国家，以公开注册记录为准。 |
| `updated_at` | `string` | 是 | 注册记录最近一次变更的时间，使用 ISO 8601 格式。 |
| `expires_at` | `string` | 是 | 当前注册的到期时间，使用 ISO 8601 格式。 |
| `statuses` | `array<string>` | 是 | 域名状态码，例如 `client transfer prohibited`。 |
| `nameservers` | `array<string>` | 是 | 域名委派的域名服务器。 |
| `is_dnssec_signed` | `boolean` | 是 | 该域名是否启用了 DNSSEC 签名。 |

以下示例展示任务完成后的响应格式，具体数据以实际查询结果为准。

## 任务完成响应

```json theme={"dark"}
{
  "code": 200,
  "data": {
    "task_id": "example-seo-whois",
    "status": "succeeded",
    "public_id": "seo/whois",
    "result_count": 1,
    "credits_amount": 5,
    "results": {
      "limit": 50,
      "next_cursor": null,
      "has_more": false,
      "schema_id": "domain-registration",
      "schema_version": "1.0",
      "items": [
        {
          "id": "github.com",
          "platform": "seo",
          "resource": "whois",
          "type": "domain-registration",
          "url": "https://github.com",
          "published_at": "2007-10-09T18:20:50Z",
          "collected_at": "2026-11-17T14:43:28.384900Z",
          "domain": "github.com",
          "registrar": "MarkMonitor Inc.",
          "registrar_iana_id": "292",
          "registrant_organization": null,
          "registrant_country": null,
          "updated_at": "2026-09-07T09:22:52Z",
          "expires_at": "2028-10-09T18:20:50Z",
          "statuses": [
            "client delete prohibited",
            "client transfer prohibited",
            "client update prohibited"
          ],
          "nameservers": [
            "dns1.p08.nsone.net",
            "dns2.p08.nsone.net",
            "dns3.p08.nsone.net",
            "dns4.p08.nsone.net",
            "ns-1283.awsdns-32.org"
          ],
          "is_dnssec_signed": false
        }
      ]
    }
  }
}
```


## OpenAPI

````yaml zh/api-manual/agent-api/agent-api.json POST /v1/seo/whois
openapi: 3.1.0
info:
  title: SocQ Agent API 中文版
  version: v1-87892a6484c2
  description: 根据 SocQ 能力目录生成的异步社交数据 API。
servers:
  - url: https://api.socq.ai
security: []
paths:
  /v1/seo/whois:
    post:
      tags:
        - seo
      summary: Whois 查询
      description: 查询域名的注册商、注册日期和域名服务器。
      operationId: socq_seo_whois
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              additionalProperties: false
              properties:
                callback_url:
                  type: string
                  format: uri
                  description: 可选的任务完成回调 URL。
                target:
                  type: string
                  minLength: 1
                  description: 域名或子域名，例如 example.com。
              required:
                - target
              description: >-
                通过 target 提供域名；子域名会按其注册域名查询。支持 .com、.net、.org 等通用后缀，以及 .uk、.ai
                等国家和地区后缀。每返回一条注册记录计 5 积分。
      responses:
        '200':
          description: 任务已受理
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentSubmitResponse'
        '422':
          description: Input validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentValidationErrorResponse'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    AgentSubmitResponse:
      type: object
      properties:
        code:
          type: integer
          const: 200
          description: HTTP 业务状态码。
        data:
          type: object
          properties:
            task_id:
              type: string
              description: 任务 ID，用于查询任务状态和结果。
            status:
              type: string
              description: 任务当前状态。
            created_time:
              type:
                - string
                - 'null'
              description: 任务创建时间。
          required:
            - task_id
            - status
    AgentValidationErrorResponse:
      type: object
      properties:
        code:
          type: integer
          const: 422
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            details:
              type: object
          required:
            - message
            - type
      required:
        - code
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: '使用 `Authorization: Bearer <token>` 请求头进行身份验证。'
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 也可以通过 `x-api-key` 请求头提供 API Key。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.