Use this file to discover all available pages before exploring further.
The search_type parameter switches the Search API between general web search and specialized search modes. Set search_type="people" to invoke People Search and retrieve professional information about individuals such as names, job titles, and companies.
People Search lets you query Perplexity’s index for professionals, employees, and public figures. Use it when your application needs to:
Look up a specific person’s professional background
Find employees at a company by role or title
Identify professionals in a particular field or location
Research leadership teams or organizational structures
Pass search_type="people" on a standard Search API request to route the query through the People Search backend. All other Search API parameters (e.g., max_results, max_tokens_per_page) continue to apply.
The example below finds engineering leadership at a specific company.
from perplexity import Perplexityclient = Perplexity()response = client.search.create( query="VP of Engineering at Stripe", search_type="people", max_results=10)for result in response.results: print(f"{result.title}: {result.url}")
For best results, include identifying details in the query:
Approach
Example query
Name + company
”Find John Smith who works at Google”
Role + company
”Head of Design at Figma”
Role + location
”Marketing directors in San Francisco”
Role + field
”Machine learning researchers at Stanford”
For agentic workflows that need the model to autonomously decide when to look up people, use the people_search tool with the Agent API instead. To wire People Search into a third-party agent SDK, see Use as an agent tool below.
People Search can be exposed to a third-party agent SDK as a people_search function tool — useful when you want the model to autonomously decide when to look up individuals. The plumbing below mirrors the web_search Agent SDK integrations; wire people_search into the same tool-call loop alongside or in place of web_search.
Keep the description verbatim — its wording is what produces good, focused queries and prevents the model from picking People Search for general-knowledge questions.
PEOPLE_SEARCH_TOOL_DESCRIPTION = """\Searches LinkedIn for individual profiles and employee data. Returns profile information including names, job titles, companies, and LinkedIn profile URLs. Results are exclusively from LinkedIn. Use this tool ONLY when the user specifically wants LinkedIn profiles, individual employee lookups, or data that only LinkedIn would have (e.g., listing employees at a company by location, finding someone's career history). For general questions about executives, leadership teams, or public figures, prefer search_web instead as it returns richer curated results.Best practices:- Include the person's name and/or company for targeted results.- Add job title or role keywords to narrow results.- Use both abbreviations AND full titles for better coverage (e.g., query for both "CTO" and "Chief Technology Officer").- Use multiple distinct query variations for broader coverage, varying by role, department, company name, or location.- Use up to five queries for complex requests.Examples: - ["John Smith software engineer Google"] - ["CTO Stripe", "Chief Technology Officer Stripe"] - ["Perplexity AI engineer SF", "Perplexity product manager", "Perplexity AI designer San Francisco"] - ["machine learning researcher Stanford"]"""PEOPLE_QUERIES_PARAM_DESCRIPTION = ( "An array of keyword-based people search queries. Each query should " "include names, titles, or companies.")
Strict mode constraints. When strict: true, the JSON Schema must set additionalProperties: false and list every property in required. OpenAI rejects maxItems/minItems in strict mode — enforce the five-query cap through the description and truncate defensively in your handler.
The handler is identical across SDKs — call Search API with search_type="people":
from perplexity import Perplexityperplexity = Perplexity()def run_people_search(queries: list[str]) -> str: """Call Perplexity People Search and format the results for the model.""" response = perplexity.search.create( query=queries, search_type="people", max_results=10 ) lines = [] for result in response.results: snippet = (result.snippet or "").strip().replace("\n", " ") if len(snippet) > 400: snippet = snippet[:400] + "…" lines.append(f"- {result.title}\n {result.url}\n {snippet}") return "\n\n".join(lines) if lines else "No results."
The tool-call loop is identical to the web_search pattern in each SDK’s guide. Wire people_search into the same loop, either alongside web_search or on its own, and dispatch on the tool name when handling tool calls.