Skip to content

Discover trends

Discovers compact industry/content trends for one URL.

Use this before scoring when you want to inspect the trends or reuse the same trends in a separate score call.

POST /v1/content-intelligence/trends/discover
HeaderRequiredValue
AuthorizationYesBearer sw_api_live_...
Content-TypeYesapplication/json

Required scope:

content_intelligence:trends:discover
FieldTypeRequiredDescription
urlstringYesPage URL to analyze.
extraction_modestringNoOptional extraction profile. Omit unless instructed otherwise.
languagestringNoLanguage code. Defaults to en.
countrystringNoCountry/market code. Defaults to US.

See Enums for language and country code formats.

Terminal window
curl -s https://api.sleepwalker.ai/v1/content-intelligence/trends/discover \
-H "Authorization: Bearer sw_api_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.sleepwalker.ai",
"language": "en",
"country": "US"
}'

The same request in Python and JavaScript:

Python
import requests
resp = requests.post(
"https://api.sleepwalker.ai/v1/content-intelligence/trends/discover",
headers={"Authorization": "Bearer sw_api_live_..."},
json={
"url": "https://www.sleepwalker.ai",
"language": "en",
"country": "US",
},
)
resp.raise_for_status()
print(resp.json())
JavaScript
const resp = await fetch("https://api.sleepwalker.ai/v1/content-intelligence/trends/discover", {
method: "POST",
headers: {
Authorization: "Bearer sw_api_live_...",
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://www.sleepwalker.ai",
language: "en",
country: "US",
}),
});
const data = await resp.json();
console.log(data);
{
"trend_discovery": {
"url": "https://www.sleepwalker.ai",
"http_status": 200,
"language": "en",
"country": "US",
"industry": "AI visibility software",
"trends": [
{
"topic": "AI visibility monitoring",
"description": "Brands track how AI search engines mention and cite them.",
"relevance": "high",
"opportunity": "Show platform-specific citation gaps."
}
],
"trend_count": 1,
"citations": [],
"citation_count": 0,
"analysis_date": "2026-06-10",
"billing": {
"billable": true,
"estimated_credits": "1.00"
},
"payload_limits": {
"max_trends": 5,
"max_citations": 10
}
}
}
  • Trend discovery returns up to 5 trends.
  • Citations are compact and capped.
  • The output can be passed directly to Score Content.

A successful billable trend discovery response costs 1 credit.

If the page is blocked, unavailable, or does not contain enough content, the response includes billing.billable: false.

StatusMeaning
400Invalid URL or request body.
401Missing or invalid API key.
402Insufficient credits for a billable request.
403API key is missing content_intelligence:trends:discover.
503Page extraction is temporarily unavailable.