Skip to documentation

Jump to a guide

Crawler ProtectionOverview · See and simulate crawler traffic, then enforce it at your edge and protect website and database capacity.Agent AccessOverview · Decide which AI agents can use your API, before they cost you money.Traffic insightsCrawler Protection · Connect request logs and see which bots reach your website, without changing any traffic.Edge rulesCrawler Protection · Test edge rules on your recent traffic, then enforce them at Cloudflare or AWS WAF.Self-hosted quickstartCrawler Protection · Run the gateway or SDK in your own infrastructure and roll it out safely.Gateway & SDK integrationCrawler Protection · Describe your routes, measure a baseline and wrap expensive work.Runtime policy & capacityCrawler Protection · Choose which crawlers the self-hosted runtime allows, set shared budgets and keep room for customers.Self-hosted controlsCrawler Protection · Change crawler access, budgets, decision logs and alerts for a running runtime.Runtime analyticsCrawler Protection · Report runtime telemetry and read what the self-hosted runtime decided.Troubleshooting & recoveryCrawler Protection · Handle limits, outages, held capacity and recovery.Bot verificationCrawler Protection · How crawler claims are checked against provider evidence and signatures.Plans & usageCrawler Protection · What each plan includes, monthly allowances and additional requests.ConceptsAgent Access · Decisions, the sandbox, supported chains and plan limits.Trust signalsAgent Access · The checks behind each decision, and how to choose them for each route.MiddlewareAgent Access · Gate routes in Express, Fastify, Next.js and other frameworks.SDK referenceAgent Access · Every SDK method, response type, telemetry option and error.InstallationAgent Access · Agent identity, access policies, and SDK integration.Identity and trustAgent Access · Agent identity, access policies, and SDK integration.API referenceAgent Access · Agent identity, access policies, and SDK integration.Errors and retriesAgent Access · Agent identity, access policies, and SDK integration.
Docs/Crawler Protection/Traffic insights
Browse documentation

Crawler Protection

Traffic insights

Connect request logs and see which bots reach your website, without changing any traffic.

  1. Add your website in Dashboard → Crawler Protection → Traffic.
  2. Connect a log source: Cloudflare Logpush, AWS WAF, CloudFront, Vercel, a file upload or the passive request logger.
  3. Once logs arrive, read verified, claimed, declared and unclassified traffic by route.

How traffic insights work

Traffic insights show the automated traffic reaching your website before you change how that traffic is handled. They are included with Pro and Enterprise; Free accounts see an upgrade prompt. You either connect copies of the request logs your CDN, WAF, load balancer or web server already produces, or add a passive request logger to your application. Valiron verifies crawler identities and reports what reaches your pages.

Traffic insights are read-only:

  • It never blocks, challenges, delays or rate-limits a request. It does not change your CDN, WAF, DNS, routing or origin configuration.
  • It does not require the Crawler Protection runtime, Redis, an operator API key or account activation, and it does not consume Crawler Protection request allowances.
  • Your website never depends on Valiron being available. Log sources deliver copies asynchronously; if Valiron's ingestion is unavailable, senders retry and your traffic is unaffected.

The self-hosted runtime's dry run mode (observe in configuration) is a different feature: it evaluates your installed runtime policy in the request path and logs what it would block. Traffic insights only read request records after the fact.

Traffic classes

Every observed request is placed in exactly one class. Valiron never labels traffic as human.

ClassMeaning
Verified crawlersThe client address matched the provider's official published IP ranges, or forward-confirmed reverse DNS (Bing). The same reviewed feeds as the runtime are used; see Identification and signals.
Claimed, not verifiedThe User-Agent claims a verifiable crawler, but the address did not match (claim_mismatch, typically spoofing) or evidence was unavailable (verification_unavailable, for example when the source omits client IPs).
Other declared automationThe User-Agent declares automation that cannot be verified: AI crawlers without a published feed (such as CCBot, Bytespider, Amazonbot, meta-externalagent), other search engines, SEO tools, social previews, uptime monitors, HTTP libraries, headless browsers, and any other User-Agent that does not look like a browser. These are claims only.
UnclassifiedBrowser-like or missing User-Agents. This includes people and any bot that does not identify itself.

