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

# List of Zones

> Show created zones with pagination managed by limit and offset params. All query params are optional.



## OpenAPI

````yaml /api-reference/services_documented/dns_api.yaml get /dns/v2/zones
openapi: 3.1.0
info:
  title: Gcore OpenAPI – DNS API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-11T15:10:30.328297+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Analyze
    x-displayName: Analyze
  - name: DNS Locations
    x-displayName: DNS Locations
  - name: Lookup
    x-displayName: Lookup
  - name: Metrics
    x-displayName: Metrics
  - name: NetworkMappings
    x-displayName: NetworkMappings
  - name: Pickers
    x-displayName: Pickers
  - name: DNS Clients
    x-displayName: DNS Clients
  - name: Zones
    x-displayName: Zones
  - name: DNSSEC
    x-displayName: DNSSEC
  - name: RRsets
    x-displayName: RRsets
paths:
  /dns/v2/zones:
    get:
      tags:
        - Zones
      summary: List of Zones
      description: >-
        Show created zones with pagination managed by limit and offset params.
        All query params are optional.
      operationId: Zones
      parameters:
        - name: offset
          in: query
          description: Amount of records to skip before beginning to write in response.
          schema:
            type: integer
            format: uint64
        - name: limit
          in: query
          description: Max number of records in response
          schema:
            type: integer
            format: uint64
        - name: order_by
          in: query
          description: Field name to sort by
          schema:
            type: string
        - name: order_direction
          in: query
          description: Ascending or descending order
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: id
          in: query
          description: to pass several ids `id=1&id=3&id=5...`
          style: form
          explode: false
          schema:
            type: array
            items:
              type: integer
              format: int64
        - name: client_id
          in: query
          description: >-
            to pass several `client_ids`
            `client_id=1&client_id=3&client_id=5...`
          style: form
          explode: false
          schema:
            type: array
            items:
              type: integer
              format: int64
        - name: reseller_id
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: integer
              format: int64
        - name: iam_reseller_id
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: integer
              format: int64
        - name: name
          in: query
          description: to pass several names `name=first&name=second...`
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - name: case_sensitive
          in: query
          schema:
            type: boolean
        - name: exact_match
          in: query
          schema:
            type: boolean
        - name: enabled
          in: query
          schema:
            type: boolean
        - name: status
          in: query
          schema:
            type: string
        - name: dynamic
          in: query
          description: Zones with dynamic RRsets
          schema:
            type: boolean
        - name: healthcheck
          in: query
          description: Zones with RRsets that have healthchecks
          schema:
            type: boolean
        - name: updated_at_from
          in: query
          schema:
            type: string
            format: date-time
        - name: updated_at_to
          in: query
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: ListZoneResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListZoneResponse'
        '400':
          description: Error message response
          headers:
            error:
              schema:
                type: string
          content: {}
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            zones = client.dns.zones.list()
            print(zones.total_amount)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/dns\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tzones, err := client.DNS.Zones.List(context.TODO(), dns.ZoneListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", zones.TotalAmount)\n}\n"
components:
  schemas:
    ListZoneResponse:
      type: object
      properties:
        total_amount:
          type: integer
          format: int64
        zones:
          type: array
          items:
            $ref: '#/components/schemas/OutputZone'
    OutputZone:
      type: object
      properties:
        client_id:
          type: integer
          format: uint64
        contact:
          type: string
          description: email address of the administrator responsible for this zone
        dnssec_enabled:
          type: boolean
          description: |-
            describe dnssec status
            true means dnssec is enabled for the zone
            false means dnssec is disabled for the zone
        enabled:
          type: boolean
          default: true
        expiry:
          type: integer
          description: >-
            number of seconds after which secondary name servers should stop
            answering request for this zone
          format: uint64
        id:
          type: integer
          description: |-
            ID of zone.
            This field usually is omitted in response and available only in
            case of getting deleted zones by admin.
          format: uint64
        meta:
          type: object
          additionalProperties:
            type: object
          description: arbitrarily data of zone in json format
        name:
          type: string
          description: name of DNS zone
        nx_ttl:
          type: integer
          description: Time To Live of cache
          format: uint64
        primary_server:
          type: string
          description: primary master name server for zone
        records:
          type: array
          items:
            $ref: '#/components/schemas/Record'
        refresh:
          type: integer
          description: >-
            number of seconds after which secondary name servers should query
            the master for the SOA record, to detect zone changes.
          format: uint64
        retry:
          type: integer
          description: >-
            number of seconds after which secondary name servers should retry to
            request the serial number
          format: uint64
        rrsets_amount:
          $ref: '#/components/schemas/RRSetsAmount'
        serial:
          type: integer
          description: >-
            Serial number for this zone or Timestamp of zone modification
            moment.

            If a secondary name server slaved to this one observes an increase
            in this number,

            the slave will assume that the zone has been updated and initiate a
            zone transfer.
          format: uint64
        status:
          $ref: '#/components/schemas/ZoneStatus'
      description: OutputZone
    Record:
      type: object
      properties:
        name:
          type: string
        short_answers:
          type: array
          items:
            type: string
        ttl:
          type: integer
          format: uint32
        type:
          type: string
      description: Record - readonly short version of rrset
    RRSetsAmount:
      type: object
      properties:
        dynamic:
          type: object
          properties:
            healthcheck:
              type: integer
              description: Amount of RRsets with enabled healthchecks
              format: int64
            total:
              type: integer
              description: Total amount of dynamic RRsets in zone
              format: int64
          description: Amount of dynamic RRsets in zone
        static:
          type: integer
          description: Amount of static RRsets in zone
          format: int64
        total:
          type: integer
          description: Total amount of RRsets in zone
          format: int64
    ZoneStatus:
      type: string
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````