Canonical: https://weaveos.com/reference/cloudflare/export-dns-records

1. [Software capabilities](https://weaveos.com/reference)
2. /[Cloudflare](https://weaveos.com/reference/cloudflare)
3. /Export DNS records as a BIND zone file

[![](https://weaveos.com/reference/logos/cloudflare.svg)Cloudflare](https://weaveos.com/reference/cloudflare)

# Export DNS records as a BIND zone file

Export a zone’s DNS records in BIND format. The REST endpoint supports record filters. The generated TypeScript client currently exposes only the zone identifier for this call.

Documentation reviewed November 26, 2026 · 2 methods with sources

## Ways to do it

1. [1API: GET /zones/{zone\_id}/dns\_records/export](https://weaveos.com/reference/cloudflare/export-dns-records#method-1)
2. [2SDK: client.dns.records.export()](https://weaveos.com/reference/cloudflare/export-dns-records#method-2)

API

### GET /zones/{zone\_id}/dns\_records/export

Export a BIND-format file, optionally limiting it to matching records.

[Read source: Cloudflare API: Export DNS Records](https://developers.cloudflare.com/api/resources/dns/subresources/records/methods/export/)

- Requirements

  A zone ID and an API token with DNS Read or DNS Write when using token auth.

- Limitations

  By default Cloudflare includes the SOA and assigned apex NS records even if they do not match the filters. Secondary zones need a stored SOA for that mode. Set include\_generated\_records=false to export matching stored records only.

SDK

### client.dns.records.export()

Call client.dns.records.export to retrieve the zone’s BIND-format response as a string.

[Read source: Generated Cloudflare TypeScript DNS method: GET /zones/{zone\_id}/dns\_records/export](https://github.com/cloudflare/cloudflare-typescript/blob/0eb9ef0ea40c1fe38e4b19be92f41bd7466bc1d6/src/resources/dns/api.md#L72)

- Requirements

  An authenticated Cloudflare TypeScript client and zone\_id.

- Limitations

  Version 7.4.0 exposes only zone\_id for this operation. Use the REST API for filters or include\_generated\_records.

[Previous Cloudflare taskImport DNS records from a BIND zone file](https://weaveos.com/reference/cloudflare/import-dns-zone-file) [Next Cloudflare task Update or overwrite a DNS record](https://weaveos.com/reference/cloudflare/update-dns-record)

## More from Cloudflare

[View all 8 Cloudflare tasks](https://weaveos.com/reference/cloudflare)

- ### [List DNS records in a Cloudflare zone](https://weaveos.com/reference/cloudflare/list-zone-dns-records)

  Use the DNS Records API or Cloudflare TypeScript SDK to retrieve a zone’s records. The DNS Records page lets you inspect a record while working in the dashboard.

  API, SDK, Interface

- ### [Tail Cloudflare Worker logs](https://weaveos.com/reference/cloudflare/tail-worker-logs)

  Use wrangler tail to see incoming Worker requests and errors in your terminal. Use the dashboard’s Live view when you want to inspect the same stream in a browser.

  CLI, Interface

- ### [Find a Cloudflare zone ID](https://weaveos.com/reference/cloudflare/find-zone-id)

  Filter the Zones API by domain name when a script needs the ID. In the dashboard, copy it from the domain’s Overview page.

  API, Interface

- ### [Create a DNS record](https://weaveos.com/reference/cloudflare/create-dns-record)

  Create a record in a zone through the DNS Records API or the Cloudflare TypeScript client.

  API, SDK

## The same task in other apps

- [![](https://weaveos.com/reference/logos/google-drive.svg)Google Drive](https://weaveos.com/reference/google-drive)

  ### [How to export a Google Docs, Sheets or Slides file](https://weaveos.com/reference/google-drive/export-workspace-file)

  Call files.export with a destination MIME type to convert a native Workspace file. From the editor, use File > Download to export a copy manually.

  API, Interface
