On this page
Cloudflare
Create a Cloudflare account API token, select your website, and connect crawler activity to Ansvra.
Before you start
Connect your Cloudflare website to AI Agent Analyzer to review recorded crawler requests in Ansvra. You will create one account API token with two permission policies, then add it in Ansvra, choose your website, and review the connection.
1. Open Account API tokens
Choose the Cloudflare account
Open the Cloudflare dashboard. Use the account selector to choose the account containing your website’s domain.
Open the account’s token page
In the left navigation, expand Manage account, then select Account API tokens. The address ends in /api-tokens after your account identifier. Use this account page rather than User API tokens under My Profile.
2. Start a custom token
Select Create Token. In Token name, enter a recognizable name such as Ansvra website connection. Under Permission policies, select Start from scratch, marked Custom, to choose the required permissions individually.
3. Add the account policy
Keep Entire Account selected
Leave the policy scope set to Entire Account. This policy grants the account’s Workers Scripts permission. The domain permissions belong in a separate policy.
Search for Workers Scripts
In Search for permission groups…, enter Workers Scripts. Under Developer Platform, find the exact Workers Scripts row, currently marked Legacy, and select Edit. Leave the separate Workers row and its Metadata Read-only, Content Read-only, Editor, and Admin options unselected.
Add the second policy
Select Add policy beneath the list. Cloudflare keeps the first policy in the form and opens a second editor. The first policy summary reads Workers Scripts Write.
4. Choose your domain and its permissions
Choose Specified Domains
In the second editor, open the scope menu showing Entire Account and choose Specified Domains.
Select your website
Open Select domains…. Use its search field to find the domain used by your Ansvra project, then select that domain. Check the spelling and choose only the intended website. If it is missing, check your Cloudflare account and membership access.
In the same policy, search for Zone. Under DNS & Zones, find the row named exactly Zone and select Read. Leave DNS, Zone Settings, Zone DNS Settings, and other similarly named rows unchanged.
Replace the search with Workers Routes. Under Developer Platform, select Edit on the Workers Routes row. Changing the search keeps Zone Read selected. Select Close editor to return to the policy summaries. There should now be two policies.
5. Review, create, and copy the token
Choose a Token expiration that fits your organization’s access policy. Replace an expiring token in Ansvra before it expires. Leave Client IP address filtering empty unless you have confirmed the addresses that will use the connection; entering your own computer’s address can prevent Ansvra from using the token. Select Review token.
| Policy scope | Exact summary permissions |
|---|---|
| Entire account containing your website | Workers Scripts Write |
| Only your selected website domain | Zone Read; Workers Routes Write |
Check and correct the summary
Confirm the account, domain, expiration, and permissions. Use Back to edit if anything is wrong. The domain policy must contain both Zone Read and Workers Routes Write. Remove unintended selections before continuing.
Create and copy the token
Select Create token when the summary is correct. Copy the newly displayed token value and keep it private. Paste the full value into Ansvra in the next step. If you leave without retaining the value and cannot retrieve it, create a replacement with the same policies.
6. Add the token in Ansvra
Open website connections
In Ansvra, select the intended project and open AI Agent Analyzer. Select Connect a source, or Connections if a source exists, then choose Cloudflare. Continue to Connect your website.
Paste the token
Expand Manual authorization if needed. Paste the full token into Provider access key, then select Find websites. For an existing connection, the action can read Save token. Read the outcome; saving a token alone does not deploy the website connection.
Select Website zone
Choose the domain matching your project in Website zone. If missing, check the Cloudflare account, selected domain, and Zone Read permission. Use Load available websites when offered to reload the selection.
Inspect the route plan
Select Inspect route plan. Read the proposed route, overlap warnings, and Workers allowance explanation. Resolve conflicts before continuing. The website must be proxied through Cloudflare over HTTPS.
Confirm deployment
When the route is correct, select I reviewed the route and the Workers allowance., then Deploy Worker. This changes your Cloudflare website configuration. Wait for the outcome and follow any correction requested before retrying.
7. Confirm delivery and resolve problems
On Confirm connection, review Connection details saved, First delivery received, and AI crawler activity detected separately. Waiting for delivery means the first delivery has not arrived. Saving a connection or receiving a delivery does not establish that a recognized AI crawler visited your website.
Why is a permission missing?
Selectable permissions depend on your Cloudflare membership roles. Check that you are in Account API tokens for the correct account and ask its administrator to review access. For Workers Scripts, search the exact name and use its Legacy row as shown above.
Why can’t Ansvra find my website?
Check that the token belongs to the account containing the domain. The domain policy must include that exact domain with Zone Read and Workers Routes Write. Check expiration and IP filtering, then retry Find websites or Load available websites.
Why does deployment need attention?
Read the specific error. Confirm HTTPS and Cloudflare proxying for the hostname, check Workers Scripts Write and Workers Routes Write, and inspect route conflicts. If Ansvra requests Fail open, open that zone’s Workers Routes in Cloudflare and set the route’s request limit behavior to Fail open before retrying.
What if the token expires or is revoked?
Create a replacement with the same account and domain policies. Open the existing connection’s Manual authorization in Ansvra, enter the replacement in Provider access key, and select Save token when offered. Check the connection and delivery status afterward.