Perplexity
Extract Perplexity responses by submitting prompts, with parsed data including answer text, Markdown output, related queries, cited sources, images, inline products, and more.
The perplexity source lets you submit a prompt and receive a fully parsed, structured response, including the formatted answer, web sources used, related queries, and displayed UI tabs. Product-related prompts can return shopping results and inline product listings.
Request samples
The code examples below illustrate how to send prompts to Perplexity using Push-Pull.
curl 'https://data.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
"source": "perplexity",
"prompt": "best supplements for better sleep",
"geo_location": "United States",
"parse": true,
"callback_url": "https://your-server.com/oxylabs-callback"
}'import requests
from pprint import pprint
# Structure payload.
payload = {
'source': 'perplexity',
'prompt': 'top 3 smartphones in 2025, compare pricing across US marketplaces',
'geo_location': 'United States',
'parse': True,
'callback_url': 'https://your-server.com/oxylabs-callback'
}
# Get a response.
response = requests.post(
'https://data.oxylabs.io/v1/queries',
auth=('USERNAME', 'PASSWORD'),
json=payload
)
# Print prettified response to stdout.
pprint(response.json())Submitting a job with Push-Pull integration (including batch queries) method returns the job ID immediately – not the result. Once the job status is done, retrieve the parsed response. See Integration method on the LLMs and AI page for the full submit-and-retrieve flow.
Request parameters
Basic setup and configuration parameters for scraping Perplexity responses.
source
Sets the scraper target. Use perplexity.
–
prompt
The prompt or question to submit to Perplexity. Must be under 8000 characters.
–
parse
Set to true for structured JSON data.
false
- mandatory parameter
Structured data
Once the job is retrieved via the Push-Pull results endpoint, Web Scraper API returns either an HTML document or a JSON object of Perplexity's output, which contains structured data from the results page.
Output data dictionary
HTML example

JSON structure
All LLM targets return the same top-level job and results[] envelope. See LLMs and AI for the full metadata reference.
The following table shows Perplexity-specific results[].content fields:
prompt_query
Submitted prompt or search query.
string
model
Perplexity model used for the response (e.g., turbo).
string
answer_results
Generated answer as Markdown JSON tree.
array
answer_results_md
Generated answer in Markdown
string
additional_results
Grouped UI elements. sources_results – list of web sources Perplexity used (title and url). Can include images_results, hotels_results, places_results, videos_results, and shopping_results.
object
top_images
Perplexity image results on the "Images" tab. Objects include url and title.
array
top_sources
Perplexity top-ranked source results. Objects include url, title, and source.
array
inline_products
Shopping results triggered by product-related queries.
array
related_queries
Suggested follow-up questions by Perplexity.
array of strings
displayed_tabs
UI tabs visible on the parsed page (e.g., Answer, Links, Images).
array of strings
url
The URL of the Perplexity search page for this query.
string
parse_status_code
12000 – successful. Otherwise, parser failed to extract some or all structured fields.
integer
– conditional, returned only when content is in the LLM's response.
Additional results and inline products
Along with the main AI response, we return extra data under additional_results, such as
sources_resultsimages_resultsshopping_resultsvideos_resultsplaces_resultshotels_results
These arrays are extracted from the tabs on the original results page and are included only if relevant content is available:

The inline_products array also contains products that are directly embedded in the response:

Last updated
Was this helpful?

