API reference · Search engines
Google Trends
Google Trends API: up to five comma-separated terms as JSON. By default you get interest over time for your time range and region; set data_type to GEO_MAP for interest by region or RELATED_QUERIES for related queries.
Example
curl -X POST 'https://api.serpbase.dev/google/trends' \
-H "Content-Type: application/json" \
-H 'X-API-Key: YOUR_API_KEY' \
--max-time 60 \
-d '{"q":"coffee"}'{
"status": 0,
"credits_charged": 2,
"request_id": "r-4b27fe8a36d9ac303a5da7dd",
"product_id": "google_trends",
"query": "coffee",
"action": "trends",
"source": "google",
"trends": {
"query": "coffee",
"series": [
{
"points": [
{
"timestamp": "2025-10-26T00:00:00Z",
"value": 59
}
],
"term": "coffee"
}
],
"time_range": "today 12-m"
},
"url": "https://trends.google.com/trends/?hl=en"
}Parameters
formatMore
markdown returns the same result as Markdown text (text/markdown) for language models: no envelope, no duplicate alias fields, no inline images. Same credits; failures keep the JSON envelope.
qcatMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
countryMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
cursorMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
dateMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
deviceMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
geoMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
glMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
google_domainMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
gooogle_domainMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
gpropMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
hlMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
htmlMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
include_low_search_volumeMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
languageMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
limitMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
markdownMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
mobileMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
numMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
pageMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
regionMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
resultsMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
tzMore
Use one spelling at a time; the API validates the parameters and values supported by this product.
The sample shows example parameters, not the complete request contract. Known fields are validated by the API; additional parameters are allowed.
What comes back
The fields are those in the response above; every endpoint also carries status, credits_charged and request_id.
If it fails
A failed request has a non-zero status and an error, and is not charged. The ones you will see here:
1000A parameter is missing or wrongFix the request1020No credits leftTop up1029Over your requests per secondWait Retry-After seconds1502 · 1504The source could not be read this timeRetry