> ## 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.

export const VantageIpAddresses = () => <ul>
    <li><code>54.87.66.45</code></li>
    <li><code>3.95.43.133</code></li>
    <li><code>54.162.3.72</code></li>
    <li><code>44.199.143.63</code></li>
    <li><code>3.218.103.23</code></li>
  </ul>;

Vantage connects to Cloudflare using an API token and account ID to ingest self-serve 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 **self-serve** accounts. Vantage ingests self-serve (non-contract) usage only, and accounts whose subscriptions are entirely contract-based (for example, Enterprise contracts) are not supported. Accounts that mix self-serve and contract subscriptions are supported, and only the self-serve usage is imported. If you connect an account that has no self-serve usage, Vantage displays a message that no data will be imported and retains the integration setup until Enterprise cost data is supported. As a workaround, use [Custom Providers](/connecting_custom_providers) to import contract-only account costs.
</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 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 self-serve 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.

<Info>
  If your organization restricts access to the provider by IP address, add the following Vantage IP addresses to your provider's allowlist:

  <VantageIpAddresses />
</Info>

### 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)
* Charge Type (e.g., Usage)
* Tag ([Virtual Tags](/tagging) created in Vantage for this provider; Cloudflare billing data does not supply native tags)

<Note>
  Cloudflare cost and usage data has a single Charge Type, `Usage`. Toggling the discounts setting in [Cost Report](/cost_reports) settings on or off does not change Cloudflare cost data.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.