> ## 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.

# Get Zone

> Zone info by zone name.



## OpenAPI

````yaml /api-reference/services_documented/dns_api.yaml get /dns/v2/zones/{name}
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-07T20:33:46.548242+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/{name}:
    get:
      tags:
        - Zones
      summary: Get Zone
      description: Zone info by zone name.
      operationId: Zone
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ItemZoneResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ItemZoneResponse'
        '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
            )
            zone = client.dns.zones.get(
                "name",
            )
            print(zone.id)
        - 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/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tzone, err := client.DNS.Zones.Get(context.TODO(), \"name\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", zone.ID)\n}\n"
components:
  schemas:
    ItemZoneResponse:
      type: object
      properties:
        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
          x-stainless-terraform-configurability: computed_optional
        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: Complete zone info with all records included
    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

````