List DNS Records
List, search, sort, and filter a zones’ DNS records.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYYAPI Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
X-Auth-Email: user@example.comThe previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194Accepted Permissions (at least one required)
DNS ReadDNS WriteQuery ParametersExpand Collapse
Whether to include shadow metadata in the meta field of each record in the response. See Shadowed records.
match: optional "any" or "all"Whether to match all search requirements or at least one (any). If set to all, acts like a logical AND between filters. If set to any, acts like a logical OR instead. Note that the interaction between tag filters is controlled by the tag-match parameter instead.
Whether to match all search requirements or at least one (any). If set to all, acts like a logical AND between filters. If set to any, acts like a logical OR instead. Note that the interaction between tag filters is controlled by the tag-match parameter instead.
Whether the record is receiving the performance and security benefits of Cloudflare.
Allows searching in multiple properties of a DNS record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is subject to change in the future. This parameter works independently of the match setting. For automated searches, please use the other available parameters.
Filters to records at or below the given NS delegation name, excluding the NS records that form the delegation itself. The value must be a subdomain of the zone; the zone apex is not accepted. Requires include_shadow_metadata=true. See Shadowed records.
Returns NS records that shadow the given name, searching at the name itself and each of its ancestor names within the zone, excluding the zone apex. The value must be a subdomain of the zone; the zone apex is not accepted. See Shadowed records.
tag: optional object { absent, contains, endswith, 3 more }
Name of a tag which must not be present on the DNS record. Tag filters are case-insensitive.
A tag and value, of the form <tag-name>:<tag-value>. The API will only return DNS records that have a tag named <tag-name> whose value contains <tag-value>. Tag filters are case-insensitive.
A tag and value, of the form <tag-name>:<tag-value>. The API will only return DNS records that have a tag named <tag-name> whose value ends with <tag-value>. Tag filters are case-insensitive.
A tag and value, of the form <tag-name>:<tag-value>. The API will only return DNS records that have a tag named <tag-name> whose value is <tag-value>. Tag filters are case-insensitive.
tag_match: optional "any" or "all"Whether to match all tag search requirements or at least one (any). If set to all, acts like a logical AND between tag filters. If set to any, acts like a logical OR instead. Note that the regular match parameter is still used to combine the resulting condition with other filters that aren’t related to tags.
Whether to match all tag search requirements or at least one (any). If set to all, acts like a logical AND between tag filters. If set to any, acts like a logical OR instead. Note that the regular match parameter is still used to combine the resulting condition with other filters that aren’t related to tags.
ReturnsExpand Collapse
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
OpenpgpkeyRecord object { id, comment, content, 12 more }
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
Whether the record is receiving the performance and security benefits of Cloudflare.
settings: object { ipv4_only, ipv6_only } Settings for the DNS record.
Settings for the DNS record.
When enabled, only A records will be generated, and AAAA records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.
When enabled, only AAAA records will be generated, and A records will not be created. This setting is intended for exceptional cases. Note that this option only applies to proxied records and it has no effect on whether Cloudflare communicates with the origin using IPv4 or IPv6.
Time To Live (TTL) of the DNS record in seconds. Setting to 1 means ‘automatic’. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.
Time To Live (TTL) of the DNS record in seconds. Setting to 1 means ‘automatic’. Value must be between 60 and 86400, with the minimum reduced to 30 for Enterprise zones.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
meta: object { dead_glue, is_glue, shadowed_by, shadowed_records_count } Extra Cloudflare-specific metadata about the record.
Extra Cloudflare-specific metadata about the record.
Whether this glue record is not served because a shallower NS delegation takes precedence over the deeper delegation that needs it. Present only when true; reachable glue carries only is_glue. See Unreachable glue records.
Whether this A or AAAA record is glue for a subdomain NS delegation. See Glue records.
IDs of the NS records that shadow this record. See Shadowed records.
Number of records shadowed by this NS delegation. See Shadowed records.
List DNS Records
curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"name": "example.com",
"ttl": 3600,
"type": "A",
"comment": "Domain verification record",
"content": "198.51.100.4",
"private_routing": true,
"proxied": true,
"settings": {
"ipv4_only": true,
"ipv6_only": true
},
"tags": [
"owner:dns-team"
],
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"created_on": "2014-01-01T05:20:00.12345Z",
"meta": {
"dead_glue": true,
"is_glue": true,
"shadowed_by": [
"372e67954025e0ba6aaa6d586b9e0b59"
],
"shadowed_records_count": 42
},
"modified_on": "2014-01-01T05:20:00.12345Z",
"proxiable": true,
"comment_modified_on": "2024-01-01T05:20:00.12345Z",
"tags_modified_on": "2025-01-01T05:20:00.12345Z"
}
],
"result_info": {
"count": 1,
"page": 1,
"per_page": 20,
"total_count": 2000,
"total_pages": 100
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"name": "example.com",
"ttl": 3600,
"type": "A",
"comment": "Domain verification record",
"content": "198.51.100.4",
"private_routing": true,
"proxied": true,
"settings": {
"ipv4_only": true,
"ipv6_only": true
},
"tags": [
"owner:dns-team"
],
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"created_on": "2014-01-01T05:20:00.12345Z",
"meta": {
"dead_glue": true,
"is_glue": true,
"shadowed_by": [
"372e67954025e0ba6aaa6d586b9e0b59"
],
"shadowed_records_count": 42
},
"modified_on": "2014-01-01T05:20:00.12345Z",
"proxiable": true,
"comment_modified_on": "2024-01-01T05:20:00.12345Z",
"tags_modified_on": "2025-01-01T05:20:00.12345Z"
}
],
"result_info": {
"count": 1,
"page": 1,
"per_page": 20,
"total_count": 2000,
"total_pages": 100
}
}