Response Models
Data models returned by the library when querying Perplexity.
Response
perplexity_webui_scraper.core.response.Response
Bases: BaseModel
A single streaming response frame from Perplexity AI.
Yielded by iterating over a :class:~perplexity_webui_scraper.Conversation
in streaming mode. The answer field is None on intermediate chunks
and populated only on the final frame.
| ATTRIBUTE | DESCRIPTION |
|---|---|
answer |
Full, final response text.
TYPE:
|
chunks |
All partial response chunks received so far during streaming.
TYPE:
|
last_chunk |
The most recently received chunk (shortcut to
TYPE:
|
search_results |
Web sources cited in the response.
TYPE:
|
conversation_uuid |
Backend UUID identifying this conversation thread.
Use this value to continue the conversation via
TYPE:
|
raw_data |
Raw deserialized JSON payload from the last SSE frame. Useful for accessing fields not surfaced by the library.
TYPE:
|
SearchResultItem
perplexity_webui_scraper.core.response.SearchResultItem
Bases: BaseModel
A single web source cited in a Perplexity response.
| ATTRIBUTE | DESCRIPTION |
|---|---|
url |
Full URL of the source page.
TYPE:
|
title |
Page or article title.
TYPE:
|
snippet |
Short excerpt from the source page.
TYPE:
|
Coordinates
perplexity_webui_scraper._internal.types.Coordinates
Bases: BaseModel
Geographic coordinates for location-aware Perplexity search results.
| ATTRIBUTE | DESCRIPTION |
|---|---|
latitude |
Latitude in decimal degrees (-90 to +90).
TYPE:
|
longitude |
Longitude in decimal degrees (-180 to +180).
TYPE:
|