Cloudflare

Cloudflare Trace API

Free, keyless: your IP, country, Cloudflare colo, HTTP and TLS versions from /cdn-cgi/trace, plus speed-test geolocation.

Developer tools#development

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Cloudflare's free, keyless diagnostic endpoints. /cdn-cgi/trace exists on every site served through Cloudflare and answers in plain text key=value lines with your IP address, country, the Cloudflare data centre (colo), HTTP and TLS versions, and whether WARP or Gateway is on. The speed-test host speed.cloudflare.com adds geolocation (city, ASN, coordinates) and download/upload test endpoints.

No account, key or sign-up. CORS is open (Access-Control-Allow-Origin: *).

The same /cdn-cgi/trace path works on any Cloudflare-proxied domain, for example one.one.one.one, 1.1.1.1, cloudflare.com, cloudflare-dns.com, workers.dev, pages.dev, icanhazip.com. This is a different product from the Cloudflare API (api.cloudflare.com/client/v4), which manages accounts and zones and needs an API token.

Called and verified 2026-11-18. Community notes: https://github.com/fawazahmed0/cloudflare-trace-api

Endpoints 4

Trace

  • GETTrace: your IP, country, colo, HTTP and TLS versions/cdn-cgi/tracePlain-text key=value lines, one per line.

Speed test

  • GETYour IP with geolocation and network (ASN)https://speed.cloudflare.com/metaJSON with your IP, ASN and organisation, colo, country, city, region, postal code and coordinates. Answers 403 with {} unless the Referer header is the…
  • GETDownload test: N bytes, location in headershttps://speed.cloudflare.com/__down?bytes=1000Returns bytes zero bytes for measuring download speed. Response headers carry your location: cf-meta-ip, colo, country, city, asn, latitude, longitude,…
  • POSTUpload test: send any bodyhttps://speed.cloudflare.com/__upAccepts any body for measuring upload speed; answers 200 with timing in Server-Timing.

API details

Base URL
https://one.one.one.one
https://1.1.1.1
https://cloudflare.com
https://cloudflare-dns.com
https://workers.dev
Authentication
None declared in the description
Operations
4 operations on 4 pathsGET 3POST 1
Main resources
Speed test 3Trace 1
Response formats
application/json application/octet-stream text/plain
Description format
OpenAPI 3.0.3, API version 2026-11-18

How to test the Cloudflare Trace API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Cloudflare Trace API collection, without the publisher's secrets.
  3. Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
  4. Send a requestPick an endpoint, for example “Trace: your IP, country, colo, HTTP and TLS versions” (GET /cdn-cgi/trace), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Cloudflare Trace API?

Free, keyless: your IP, country, Cloudflare colo, HTTP and TLS versions from /cdn-cgi/trace, plus speed-test geolocation. It is listed under Developer tools and has 4 endpoints.

Who publishes the Cloudflare Trace API?

It is listed from Cloudflare's public API description (an OpenAPI document), not published by Cloudflare on Swastik Codes. Anyone who controls cloudflare.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Cloudflare Trace API?

Its description lists 5 base URLs: https://one.one.one.one, https://1.1.1.1, https://cloudflare.com, https://cloudflare-dns.com, https://workers.dev. The first is the usual one; the others are typically sandbox or regional servers.

How do I authenticate with the Cloudflare Trace API?

Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.

How many endpoints does the Cloudflare Trace API have?

4 operations on 4 paths (3 GET, 1 POST). The largest groups are Speed test, Trace.

Is forking the Cloudflare Trace API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.