Skip to main content

Cloudflare

Cloudflare is a comprehensive web performance, security, and DNS infrastructure platform that provides content delivery network (CDN) services, DDoS protection, Internet security, and distributed domain name server services. This integration enables organizations to query and manage their Cloudflare resources, configurations, and security policies for operational visibility, security auditing, compliance monitoring, and infrastructure management.

CategoryCDN, Network security
DirectionQuery source
Sign-inAPI Token or Legacy API Key, R2 Access Keys
Query languagesSQLite
Tables29
Query templates115
Websitecloudflare.com

Before you start​

Huntbase can sign in to Cloudflare with any of these methods: API Token or Legacy API Key, R2 Access Keys. Pick one, create the credential in Cloudflare, then keep it to hand for the Connect step.

API Token or Legacy API Key​

Cloudflare API Token scoped to your account (recommended)

  1. In the Cloudflare dashboard, go to My Profile › API Tokens (user token) or Manage Account › API Tokens (account token) and click Create Token.
  2. Create a custom token and give it a name that explains its purpose.
  3. Add permissions with the Read access level only, and choose which resources (such as zones) the token can access.
  4. Select Continue to summary, review, then click Create Token and copy the secret. It is only shown once.

Permissions:

  • Read access to the resources you want to query. Write access is not required.

R2 Access Keys​

Access Key ID and Secret Access Key used to access Cloudflare R2 (S3-compatible).

  1. In the Cloudflare dashboard, open the R2 object storage page and, under Account Details, select Manage next to API Tokens.
  2. Choose Create Account API token or Create User API token.
  3. Under Permissions, select Admin Read only, or Object Read only and limit the token to specific buckets.
  4. Create the token and copy the Access Key ID and Secret Access Key. You cannot view the secret again.

Permissions:

  • Admin Read only (account-wide read) or Object Read only (specific buckets)
Watch out for
  • A connection covers a single Cloudflare account.

For the vendor's own instructions, see Cloudflare API token documentation.

tip

Use a dedicated, read-only credential for Huntbase where the product allows it. Huntbase only needs to read.

Connect Cloudflare​

  1. Go to Connections and click New connection, or click New connection on the Cloudflare product page.
  2. On Product, pick Cloudflare and choose the Owner.
  3. On Details, give the connection a Name and, optionally, a Description.
  4. On Connect, fill in the settings and credentials described below.
  5. On Verify, review the summary and click Create & check.

For everything else on the setup page — saving a draft, I'll do this later, and what each check result means — see Connections.

Settings​

Where your Cloudflare lives:

FieldRequiredNotes
EmailNoThe email address of your Cloudflare account. Only needed with API Key (Legacy).
Maximum Request Timeout (seconds)No
Maximum RetriesNo

Credentials​

Choose a Method, enter a Credential label (for example Production), then fill in the fields for that method.

API Token or Legacy API Key​

FieldRequiredNotes
API TokenYesAn API token. This is the recommended option: use it instead of API Key (Legacy). Secret — not shown again after you save it.
API Key (Legacy)YesYour Cloudflare API key. It is only used together with Email, and only if you do not provide an API Token. Secret — not shown again after you save it.

R2 Access Keys​

FieldRequiredNotes
R2 Access Key IDYesSecret — not shown again after you save it.
R2 Secret Access KeyYesSecret — not shown again after you save it.

Query it​

Once connected, Cloudflare can serve these languages in a query tab, and Scout can use it when you ask in Auto:

LanguageUse it for
SQLiteSQL over the 29 tables listed below, alongside every other connected source.

Example: SQLite​

Query information about the user — Retrieve details of the current user profile to understand account status and settings.

select
*
from
cloudflare_user;

Cloudflare ships with 115 query templates. Find them in Library › Queries — see Query templates.

Tables​

Cloudflare adds 29 tables. Browse their columns from Schema in the query bar's ⋯ menu.

All 29 tables
TableContains
cloudflare_access_applicationAccess Applications are used to restrict access to a whole application using an authorisation gateway managed by Cloudflare.
cloudflare_access_groupAccess Groups allows to define a set of users to which an application policy can be applied.
cloudflare_access_policyAccess Policies define the users or groups who can, or cannot, reach the Application Resource.
cloudflare_accountAccounts the user has access to.
cloudflare_account_memberCloudflare Account Member
cloudflare_account_roleA Role defines what permissions a Member of an Account has.
cloudflare_api_tokenAPI tokens for the user.
cloudflare_custom_certificateCustom certificates are meant for Business and Enterprise customers who want to use their own SSL certificates.
cloudflare_custom_page
cloudflare_dns_recordDNS records for a zone.
cloudflare_firewall_rule[DEPRECATED] Cloudflare Firewall Rules is a flexible and intuitive framework for filtering HTTP requests.
cloudflare_healthcheckA Health Check is a service that runs on Cloudflare’s edge network to monitor whether an origin server is online.
cloudflare_load_balancerCloudflare Load balancers allows to distribute traffic across servers, which reduces server strain and latency and improves the experience for end users.
cloudflare_load_balancer_monitorA monitor issues health checks at regular intervals to evaluate the health of an origin pool.
cloudflare_load_balancer_poolA pool is a group of origin servers, with each origin identified by its IP address or hostname.
cloudflare_logpush_jobCloudflare Logpush job is a configuration that automatically ships log data from a specific zone or account to a chosen external destination in near real‑time batch delivery
cloudflare_managed_transformManaged Transforms allow you to perform common adjustments to HTTP request and response headers with the click of a button.
cloudflare_notification_policyCloudflare Notifications help you stay up to date with your Cloudflare account.
cloudflare_page_rulePage Rules gives the ability to control how Cloudflare works on a URL or subdomain basis.
cloudflare_r2_bucketCloudflare R2 Buckets
cloudflare_r2_objectList Cloudflare R2 Objects by bucket name
cloudflare_r2_object_dataList content of specific Cloudflare R2 objects by bucket name
cloudflare_rulesetCloudflare Rulesets provide a powerful framework for configuring rules to process HTTP requests.
cloudflare_userInformation about the current user making the request.
cloudflare_user_audit_logCloudflare User Audit Logs
cloudflare_worker_routeRoutes are basic patterns used to enable or disable workers that match requests.
cloudflare_worker_scriptCloudflare Worker Scripts host custom serverless code executed at Cloudflare’s edge for enhanced logic, routing, and performance optimizations.
cloudflare_zoneA Zone is a domain name along with its subdomains and other identities.
cloudflare_zone_settingIndividual zone settings that control various Cloudflare features for a zone.

Next steps​