Ask Perplexity on your own key, with sources
ask_perplexity_with_sourcesAsk Perplexity questions with your own API key and get each answer with its cited sources, cited domains, brand citation position, and the searches it ran.
Instructions
Give questions and your own Perplexity API key. Returns one row per answer with the answer text, every search result with which ones the answer cites, the cited domains, the searches Perplexity ran, and, if you name a brand, whether the answer names and cites it and at what position. With no key it writes up to 3 free check rows and asks nothing. Pay per event on Apify: 0.01 USD per completed answer, plus your Perplexity bill.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ask_perplexity_with_sources"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| brand | No | Optional. A brand name, a domain, or both as Name|domain.com. Each row then says whether the answer names the brand and cites its domain, and at what position. | |
| model | No | Optional. An Agent API model ID, for example perplexity/sonar or openai/gpt-5.6-sol. When set, the actor asks that model with Perplexity's web search tool on instead of using an effort level. | |
| effort | No | Perplexity's Agent API effort level: fast (default; quick answers with numbered citations), low, medium, or high. Higher levels search more and cost more on your Perplexity bill. Ignored when you name a model. | |
| api_key | No | Your own Perplexity API key, from console.perplexity.ai. It is sent only to api.perplexity.ai and is never stored, logged, or written to a row. With no key, the run checks up to 3 prompts for free and asks nothing. | |
| country | No | Optional. Two letter country code, for example US or DE. Perplexity uses it as the searcher's location. | |
| prompts | No | The questions to ask Perplexity, one per line. Each is sent as written. As text, one prompt per line; a comma does not split a prompt. | |
| competitors | No | Optional. Competitor names or Name|domain.com, one per line. Used for the brand mention rank and the competitors named column. | |
| concurrency | No | How many prompts to ask at the same time, 1 to 10 (default 3). Lower it if your Perplexity account hits its rate limit. | |
| max_charge_usd | No | Optional. The run stops before a charge that would pass this amount. Summary rows are always returned. It does not cap your Perplexity bill. | |
| samples_per_prompt | No | How many times to ask each prompt, 1 to 5 (default 1). Answers change between calls, so more samples give a steadier read. Each sample is one Perplexity call and one charged answer. | |
| search_domain_filter | No | Optional. Domains for Perplexity's web search to use, or to skip with a leading minus, for example -pinterest.com. Up to 20. | |
| search_recency_filter | No | Optional. Limit web search results to the last hour, day, week, month, or year. |