List DNS Records
list_dns_recordsRetrieve, search, sort, and filter DNS records in a Cloudflare zone to inspect configurations without making changes. Use filters for name, type, content, and tags.
Instructions
List, search, sort, and filter a zones' DNS records. Read operation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Condition on the DNS record tag. Parameter values can be of the form `<tag-name>:<tag-value>` to search for an exact `name:value` pair, or just `<tag-name>` to search for records with a specific tag name regardless of its value. This is a convenience shorthand for the more powerful `tag.<predicate>` parameters. Examples: - `tag=important` is equivalent to `tag.present=important` - `tag=team:DNS` is equivalent to `tag.exact=team:DNS` | |
| name | No | Exact value of the DNS record name. This is a convenience alias for `name.exact`. | |
| page | No | ||
| type | No | ||
| match | No | ||
| order | No | ||
| search | No | ||
| account | No | Exact private profile label. Account/zone defaults route inputs; token permissions remain provider controlled. | |
| comment | No | Exact value of the DNS record comment. This is a convenience alias for `comment.exact`. | |
| content | No | Exact value of the DNS record content. This is a convenience alias for `content.exact`. | |
| proxied | No | ||
| zone_id | No | ||
| per_page | No | ||
| direction | No | ||
| tag_exact | No | 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 | No | ||
| name_exact | No | Exact value of the DNS record name. Name filters are case-insensitive. | |
| tag_absent | No | Name of a tag which must *not* be present on the DNS record. Tag filters are case-insensitive. | |
| tag_present | No | Name of a tag which must be present on the DNS record. Tag filters are case-insensitive. | |
| tag_contains | No | 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. | |
| tag_endswith | No | 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. | |
| comment_exact | No | Exact value of the DNS record comment. Comment filters are case-insensitive. | |
| content_exact | No | Exact value of the DNS record content. Content filters are case-insensitive. | |
| name_contains | No | Substring of the DNS record name. Name filters are case-insensitive. | |
| name_endswith | No | Suffix of the DNS record name. Name filters are case-insensitive. | |
| comment_absent | No | If this parameter is present, only records *without* a comment are returned. | |
| shadowing_name | No | 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](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records). | |
| tag_startswith | No | 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 starts with `<tag-value>`. Tag filters are case-insensitive. | |
| comment_present | No | If this parameter is present, only records *with* a comment are returned. | |
| name_startswith | No | Prefix of the DNS record name. Name filters are case-insensitive. | |
| comment_contains | No | Substring of the DNS record comment. Comment filters are case-insensitive. | |
| comment_endswith | No | Suffix of the DNS record comment. Comment filters are case-insensitive. | |
| content_contains | No | Substring of the DNS record content. Content filters are case-insensitive. | |
| content_endswith | No | Suffix of the DNS record content. Content filters are case-insensitive. | |
| shadowed_by_name | No | Filters the response to records at or below the specified NS delegation name. NS, DS, and NSEC records at the delegation name are excluded because they are not shadowed by that delegation. Those record types are included only when they exist below the delegation. The value must be a non-apex subdomain of the zone. Requires `include_shadow_metadata=true`. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records). | |
| comment_startswith | No | Prefix of the DNS record comment. Comment filters are case-insensitive. | |
| content_startswith | No | Prefix of the DNS record content. Content filters are case-insensitive. | |
| include_shadow_metadata | No | Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records). |