Skip to main content
This guide shows how to use the Agent API’s search_domain_filter to restrict search results to academic and scholarly sources. You will learn how to extract paper metadata (DOIs, authors, publication dates), build citation chains across related papers, and produce properly attributed research summaries.
The search_domain_filter parameter on the Agent API’s web_search tool controls which domains the search draws from. By filtering to academic domains like arxiv.org, nature.com, and .edu, you restrict results to peer-reviewed journals, preprint servers, and academic databases. For more on filtering, see the Agent API Filters docs.

Prerequisites

Install the Perplexity SDK:
If you don’t have an API key yet:

Get your Perplexity API Key

Navigate to the API Keys tab in the API Portal and generate a new key.
Then export your API key as an environment variable:
Use search_domain_filter to restrict the Agent API’s web_search tool to academic sources only.
Academic domain filtering targets papers from PubMed, arXiv, Google Scholar, Semantic Scholar, and major journal publishers. Combine search_domain_filter with clear instructions to ensure the model focuses on peer-reviewed or pre-print academic content.

Extracting Paper Metadata

Use structured outputs to extract detailed paper metadata from academic search results.

Building Citation Chains

Trace how papers cite each other to understand the evolution of an idea across the literature.
Citation chain depth grows exponentially. Keep max_depth low (1-2) to avoid excessive API calls. For comprehensive citation graphs, use dedicated tools like Semantic Scholar’s API alongside Perplexity for summaries.

Research Summary with Attribution

Generate a research summary that properly attributes each claim to its source paper.
Use field-specific domain filters to search across different academic disciplines.

Tips and Best Practices

  1. Use search_domain_filter with academic domains to restrict results to peer-reviewed sources. Target domains like arxiv.org, nature.com, pubmed.ncbi.nlm.nih.gov, and .edu.
  2. Use instructions to guide academic focus. Tell the model to prioritize peer-reviewed papers, cite authors and years, and focus on specific fields.
  3. Use field-specific domain lists to narrow results to specific publishers or databases (e.g., PubMed for biomedical, arXiv for CS).
  4. Use structured outputs for metadata extraction. JSON schemas ensure consistent paper metadata across queries.
  5. Request specific details in your prompt. Ask for “authors, year, journal, and key findings” to get more complete metadata in the response.
  6. Combine search_domain_filter with search_recency_filter for time-sensitive research. Use "week", "month", or "year" to find recent publications.

Next Steps

Agent API Filters

Full reference for domain, recency, and location filters on the Agent API.

Structured Outputs

Extract typed JSON for paper metadata and research findings.

Domain Filtering

Control which domains the search includes or excludes.