> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vantage.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloudflare

> Learn how to integrate Vantage with Cloudflare.

Vantage connects to Cloudflare using an API token and account ID to ingest pay-as-you-go cost and [usage data](/usage_based_reporting) through the [Cloudflare API](https://developers.cloudflare.com/api/). Usage is measured in units such as requests, DNS queries, rows, and operations, depending on the service. You can connect multiple Cloudflare accounts by adding a separate API token for each; every account is tracked independently within Vantage.

<Note>
  This integration supports Cloudflare **pay-as-you-go (PAYG)** accounts. Vantage ingests pay-as-you-go usage only, and accounts whose subscriptions are entirely contract-based (for example, Enterprise contracts) are not supported. Accounts that mix pay-as-you-go and contract subscriptions are supported, and only the pay-as-you-go usage is imported.
</Note>

## Cloudflare Permissions

Vantage uses your Cloudflare API token to read billing data only. The token requires the **Billing Read** permission. Vantage never creates, modifies, or deletes Cloudflare zones, subscriptions, or account settings.

## Connect Your Cloudflare Account

### Prerequisites

* You must have a Vantage **Organization Owner** or **Integration Owner** role to add or remove this integration. See the [Role-Based Access Control](/rbac) documentation for details.
* A Cloudflare pay-as-you-go account.
* Access to create a Cloudflare API token with the **Billing Read** permission. It's best practice to use a dedicated token for Vantage and rotate it per your security policy.
* [Create a free Vantage account](https://console.vantage.sh/signup), then follow the steps below to integrate Cloudflare costs.

### Create the Connection

<Steps>
  <Step>
    From the [Cloudflare dashboard](https://dash.cloudflare.com/), click your profile icon in the top right and select **Profile**. Then, in the left menu, click **API Tokens**.
  </Step>

  <Step>
    Click **Create Token** and use the **Create Custom Token** option.
  </Step>

  <Step>
    Enter a name for the token. Then, under **Permissions**, select **Account**, then **Billing**, then **Read**.
  </Step>

  <Step>
    Click **Continue to summary**, then click **Create Token**.
  </Step>

  <Step>
    Copy the generated API token.
  </Step>

  <Step>
    Find your **Account ID** in the Cloudflare dashboard URL. It's the 32-character ID that follows `dash.cloudflare.com/` (for example, `dash.cloudflare.com/<account-id>`).
  </Step>

  <Step>
    From the top navigation in Vantage, click **Settings**.
  </Step>

  <Step>
    On the left navigation, select **Integrations**, then select **Cloudflare**. Ensure you are on the **Connect** tab.
  </Step>

  <Step>
    Click **Add API Token**.
  </Step>

  <Step>
    Paste your API token and Account ID, enter a **Description** to identify this connection, then click **Connect Account**.
  </Step>
</Steps>

After connecting, the integration status shows **Importing** while Vantage ingests your Cloudflare cost data. Once the import is complete, the status changes to **Stable**. See the [Integration Status](/vantage_account#integration-status) documentation for details.

<Info>
  When the integration is first connected, Vantage ingests up to **six months** of historical Cloudflare cost data. Data is retained according to your Vantage retention period. If you remove the Cloudflare integration from Vantage, all associated costs will be removed from the Vantage console.
</Info>

### Next Steps - Manage Workspace Access

Once the integration status is **Stable**, you can select which workspaces this integration is associated with. See the [Workspaces](/workspaces#manage-workspace-provider-integrations) documentation for information.

## Data Refresh

See the [provider data refresh documentation](/provider_data_refresh) for information on when data for each provider refreshes in Vantage.

## Cloudflare Reporting Dimensions

On Cloudflare [Cost Reports](/cost_reports), you can filter and group across several dimensions:

* Account (the Cloudflare account ID, displayed using the description you set when connecting the integration)
* Service (e.g., Workers, R2, Cloudflare for SaaS)
* Category (the specific Cloudflare service line item)
* Resource (the Cloudflare zone associated with the charge; may be empty for line items not scoped to a zone)
* Charge Type (e.g., Usage)
* Tag ([Virtual Tags](/tagging) created in Vantage for this provider; Cloudflare billing data does not supply native tags)
