Head to head · Web search · October 2026 research run

Cloudflare Web Search API vs Perplexity Search API

Perplexity Search API scores 70.2 (BB) on agent readiness against Cloudflare Web Search API's 66.9 (B), and leads in 5 of 7 scored categories. Cloudflare Web Search API leads on security & auth and transparency & trust. Both do web search. Cloudflare Web Search API is cheaper for web search, $0.25 against $1 per 1,000 requests.

Best web search APIs for AI agents · All 308 search comparisons

Which one, for what

Cloudflare Web Search API B

Best for Agents and apps already on Cloudflare Workers or AI Gateway that want cheap snippet search ($0.25 per 1,000 with Ceramic.ai) on the same bill and logs as their inference.

Ahead on

  • Security & auth, 74 against 56
  • Transparency & trust, 73 against 66

Also in its favour

  • Cheaper for web search, $0.25 against $1 per 1,000 requests

Watch for

Open beta, with no SLA found for AI Gateway

Perplexity Search API BB

Best for Agents on any model that need raw ranked sources with extracted text at a low per-request price, and teams that want cited answers from the same key through the Agent API.

Ahead on

  • Schema & documentation, 89 against 81
  • Agent ergonomics, 85 against 63
  • Payments & pricing, 25 against 20
  • Maintenance & community, 82 against 71

Also in its favour

  • Agent-ready, a grade of BB or better
  • A hosted endpoint, with nothing to install
  • Runs on your own machine

Watch for

The FAQ says uptime and recovery time are not guaranteed, and the terms carry no SLA

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Agent ergonomics Perplexity Search API +22

Cloudflare Web Search API 63

Results are small by default (URL, title, description), and limit caps them at 1 to 10. The default provider, Ceramic.ai, returns descriptions of up to 8,000 characters a result with no parameter to shorten them (15 of 25). limit is the only control. No pagination, offset, domain, date, country or freshness filters (6 of 20). Errors come back with category (gateway, credential, provider, internal), code, status, retryable and gatewayRequestId. The codes themselves aren't listed (16 of 20). Searches only read, the error body says whether a retry helps, and gateways can retry upstream failures up to five times. No idempotency keys, which a read doesn't need (16 of 20). Only query and the gateway ID are required. The Workers binding is TypeScript, and the Cloudflare TypeScript SDK 7.3.0 of 3 October has no web search method. We didn't check the Python or Go SDKs (10 of 15).

Perplexity Search API 85

max_results 1 to 20, max_tokens and max_tokens_per_page cap the extracted text, and results are title, url, snippet and two dates. The MCP server has four tools (23 of 25). Domain, language, recency, publication and update date filters and country, with up to five queries in one request. No pagination or offset (16 of 20). 429 bodies name the limit hit, the SDKs map status codes to typed errors, and 402 marks an empty balance. Search-specific error bodies beyond 422 validation are not documented (13 of 20). Searches only read, failed and rate-limited requests are not billed, and the MCP server sets readOnlyHint true, destructiveHint false and idempotentHint false on every tool (18 of 20). Only query is required. Official Python and TypeScript SDKs, a CLI and a Python Search SDK (15). 23 + 16 + 13 + 18 + 15 = 85.

Security & auth Cloudflare Web Search API +18

Cloudflare Web Search API 74

Cloudflare API tokens are scoped by permission and revocable, and web search needs only Workers AI Read and AI Gateway Read. Permission is per account, not per gateway or provider. The OpenAPI operation also accepts the legacy global API key in headers (27 of 30). Every call reads. Spend limits per gateway and the Require provider credentials setting cap or block spend, and byokAlias fails rather than falling back to credits. Read permission is enough to spend credits (14 of 20). Results are third-party page text passed to a model, and we found no prompt-injection guidance in the web search pages or the launch post. AI Gateway Guardrails aren't documented for web search (0 of 15). Every search lands in AI Gateway logs with cost and status, on by default (15). security.txt names HackerOne and a disclosure policy and still has no Expires field, re-read on 2 November 2026. Cloudflare's ISO page says it is currently certified against ISO 27001:2022, with ISO 27018 and 27701, scoped to the Cloudflare global cloud platform. 2 held back for the missing Expires, as on the other Cloudflare listings (18 of 20). 27 + 14 + 0 + 15 + 18 = 74.

Perplexity Search API 56

Project API keys, shown once, revocable, and generated and revoked through two documented endpoints with a rotation guide. No per-key scopes or spending limits were found. The hosted MCP server also takes Sign in with Perplexity (OAuth). Keys go in the Authorization header only (22 of 30, as on the Decisions API listing). Search only reads, and MCP clients can disable tools, but any key reaches every API on the account, including the Agent API's sandbox and MCP tools (8 of 20). Snippets are third-party page text, and no guidance on treating them as untrusted was found in the docs, the MCP server or its SECURITY.md (0 of 15). Responses carry a request id, and the console shows usage by key. The Audit API covers enterprise organisations' web app events with its own keys, not API calls (8 of 15). security.txt valid until 31 December 2027 linking a security page, a SOC 2 Type II report, a 2025 HIPAA gap assessment and a CAIQlite listed on the trust centre, and a SECURITY.md on the MCP server that takes private reports through GitHub advisories or security@perplexity.ai. The trust centre is drawn by script and wasn't read (18 of 20). 22 + 8 + 0 + 8 + 18 = 56.

Maintenance & community Perplexity Search API +11

Cloudflare Web Search API 71

Read for a closed service. The web search launch entry is dated 2 October 2026, 31 days ago. The AI Gateway changelog entry of 8 October 2026 changed the log and request IDs every AI Gateway request returns, searches included, so recency stays at 30 until 7 November. Thirteen dated AI Gateway changelog entries from 5 August to 21 October (20). A public changelog with RSS and a developer Discord. We didn't check support response times (8 of 15). The Workers binding has the method. The Cloudflare TypeScript SDK's newest tag is still 7.3.0 of 2 October, with no web search method, though the OpenAPI names an SDK method websearch (8 of 15). The OpenAPI spec carries the path. Nothing else to measure for a hosted endpoint (5 of 10). 30 + 20 + 8 + 8 + 5 = 71.

Perplexity Search API 82

Read as a closed service with official SDKs and an open-source MCP server. perplexityai 0.46.1 on PyPI on 23 October 2026 and the MCP server's last commit on 21 October, with changelog entries into November 2026 (30). In the 90 days from 8 August, perplexityai 0.43.7 to 0.46.1 (six releases from 2 October), MCP server 1.2.1 (27 August) and 1.3.0 (25 September, Fast Search on perplexity_search), and Fast Search itself in September (20). A changelog with several entries a month, a community forum with a bug-report category, a GitHub discussion repository and api@perplexity.ai. MCP issue reply times weren't read (10 of 15). The MCP server is in the official registry under the domain-verified ai.perplexity namespace, and the Python and TypeScript SDKs are current (15). The MCP repository runs tests in CI and validates its plugin manifests. Its 1.4.0, prepared on 16 October, is not on npm, which still serves 1.3.0, and the registry's latest entry is 1.2.1 of 27 August (7 of 10). 30 + 20 + 10 + 15 + 7 = 82.

Schema & documentation Perplexity Search API +8

Cloudflare Web Search API 81

Cloudflare's public OpenAPI has /accounts/{account_id}/ai/websearch with a typed body, additionalProperties: false and typed 200, 400, 403 and 502 responses. provider is a free string there where the docs give an enum (22 of 25). llms.txt for the product and Markdown for every page (10). The providers page says which provider suits which job, such as Ceramic.ai for agents that run many searches and Exa for short query-relevant excerpts. Nothing says when not to use the endpoint, and the OpenAPI description is one line (12 of 20). query 1 to 1,024 characters, limit 1 to 10, provider enum in the docs, byokAlias with a pattern (14 of 15). curl and Worker examples, a response example, and a typed error body with category, code and retryable. No catalogue of error codes or messages found (11 of 15). Dated launch entry in the AI Gateway changelog, still the only web search entry on 2 November 2026. The API path carries v4 for the whole Cloudflare API, nothing specific to web search (12 of 15). The OpenAPI operation, re-read from a clone on 2 November, is unchanged.

Perplexity Search API 89

OpenAPI 3.1.0 at docs.perplexity.ai/openapi.json describes POST /search with typed request and response schemas, listed in llms.txt (25). llms.txt indexes every page, each with a Markdown twin (10). The overview says what a result holds, that snippets can be empty, when to use the Search API instead of the Agent API, and that it takes queries not URLs and does not re-fetch pages (19 of 20). search_type is an enum, max_results, max_tokens and max_tokens_per_page carry minimum and maximum, country and language codes carry lengths, and query is a string or an array. The recency filter is an enum in the docs, and date filters are MM/DD/YYYY strings (14 of 15). Python, TypeScript and cURL examples with a recorded response. The spec documents only 200 and 422 for /search, and status codes are listed on the SDK error-handling page and the rate-limit page rather than for Search (11 of 15). A public changelog with several entries a month, dated by month only, and an unversioned /search path (10 of 15). 25 + 10 + 19 + 14 + 11 + 10 = 89.

Transparency & trust Cloudflare Web Search API +7

Cloudflare Web Search API 73

Closed service under Cloudflare's terms, with each provider's terms linked from the providers page (15 of 30). AI Gateway logs are on by default with headers to skip payloads, and Cloudflare's privacy policy and DPA exist per the Cloudflare MCP check. The providers page gives Zero Data Retention for Ceramic.ai and Linkup but not Exa, while the 2 October changelog says all three support it. No retention period for web search logs on the pages we read (15 of 30). No deprecation policy found. The changelog posts dated changes, such as the 24 September log cut-over, but no deprecation notices (6 of 20). The three providers are named, and Cloudflare's subprocessor page names 12 third parties with locations per the Cloudflare MCP check. Where searches are processed isn't stated (14 of 20). The providers page, still dated 2 October, was re-read on 2 November; the other documents follow the Cloudflare MCP check and weren't re-read. 15 + 15 + 6 + 14 = 50.

Perplexity Search API 66

Closed service under terms naming Perplexity AI, Inc. and California law. The MCP server is MIT and the SDKs Apache-2.0 (18 of 30). The terms and DPA say Customer Content and personal data don't train Perplexity's models, the DPA deletes personal data within 30 days of the service ending, and the Privacy and Security page says retention varies by API and zero data retention is not the default. The DPA also says Perplexity Search may follow different data terms, which weren't found, and no retention period for search queries is stated (15 of 30). Sonar Chat Completions support ended on 27 September 2026 with a migration guide and requests reformulated rather than refused, and sonar-reasoning was removed on 15 December 2025 with a named replacement. Notices are dated by month and there is no standing notice period beyond the terms' 30 days for termination (10 of 20). A sub-processor list on the trust centre, which is drawn by script and wasn't read, ten business days' notice of new non-model subprocessors, and SCCs for EU and UK transfers. No data location is stated (8 of 20). 18 + 15 + 10 + 8 = 51.

Payments & pricing Perplexity Search API +5

Cloudflare Web Search API 20

No x402, MPP or L402 on /ai/websearch. AI Gateway Machine Payments covers only /ai/run for four open models (0, Machine Payments page unchanged since 30 September and still limited to /ai/run). Per-search prices published without a login, $0.25, $5.00 and $7.00 per 1,000 by provider. The 5 per cent fee on credit purchases sits on the Unified Billing page, not the providers page (20). No free allowance found. Credits need a payment method, and the BYOK route needs an account with the provider (0). A person signs up for Cloudflare in a browser and buys credits or stores a provider key (0). 0 + 20 + 0 + 0 = 20.

Perplexity Search API 25

No x402, MPP or L402 in the docs, pricing page, OpenAPI or llms.txt (0). $5 per 1,000 successful requests, $1 with Fast Search, published without a login, with failed and rate-limited requests not billed (20). Usage is prepaid with a card on the billing page, and no free allowance was found. The console playground needs no key but is a page for a person, not an API allowance (0). A person signs up in the console. The Stripe Projects route provisions a project, key and credits from a terminal, but needs a person's Stripe account with a payment method and a $10 minimum purchase (5 of 20, as on the Decisions API listing). 0 + 20 + 0 + 5 = 25.

Score by category

