Skip to content
Software capabilities

Cloudflare capability

Find a Cloudflare 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.

Documentation reviewed

Ways to do it

API

GET /zones?name=<domain>

List zones matching a domain and read the id from the result.

Requirements
An API token with Zone Read permission for the applicable zone or account.
Limitations
The result includes zones the token can access. Check the account if more than one result matches.

Example

curl --fail -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  --get --data-urlencode "name=$DOMAIN" https://api.cloudflare.com/client/v4/zones
Read source: Cloudflare Zones API list zones

Interface

Cloudflare dashboard → Domains → Overview → API → Zone ID

Open the domain’s Overview page and copy the Zone ID from the API section.

Requirements
Access to the domain in the Cloudflare dashboard.
Limitations
The ID is for the current domain. Repeat the lookup for each domain you need.
Read source: Cloudflare find account and zone IDs