> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/zdns/private-zone/describeprivatezones.md).

# DescribePrivateZones

## 1. API Description

This API (DescribePrivateZones) is used to query the details of one or more DNS Zones.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name  | Required | Type                                                     | Description                                                                                                                                                                                      |
| --------------- | -------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| zoneIds         | No       | Array of String                                          | <p>Filter by the list of DNS Zone IDs.</p><p>Up to 100 IDs.</p><p>It can be obtained by calling <a href="/api-reference/zdns/private-zone/describeprivatezones.md">DescribePrivateZones</a>.</p> |
| vpcIds          | No       | Array of String                                          | <p>Filter by the VPC IDs associated with the DNS Zone.</p><p>Up to 100 IDs.</p><p>It can be obtained by calling <a href="/api-reference/zec/vpc-network/describevpcs.md">DescribeVpcs</a>.</p>   |
| zoneName        | No       | String                                                   | Filter by the DNS Zone name.                                                                                                                                                                     |
| resourceGroupId | No       | String                                                   | Filter by resource group ID.                                                                                                                                                                     |
| pageSize        | No       | Integer                                                  | <p>The returned page size. Default value: 20; Maximum value: 1000.</p><p>Value range: \[1, 1000]</p>                                                                                             |
| pageNum         | No       | Integer                                                  | <p>The number of pages returned.</p><p>Value range: \[1, +)</p><p>Default value: 1</p>                                                                                                           |
| tagKeys         | No       | Array of String                                          | <p>Search by tag keys.</p><p>You can query up to 20 tag keys in each request.</p>                                                                                                                |
| tags            | No       | Array of [Tag](/api-reference/zdns/datastructure.md#tag) | <p>Search by tag.</p><p>You can query up to 20 tags in each request.</p>                                                                                                                         |

## 3. Output Parameters

| Parameter Name | Type                                                                     | Description                                                                                                           |
| -------------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                   | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| totalCount     | Integer                                                                  | The total number of DNS Zones that meet the filtering conditions.                                                     |
| dataSet        | Array of [PrivateZone](/api-reference/zdns/datastructure.md#privatezone) | Returned list data of the DNS Zones.                                                                                  |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query the list of DNS Zones.**

```json
POST /api/v2/zdns HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribePrivateZones
<Common Request Params>

Request：
{
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "totalCount": 0,
    "dataSet": [
      {
        "zoneId": "<zoneId>",
        "zoneName": "example.com",
        "proxyPattern": "ZONE",
        "remark": "Test Zone",
        "vpcIds": [
          "<vpcId-1>",
          "<vpcId-2>"
        ],
        "tags": {
          "tags": [
            {
              "key": "test",
              "value": "test"
            }
          ]
        },
        "resourceGroup": {
          "resourceGroupId": "<resourceGroupId>",
          "resourceGroupName": "Default Resource Group"
        },
        "createTime": "2025-11-18 14:38:13"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/api-reference/api-introduction/toolkit/api-sdk.md)，to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |
