Learning resourcesReviewed · Perplexity

Perplexity Agent API Web Search Guide

Perplexity's Web Search documentation teaches developers to add web research to AI agents, but the model chooses when to search. It covers the Agent API's web_search tool, standard and Fast Search, source and date filters, context budgets, citation metadata and invocation pricing.

Researched 25 Nov 2026

In short.

Perplexity's Web Search documentation is a guide for developers adding web research to AI agents, but enabling the tool guarantees neither a search nor inline citations. It documents search modes, source and location filters, search-context budgets and response metadata. Listed fees are $2.50 per 1,000 standard search invocations or $1.00 for Fast Search, plus model tokens. Some sample responses conflict with their displayed source filters. No requests were executed, and live accuracy, latency, filter enforcement and billing remain unassessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is the complete Web Search documentation page at [https://docs.perplexity.ai/docs/agent-api/tools/web-search.md], including examples, parameter and response tables, SDK compatibility notes, pricing, citation guidance and limits. Linked documentation, API references, pricing and quota pages, and external example sources are excluded. No code or requests were executed; live behavior, answer quality, filter enforcement, latency and actual billing remain unassessed.

The overview

identity

This is Perplexity's documentation for the web_search tool within its Agent API, published at [https://docs.perplexity.ai/docs/agent-api/tools/web-search.md]. The page teaches integration through Python, TypeScript and authenticated HTTP examples, followed by configuration tables, response fields, pricing and limits.

assessment

The guide is useful for developers building research assistants, current-information answers and recurring agent tasks. Its strongest practical detail is the combination of source restrictions, retrieval budgets, citation metadata and invocation accounting.

The examples support implementation planning. They do not establish answer accuracy, production reliability or the relative quality of standard and Fast Search.

users

The intended users are developers making Perplexity Agent API requests. Python and TypeScript users receive SDK examples; developers using other languages can follow the HTTP request structure.

Beginners will need familiarity with API keys, JSON requests and model instructions. Experienced developers can use the budgeting controls and usage fields to plan retrieval breadth, context size and recurring costs.

capabilities

The tool supports web and fast search paths. max_results accepts 1–50 results, max_tokens caps total search context, and max_tokens_per_page caps content extracted from each result page.

Filters cover domain or individual-URL inclusion and exclusion, publication dates, last-update dates and relative recency. Domain filters accept up to 200 entries, each up to 253 characters; a leading minus sign excludes an entry. Recency options are hour, day, week, month and year.

Location personalization accepts country, region, city, latitude and longitude. Source, date, recency and location controls can be combined.

Using it

requirements

Requests require a Perplexity API key and access to the Agent API. The HTTP examples use Bearer authentication with [https://api.perplexity.ai/v1/agent], while the SDK examples use a Perplexity client.

Passing search_type requires Perplexity Python library 0.43.6 or later, or TypeScript SDK 0.38.6 or later. These minimum versions concern that field specifically. The page warns that older TypeScript SDKs fail type checking on it and documents an as any cast as a workaround.

The page does not establish a complete supported-model list, general SDK compatibility matrix or numeric account quotas.

mechanism

A request enables search by adding an object with type set to web_search to its tools array. The model decides whether to invoke it based on the prompt and instructions.

An explicit search_type overrides the effort level's search route. The documented fast, low, medium, high and xhigh effort levels default to fast search. Without an explicit or inherited value, the route defaults to web. Search type is a separate setting from effort level.

The response can contain a search_results output item before the assistant message. Results include identifiers, URLs, titles, snippets and date metadata. Inline citation markers depend on prompting; the guide identifies each result's id and url as the reference for resolving citations.

setup

Configure the API key, then use client.responses.create or the documented HTTP endpoint with a model, input and web_search tool object. Add instructions requesting current research and inline citations when those behaviors matter.

Set search_type explicitly when the search route matters, then choose result and token caps. Put domain and date controls inside filters. Put user_location beside filters within the tool object.

Publication and last-update filter dates use MM/DD/YYYY. Latitude and longitude must be supplied together with country. Region and city are recommended for more accurate location context.

example

A documented request asks for the latest stable Rust release and its changes, enables web_search and sets search_type to fast. The Python and TypeScript examples read response.output_text. This illustrates an explicit search route for a question needing current information.

Another example sets max_tokens to 6000 and max_tokens_per_page to 1200 for research into US AI procurement rules. These are requested extraction ceilings, not demonstrated consumption figures. Neither example was executed for this report.

Assessment & evidence

limitations

max_results is an upper bound, and the backend may return fewer results. When a call uses several reformulated queries, its result budget is divided across them, approximately using ceil(max_results / number_of_queries). Default result and token budgets are unspecified.

Two displayed examples using a .gov domain filter include Wikipedia or cov.com results. These inconsistencies leave live filter enforcement unassessed. Sample results also contain empty snippets and null dates, so applications should allow for missing metadata.

Agent API request and token limits apply, but numeric tier limits are only linked elsewhere. The page provides no measured latency, retrieval-quality benchmarks or verified citation-accuracy results.

reasoning

The guide's practical value comes from explaining separate retrieval controls: filters restrict eligible sources, result counts control breadth, and token caps control how much retrieved material reaches the model. Their effect on answer accuracy remains unknown.

Fast Search has a lower listed invocation fee. The recommendation to use it for routine agent loops, and standard web search for difficult or ambiguous questions, is vendor guidance without comparative measurements on this page.

alternatives

For a known URL, the page points to Fetch URL Content [https://docs.perplexity.ai/docs/agent-api/tools/fetch-url-content.md]. For professional and employee lookup, it points to People Search [https://docs.perplexity.ai/docs/agent-api/tools/people-search.md].

Those tools are linked alternatives for different retrieval needs. Their configuration, costs and performance are not established by the Web Search page, and the linked pages are outside this report's scope.

evidence

The evidence is the complete Perplexity Web Search documentation page, including request examples, illustrative responses, configuration tables, SDK notes and billing guidance. It is a single vendor source.

No code or API requests were executed. The sample responses are documentation examples, and independent measurements of search quality, filter behavior, citation accuracy, latency and actual charges are absent.

Access & freshness

costs

The page lists standard web_search at $2.50 per 1,000 invocations and search_type fast at $1.00 per 1,000 invocations. Model tokens are billed separately. It also states that search-context charges follow tokens actually consumed rather than the requested budget.

Fast Search calls remain reported under tool_calls_details.search_web. The final usage object can include search_web.invocation when tool-call usage is reported.

Model-token rates, default context budgets and complete example costs are not supplied. A total request price cannot be established from this page alone.

rights

The page supplies no explicit licence or redistribution terms for its documentation, code examples, retrieved content or generated outputs. Permissions for those uses remain unknown from this source.

Applicable API terms, data-retention rules and handling of submitted queries are also not established by this page.

freshness

The available documentation snapshot was captured on 25 November 2026. The page's own publication or revision date is not established.

Dates inside example search results describe those result pages. They do not establish when this documentation changed. Current prices, SDK requirements and account limits should be confirmed before deployment.

actions

Start with an explicit search_type, bounded result and token budgets, and filters appropriate to the task. Request inline citations and retain result identifiers and URLs alongside generated answers.

Evaluate representative requests for useful source coverage, filter compliance, citation accuracy, latency and total charges. Inspect search_results and usage.tool_calls_details.search_web.invocation when present. Resolve the documentation's filter-example inconsistencies before depending on strict source restrictions.

Confirm the applicable account quotas and add retry and backoff handling for production traffic, as the page recommends.

Evidence for this report

selected-page.txtselected · checked 2026-11-25