Verification is evaluated against the provider evidence that is current when Valiron processes the record, and the evidence version is stored with each verified request. Edge signals reported by your provider, such as Cloudflare VerifiedBotCategory or AWS WAF Bot Control labels, are shown separately (for example cf:ai-crawler or aws:verified:ai). They are never mapped to a specific provider or treated as Valiron verification.

Data handling and retention

Valiron stores only normalized request metadata: request time, host, method, path, normalized route, status, response bytes and timing, cache result, edge action, edge bot signal, country, User-Agent (up to 512 characters), traffic class and verification evidence.

  • Query strings, fragments, cookies, authorization headers, other headers and request bodies are discarded during parsing and never stored. Configure your source not to send them where possible.
  • Client IP addresses are used during processing for verification only. Valiron stores a keyed, non-reversible hash (scoped to your account) and the /24 (IPv4) or /48 (IPv6) network, never the raw address.
  • Paths are grouped into routes for analytics. Numeric IDs, UUIDs, email addresses, long hex values and token-like segments become :id, :uuid, :email, :hash and :token.
  • An uploaded or pushed payload is held until it is processed, then deleted. A payload that fails processing five times is kept with a failed status for investigation.
  • Sensitive paths: list up to 20 path prefixes per website (PATCH /operator/crawlers/sites/:siteId with { "excludedPaths": ["/account"] }). Matching requests are still counted, but are stored under the prefix (for example /account/*); the requested path is never stored.
  • Observed requests, their hourly and daily summaries, policies and their revisions, simulations, edge deployments and the protection audit trail are retained permanently. They are kept when you change plans, remove the Crawler Protection add-on or close your account.
  • Removing a website in Log sources hides it from your dashboard and revokes its connections, so no new deliveries are accepted. Data already observed for it is kept. Turn Protection off first: a website with Valiron rules deployed at your edge cannot be removed (409 disable_protection_first). You can add the same hostname again later; it starts a new history.
Allowance and coverage

Each account has a monthly allowance of stored events: 50,000,000 on Pro. Enterprise has no default limit. Records beyond the allowance are still stored and shown, and are flagged as over allowance; the dashboard then says the month's allowance was exceeded. Delivery to Valiron is never refused because of the allowance, and your traffic is never affected.

Every delivery reports how many records were stored, ignored as duplicates, unreadable, or over the allowance. Duplicates are detected by provider request ID (Cloudflare RayID, CloudFront x-edge-request-id, AWS WAF requestId, Vercel request ID, or request_id in the Valiron format), so re-sent or overlapping files are not double counted. Formats without a request ID, such as nginx combined logs, are deduplicated by exact line; identical lines within the same second are counted once.

Your log provider may charge for log delivery. Cloudflare Logpush availability for HTTP request logs depends on your Cloudflare plan. AWS charges for WAF logging, CloudFront real-time logs, Kinesis and Firehose. Traffic insights are included with Pro.

Connect traffic sources

Open Dashboard → Crawler Protection → Traffic → Log sources (/dashboard/crawler-protection/sources) and add your website hostname. Then choose a source. Each continuous source receives its own connection: a push endpoint https://valiron-edge-proxy.onrender.com/ingest/crawler/logs/<connection-id> and a token beginning vcl_.

The token is shown once. Store it as a secret. It can only append request records to that website; it cannot read analytics, change settings or call any other Valiron API. Revoke a connection in Log sources to stop it immediately; data already collected is kept. Create a new connection to rotate a token.

SourceDeliveryFormat
CloudflareLogpush HTTP destination, or file uploadcloudflare (HTTP requests dataset, NDJSON)
AWS WAFAmazon Data Firehose HTTP endpoint, or file uploadaws_waf
Amazon CloudFront real-time logsKinesis Data Streams → Firehose HTTP endpointcloudfront_realtime
Amazon CloudFront standard logsFile uploadcloudfront (W3C or JSON)
AWS Application Load BalancerFile uploadaws_alb
nginx, Apache, CaddyFile upload, or push with Vector or Fluent Bitcombined (optional leading virtual host and trailing request time)
VercelVercel Drains (logs), or file upload of exported NDJSONvercel
Fastly, Akamai, Netlify, Fly.io, customPush or upload after mapping to the Valiron formatvaliron
Your application, when logs are unavailableValiron SDK request logvaliron

Cloudflare Logpush

  1. In Cloudflare, open the zone → Analytics & Logs → Logpush → Create a Logpush job and choose HTTP destination.
  2. Use this destination. Cloudflare sends header_ parameters as request headers.
https://valiron-edge-proxy.onrender.com/ingest/crawler/logs/<connection-id>?header_Authorization=Bearer%20<vcl_token>
  1. Select the HTTP requests dataset with these fields, and keep the default RFC 3339 timestamp format:
RayID,EdgeStartTimestamp,ClientRequestHost,ClientRequestMethod,ClientRequestPath,ClientRequestUserAgent,ClientIP,EdgeResponseStatus,EdgeResponseBytes,CacheCacheStatus,EdgeTimeToFirstByteMs,ClientCountry,SecurityAction,VerifiedBotCategory

Do not include request headers, cookies or query-string fields. ClientRequestURI is accepted, but its query string is discarded. Keep each Logpush upload at 16 MB or less (max_upload_bytes).

AWS WAF

  1. Create an Amazon Data Firehose stream with source Direct PUT and destination HTTP endpoint. AWS WAF requires the stream name to start with aws-waf-logs-.
  2. Set the endpoint URL to your connection endpoint, the access key to the vcl_ token, and content encoding to GZIP. Keep the buffer size at 16 MiB or less (the default 5 MiB works); larger deliveries are rejected. Configure an S3 backup bucket for failed records.
  3. In AWS WAF, open the web ACL → Logging and metrics and send logs to the stream. Redact the cookie and authorization fields in WAF logging; Valiron discards them in any case.

Valiron answers Firehose with the required requestId and timestamp response. WAF records contain no response status, so status-based analytics are empty for this source. WAF actions (allow, block, count, challenge) appear as edge actions. They are actions of your own WAF rules, not Valiron.

CloudFront real-time logs

  1. Create a Kinesis data stream and a CloudFront real-time log configuration. Recommended fields, in this order: timestamp, c-ip, sc-status, cs-method, cs-host, cs-uri-stem, cs-user-agent, x-edge-result-type, x-edge-request-id, time-taken, sc-bytes, x-host-header.
  2. When creating the connection, enter the same field list in the same order. Real-time records have no header, so the order must match exactly.
  3. Create a Firehose stream from the Kinesis stream to the HTTP endpoint with the connection URL and token, and attach the real-time log configuration to your cache behaviors.

File uploads

Upload plain or gzip-compressed files in Log sources, up to 16 MB compressed (64 MB uncompressed) and 500,000 records per file, and up to 50 files at a time. Formats are detected automatically: CloudFront files from S3 (.gz, W3C with #Fields, or JSON), ALB logs, combined logs, Cloudflare, AWS WAF, Vercel and Valiron NDJSON, and JSON arrays of records. Split larger files.

Drag and drop files onto the upload area, or use Choose files. Uploaded files lists each upload with its file name, size, detected format, stored, duplicate and unreadable records, and the request time range. View requests shows the most recent requests stored from that file. Remove takes an upload and the requests it stored out of your dashboard and analytics (totals, charts, routes, live traffic and the simulator). Valiron keeps the data, and uploading the same file again restores it. An upload can be removed once it has finished processing. A request that appeared in two files belongs to the upload that stored it first.

Vercel Drains

Vercel Drains stream every request your Vercel project serves, including cached and static responses, with the final status code, cache result and client address. Drains require a Vercel Pro or Enterprise team; Vercel bills them per GB delivered.

  1. In Log sources, choose Vercel Drains and create a push endpoint. Copy the endpoint and token.
  2. In Vercel, open Team Settings → Drains, add a Logs drain for the project, and select the request sources (static, functions, middleware, external). JSON or NDJSON encoding both work.
  3. Set the endpoint and add the custom header Authorization: Bearer <token>.

Entries without request metadata, such as function output and build logs, are skipped and not counted as unreadable. Requests are deduplicated by Vercel request ID. The proxy logs Vercel delivers contain client IP addresses and paths with query strings; Valiron applies the same handling as for every source (query strings removed, IP addresses hashed).

Push from any log shipper

Any sender can POST newline-delimited records in a source's native format, or in the Valiron format, to the connection endpoint:

gzip -c access.log | curl --fail -X POST "https://valiron-edge-proxy.onrender.com/ingest/crawler/logs/<connection-id>" \
  -H "Authorization: Bearer <vcl_token>" -H "Content-Encoding: gzip" --data-binary @-

The Valiron format is one JSON object per line. Only timestamp (RFC 3339 or Unix seconds/milliseconds) and path are required:

{"timestamp":"2026-11-20T10:00:00Z","host":"www.example.com","method":"GET","path":"/products/42","status":200,"user_agent":"Mozilla/5.0 …","client_ip":"203.0.113.7","duration_ms":38,"bytes":5120,"cache":"miss","request_id":"abc123"}

Include client_ip to allow crawler verification; without it, crawler claims are reported as evidence unavailable. To ship nginx logs continuously with Vector:

[sources.access]
type = "file"
include = ["/var/log/nginx/access.log"]

[sinks.valiron]
type = "http"
inputs = ["access"]
uri = "https://valiron-edge-proxy.onrender.com/ingest/crawler/logs/<connection-id>"
encoding.codec = "text"
framing.method = "newline_delimited"
compression = "gzip"
request.headers.Authorization = "Bearer ${VALIRON_LOG_TOKEN}"
Ingestion endpoint reference

POST /ingest/crawler/logs/:connectionId

  • Authentication: Authorization: Bearer <vcl_token>, or X-Amz-Firehose-Access-Key for Firehose. Dashboard sessions and operator API keys are not accepted. Upload-only connections cannot be used as push endpoints.
  • Body: any content type, up to 16 MB per request (larger requests receive 413, or the connection is closed before the upload completes; split them), plain or gzip (Content-Encoding: gzip, or detected from the gzip header). Decompressed content is limited to 64 MB and 500,000 records. Requests with X-Amz-Firehose-Request-Id are read as Firehose envelopes.
  • Response: 200 {"accepted":true,"duplicate":false,"batch":"<id>"}. An identical payload sent again on the same connection returns duplicate: true and is not reprocessed. Firehose requests receive {"requestId","timestamp"}, with errorMessage on failure.
  • Processing is asynchronous. Records normally appear within seconds of acceptance; see Recent deliveries for results.
  • Errors: 401 authentication_required (missing, invalid or revoked token), 400 empty_payload | invalid_gzip | invalid_firehose_payload, 413 (body over 16 MB, or payload_too_large after decompression), 415 unsupported_encoding, 429 too_many_batches (more than 240 deliveries per minute per connection), 503 ingestion_unavailable. Retry 429 and 503 with backoff.
  • Unreadable lines do not fail a delivery. They are counted as unreadable in that delivery's results.

Request log for sites without log access

If you cannot share CDN, WAF or server logs, add the passive request logger from @valiron/crawler-protection 0.8.0+ (Node.js 22+). Import it from @valiron/crawler-protection/request-log to load only the logger. It records each request after the response finishes and uploads in the background. It does not need Redis, an operator API key or activation, and it never blocks, delays or changes a request. Create an SDK request log connection in Log sources for the endpoint and token.

import express from 'express';
import { createCrawlerRequestLog } from '@valiron/crawler-protection';

const requestLog = createCrawlerRequestLog({
  endpoint: process.env.VALIRON_REQUEST_LOG_URL!, // https://…/ingest/crawler/logs/<connection-id>
  token: process.env.VALIRON_REQUEST_LOG_TOKEN!,  // vcl_…
  // Return the real client address for your proxy topology. Never trust raw X-Forwarded-For.
  clientIp: (req) => req.socket.remoteAddress,
});

const app = express();
app.use(requestLog.middleware());
// On shutdown: await requestLog.stop();

Options and methods:

  • endpoint must be HTTPS (HTTP only for loopback) and exactly /ingest/crawler/logs/<connection-id>, without credentials, query or fragment. token must be a vcl_ connection token. Invalid values throw at construction.
  • clientIp(request) selects the trusted client address. Use createCloudFrontClientIpResolver or your proxy's equivalent. Without it, client IPs are not sent and crawler claims cannot be verified.
  • sampleRate (0–1, default 1), flushIntervalMs (1,000–300,000, default 10,000), maxBuffer (100–200,000 records, default 20,000), fetch and onError are optional.
  • middleware() returns Express/Connect/Node middleware that calls next() immediately and records method, path (query removed), host, status, User-Agent, client IP, duration and Content-Length.
  • recordFetch(request, response, { ip, startedAt }) records requests in fetch-style runtimes such as Next.js middleware and Hono. record(entry) records any request manually.
  • flush() uploads up to 5,000 buffered records as gzip NDJSON. stats() returns { buffered, dropped }. stop() stops the timer and attempts a final upload.

Records are kept in memory only. Failed uploads (network errors, 429 and 5xx) are retried on the next flush within maxBuffer; records beyond the buffer are dropped and counted. Records still buffered when the process exits are lost. Other 4xx responses are reported to onError and not retried. Query strings, cookies and headers other than User-Agent are never collected. Client IPs are sent over HTTPS so Valiron can verify crawlers; Valiron stores only a keyed hash. Sampled traffic is currently counted as received and is not scaled up.

Traffic dashboard

Dashboard → Crawler Protection → Traffic shows every connected website. The status line shows the website, whether logs are arriving, connected sources, last delivery and the provider-confirmed protection state, with Enable protection when it is off. Analytics views have a period control (24h, 7d, 30d, 90d, 12 months). Analytics are grouped by request time in UTC, not delivery time.

  • Overview shows observed requests by traffic class; a stacked requests-per-hour (or day) chart with a per-class breakdown on hover or with the arrow keys; Verified crawlers by source, with spoofed claims counted separately; top identified crawlers and routes; declared automation by type; response status classes; edge cache results; and edge actions reported by your provider. Coverage shows stored, duplicate, unreadable and over-allowance records. Export downloads the current data as JSON. If a self-hosted runtime has reported, its analytics appear below as Runtime telemetry.
  • Live lists the most recently delivered requests (request time in UTC, source, verification state and method, request, status, timing and cache) with a histogram of the loaded requests. Filter chips for traffic class, verification state, response status and edge action show 24-hour counts; select a chip to hide that kind of request. Filter by path prefix too. Select a request to open its detail: claimed and verified identity, verification state, method and evidence version, a plain-language explanation, and request metadata. It refreshes every 15 seconds. Because logs arrive in batches, this is a near-live feed.
  • Bots & crawlers lists each crawler by provider and class, with request counts by verification state, errors, a daily trend and its most requested routes. A claim mismatch is shown separately from verified traffic.
  • Pages & routes lists the top 200 normalized routes with requests per traffic class, errors and mean response time, at daily granularity. Search routes, filter by class, and export CSV.
  • Log sources manages websites, connections, uploads, recent deliveries and website removal.

These views are tabs on the Traffic page. The sidebar adds Edge rules (Simulator, Edge protection) and Self-hosted (Setup, plus Controls, Decision logs and Alerts once a runtime has reported).

Status is Waiting for the first logs until data arrives. It becomes Processing while deliveries are queued, shows failures when processing fails, and becomes stale after six hours without a delivery from a continuous source. The status line also shows the website's provider-confirmed edge protection state. Edge actions in observed traffic are attributed to Valiron only when the provider rule ID belongs to a Valiron-managed rule; everything else belongs to your own CDN or WAF rules.

Dashboard APIs (operator dashboard session only; operator API keys and vcl_ tokens are rejected; responses use Cache-Control: private, no-store):

  • GET|POST /operator/crawlers/sites; PATCH /operator/crawlers/sites/:siteId (excludedPaths); DELETE /operator/crawlers/sites/:siteId?confirm=<hostname> removes the website from the dashboard and returns { "removed": true, "retained": true }.
  • GET|POST /operator/crawlers/sites/:siteId/connections ({ "kind": "push", "format": "<format>|auto" }, { "kind": "sdk" }, or cloudfront_realtime with "fields": [...]); DELETE /operator/crawlers/connections/:connectionId.
  • POST /operator/crawlers/sites/:siteId/uploads?format=auto&name=<file name> (raw file body); GET /operator/crawlers/sites/:siteId/batches (uploads=1 lists file uploads only); DELETE /operator/crawlers/sites/:siteId/uploads/:batchId removes an upload from analytics and returns { "removed": true, "retained": true, "requests": <n> }.
  • GET /operator/crawlers/traffic/overview|timeseries|providers|pages?site=<id>&from=<ms|ISO>&to=<ms|ISO>, and GET /operator/crawlers/traffic/events?site=<id>&limit=1-200&before=<cursor>&audience=&verification=&status=&edge=&provider=&path= (audience, verification, status and edge accept comma-separated lists; batch=<uploadId> returns requests stored by one upload).

Another account's website returns 404 site_not_found. Up to 25 websites per account and 20 active connections per website are supported.