Get Google Trends interest over time
Returns Google Trends interest-over-time for up to 5 keywords in one call. Response is { series, averages }: series is one entry per keyword, each with dated points ({ date, datetime, value, partial }) where value is Google's 0-100 relative-popularity score; averages is the per-keyword mean over the window. partial is true on a bucket Google is still accumulating, which is normally the last point: treat it as an incomplete count rather than a fall in interest, and drop it before charting a trend. Compare terms head-to-head (values are normalised across the keyword set) and scope by location, timeframe, and category. A keyword set with no measurable search interest returns 404 and costs 0 credits, so a dead term is never billed. A billed refresh is typically 5-9s and the slow tail reaches about 30s, so set a client timeout of at least 60s: this surface reads Google Trends live and Google itself is the slow part. Exact repeats may use the 2-minute search cache and return in milliseconds at 0 credits.
Request
- Base URL: https://www.socialcrawl.dev/v1
- URL: https://www.socialcrawl.dev/v1/google_trends/explore
- Auth: API key in header x-api-key
Query parameters
1-5 comma-separated keywords (e.g. 'reverse audio,voice changer'). With multiple keywords the 0-100 values are normalised across the set for direct comparison. Each keyword must be 2 to 100 characters. More than 5 keywords, a 1-character keyword, or a keyword made only of punctuation is rejected with a free 400 before the request is billed.
Location as an ISO country code ('US', 'KR'), a full country name as Google Trends spells it ('United States', 'South Korea'), or a numeric location code ('2840'). Common spellings and ISO codes are normalised, so 'KR', 'Korea' and 'South Korea' all reach the same place. Google Trends does not publish every country, and a location it has no data for is rejected with a free 400 naming the accepted forms; a 404 means the keyword had no data there, not that the location is unsupported. Defaults to worldwide-leaning US.
Preset time window: past_hour, past_4_hours, past_day, past_7_days, past_30_days, past_90_days, past_12_months, or past_5_years. Defaults to past_12_months.
Numeric Google Trends category code to scope the query (default 0 = all categories). A non-numeric value is rejected with a free 400 rather than silently returning an all-categories series.
Headers
Send no-cache to bypass the response cache and force a live fetch. Billed at the normal endpoint cost; the fresh result is written back to cache for the next caller. Only the no-cache directive triggers this. See the Response Schema guide for details.
Optional UUID that makes the request safely retriable. The key is reserved atomically per account before billing. A concurrent retry receives 409 IDEMPOTENCY_IN_PROGRESS with a Retry-After of 1 second while the original is young, growing to a quarter of the time it has been running (at most 30); a crashed reservation expires after 5 minutes. A replay keeps the cached payload immutable except for billing metadata: credits_used becomes 0, idempotent_replay becomes true, and credits_remaining is refreshed to the current balance. A known current balance appears in both the body and X-Credits-Remaining header; no balance row resolves to 0. On a transient lookup failure, body credits_remaining is null and X-Credits-Remaining is omitted. Completed outcomes expire after 24 hours. If the claim store is unavailable, the request fails closed before billing. GET endpoints do not combine idempotent replay with Server-Sent Events: use Accept: application/json when sending this header. The unsupported key-plus-SSE combination is rejected before billing.
Response
Successful response
Example response
{
"success": true,
"platform": "google_trends",
"endpoint": "/v1/google_trends/explore",
"credits_used": 1,
"credits_remaining": 4999,
"request_id": "req-abc123",
"idempotent_replay": true,
"meta": {
"hint": {
"code": "search_multi",
"message": "You searched \"matcha\" on 3 platforms one call at a time; /v1/search/multi returns each platform's own search rows in one call at the same price per platform, and a platform with no rows is not charged.",
"method": "GET",
"path": "/v1/search/multi?query=matcha&platforms=instagram,tiktok,youtube"
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.