---
title: How to Export Your Domain's DNS Records from Vercel
description: Learn how to utilize our API to export your domain's DNS records from Vercel.
url: /kb/guide/export-domain-dns-records-via-api
canonical_url: "https://vercel.com/kb/guide/export-domain-dns-records-via-api"
last_updated: 2026-01-21
authors: Anders Morley-Hagström
related: []
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

If you need to export your DNS records while using Vercel as your DNS provider, you can do this easily through our API. This might be useful if you want to move to another DNS provider or have a backup of your DNS records.

### Step 1: Locate Your Team ID

To begin, you will need your Team ID. You can find this by navigating to **Settings** > **General** and then find the module **Team ID**. Make sure to note down the ID for later.

### Step 2: Generate an API Token

Next, you will need an API token to access the API. Follow this guide to learn how to generate a token: [How to Use a Vercel API Access Token.](https://vercel.com/guides/how-do-i-use-a-vercel-api-access-token) Remember that the API token is only visible once, so also note this down.

### Step 3: Fetch DNS Records

Once you have your API token, you can retrieve your DNS records by using the [list existing DNS records API endpoint](https://docs.vercel.com/docs/rest-api/reference/endpoints/dns/list-existing-dns-records). Here's an example `curl` command:

`curl -X \ GET "https://api.vercel.com/v4/domains/<your-domain>/records?teamId=<your-team-id>&limit=100" -H \ "Authorization: Bearer <vercel-auth-token>"`

- Replace `<your-domain>` with the domain name you want to export records for.
  
- Replace `<your-team-id>` with your complete Team ID (including the `team_` prefix).
  
- Replace `<vercel-auth-token>` with the API token you generated.
  

This will return the DNS records for the specified domain. Please note that the maximum number of records returned is 100. If your domain has more than 100 records, see the [API pagination documentation](https://docs.vercel.com/docs/rest-api/reference/welcome#pagination) on how to retrieve all records.