Appearance
Perplexity LLM Responses 1 Endpoint
Query Perplexity AI through DataForSEO's AI Optimization API. Perplexity is a live-search AI engine that cites sources — making it critical to audit for brand citation and competitor presence.
Endpoints
| Call Name | Method | Endpoint |
|---|---|---|
| Perplexity Live | POST | /v3/ai_optimization/perplexity/live |
Perplexity currently has only one endpoint in DataForSEO — a Live method that returns results immediately without a separate task retrieval step.
Why Perplexity Matters
Perplexity is a source-citing AI search engine. Unlike ChatGPT or Claude, Perplexity always shows the URLs it used to generate its response. This means:
- You can directly see which competitor URLs are being cited for your target queries
- Brands with strong E-E-A-T signals and structured data tend to rank in Perplexity citations
- Perplexity is growing fast among research-oriented and B2B audiences
Request Example
python
import os
import requests
from requests.auth import HTTPBasicAuth
auth = HTTPBasicAuth(os.environ["DATAFORSEO_LOGIN"], os.environ["DATAFORSEO_PASSWORD"])
BASE = "https://api.dataforseo.com"
r = requests.post(
f"{BASE}/v3/ai_optimization/perplexity/live",
auth=auth,
headers={"Content-Type": "application/json"},
json=[{
"keyword": "best roofing contractor in Dallas Texas",
"location_code": 2840,
"language_code": "en"
}]
)
data = r.json()["tasks"][0]["result"][0]
print("Response:", data.get("response_text", ""))
print("Citations:", data.get("urls_mentioned", []))Response Fields
| Field | Type | Description |
|---|---|---|
keyword | string | Query submitted |
response_text | string | Perplexity's full response text |
brands_mentioned | array | Brands detected in the response |
urls_mentioned | array | Source URLs cited by Perplexity |
se_type | string | Always "perplexity" |
Audit Pattern — Citation Check
python
def check_brand_in_perplexity(keyword, brand_domain):
r = requests.post(
f"{BASE}/v3/ai_optimization/perplexity/live",
auth=auth,
headers={"Content-Type": "application/json"},
json=[{"keyword": keyword, "location_code": 2840, "language_code": "en"}]
)
result = r.json()["tasks"][0]["result"][0]
response = result.get("response_text", "").lower()
urls = result.get("urls_mentioned", [])
brand_mentioned = brand_domain.lower() in response
brand_cited = any(brand_domain.lower() in url.lower() for url in urls)
return {
"keyword": keyword,
"brand_mentioned_in_text": brand_mentioned,
"brand_url_cited": brand_cited,
"citation_urls": urls
}
# Usage
result = check_brand_in_perplexity("best roofing contractor Dallas", "acmeroofing.com")
print(result)Pricing
~$0.01 per Live request. Results are instant — no polling required.
Notes
- Only one endpoint exists for Perplexity in the DataForSEO API (Live only, no Standard/async)
- Always extract
urls_mentioned— this is the most actionable data point for link-building and citation strategy - Run the same query across ChatGPT, Claude, Gemini, and Perplexity to get a full cross-platform AI visibility score