Generate answer
perplexity.answer.generate
Submit a prompt with locale, country, search, and source-policy controls in a fresh Perplexity context; return a complete answer, citations, and execution evidence.
Request
curl -X POST https://data.upscrape.com/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"country":"Germany","include_sources":true,"locale":"en-GB","max_sources":10,"mode":"search","model":"auto","prompt":"Verify the claim that Upscrape received a €20 million regulatory fine in July 2026. Do not accept the premise; require a primary regulator notice matching the entity, amount, and date, and report clearly if no reliable record supports it.","source_policy":{"official_sources_only":true,"published_after":"2026-01-01"},"timezone":"Europe/Berlin"},"capability":"perplexity.answer.generate"}'
Sample response
{
"completed": true,
"finish_reason": "stop",
"grounded": false,
"query": "In one short sentence, explain why the sky appears blue.",
"response": "The sky looks blue because molecules in Earth's atmosphere scatter shorter-wavelength blue light from the Sun more than they scatter red light."
}
Input
| Field | Type | Required | Description |
|---|---|---|---|
country
| string | optional | |
include_sources
| boolean | optional | |
locale
| string | optional | |
max_sources
| integer | optional | |
mode
| string | optional | |
model
| string | optional | |
prompt
| string | required | |
source_policy
| object | optional | |
source_policy.excluded_domains
| array<string> | optional | |
source_policy.official_sources_only
| boolean | optional | |
source_policy.preferred_domains
| array<string> | optional | |
source_policy.published_after
| string | optional | |
source_policy.published_before
| string | optional | |
timezone
| string | optional |