CategoryWeight this runCloudflare Web Search APIPerplexity Search APIEdge
Reliability16%207780Perplexity Search API +3
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.28189Perplexity Search API +8
Agent ergonomics13%16.26385Perplexity Search API +22
Security & auth14%17.57456Cloudflare Web Search API +18
Payments & pricing10%12.52025Perplexity Search API +5
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.87182Perplexity Search API +11
Transparency & trust7%8.87366Cloudflare Web Search API +7
Negative events≤1500
TotalB 66.9/100BB 70.2/100

Facts side by side

FactCloudflare Web Search APIPerplexity Search API
KindHTTP APIHTTP API
VendorCloudflare, Inc.Perplexity
Hosted endpointno (local only)https://api.perplexity.ai/mcp
TransportsHTTPStreamable HTTP, stdio
AuthAPI keyOAuth or key
PricingPay per usePay per use
Price for web search$0.25 per 1,000 requests$1 per 1,000 requests
x402nono
LicenceProprietary service under Cloudflare's terms. Each search provider's own terms are linked from the providers pageProprietary service under the Perplexity API Terms of Service. The MCP server is MIT and the official SDKs Apache-2.0
Tools exposednone4
Read-only variant documentednono
llms.txtyesyes
MCP registrynot listedai.perplexity/mcp-server
Last release2026-10-022026-10-23
Terms last updated2025-09-12couldn't be read
Privacy policy last updatedno date givencouldn't be read
Customer content may train modelsnot found in the textcouldn't be read
Terms restrict automated accessyescouldn't be read
Terms restrict benchmarkingnot found in the textcouldn't be read
Terms or service can change without noticeyescouldn't be read
Arbitration or class-action waiveryescouldn't be read
Agent reviews3/5 (2)none

How the scores have moved

Verdicts

Cloudflare Web Search API

One endpoint that sends a search to Ceramic.ai, Exa or Linkup and returns results in one format, logged and billed through AI Gateway, whose status shows no incidents in 90 days. Ceramic.ai costs $0.25 per 1,000 searches. It is still an open beta with no free allowance, at most 10 results a call, no filters and no machine payment route.

Perplexity Search API

Raw ranked results with token-capped page text from Perplexity's own index, $5 per 1,000 requests or $1 with Fast Search, an OpenAPI description and a hosted MCP server with read-only annotations. Uptime is not guaranteed, there is no free allowance, keys carry no scopes, and no guidance on untrusted page text was found.

Before you call either

Cloudflare Web Search API

  1. Set options.gateway.id. Every account has a gateway named default
  2. Pass provider explicitly. It defaults to Ceramic.ai, whose descriptions can run to 8,000 characters a result
  3. Set limit to the results you'll read, between 1 and 10
  4. Set byokAlias when you mean to use a stored provider key, so a missing key fails with 400 instead of spending credits
  5. Send cf-aig-collect-log-payload: false if queries shouldn't be stored in gateway logs

Perplexity Search API

  1. Set max_tokens_per_page and max_tokens before calling; extracted text otherwise fills the context, and the price does not change with size
  2. Skip results with an empty snippet and dedupe by url when sending a query array; each query costs one rate-limit unit
  3. Use search_type: "fast" for $1 per 1,000 when latency and cost matter more than depth
  4. On 429 wait for Retry-After, then back off; on 402 stop and ask the user to add credits
  5. Use the Search API for sources and the Agent API's web_search tool for a written answer with citations

Questions

Which is better for AI agents, Cloudflare Web Search API or Perplexity Search API?

Perplexity Search API scores 70.2 (BB) on agent readiness against Cloudflare Web Search API's 66.9 (B), and leads in 5 of 7 scored categories. Cloudflare Web Search API leads on security & auth and transparency & trust.

Which is cheaper for web search, Cloudflare Web Search API or Perplexity Search API?

Cloudflare Web Search API, at $0.25 per 1,000 requests against $1 per 1,000 requests for Perplexity Search API. These are the vendors' published prices for the job.

Do Cloudflare Web Search API and Perplexity Search API need an API key?

Cloudflare Web Search API needs an API key. Perplexity Search API takes an API key or an OAuth sign-in.

Can an agent call Cloudflare Web Search API and Perplexity Search API without installing anything?

No hosted endpoint is listed for Cloudflare Web Search API. Perplexity Search API has a hosted endpoint at https://api.perplexity.ai/mcp.

Other comparisons with Cloudflare Web Search API or Perplexity Search API

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.