Documentazione API Hop
Riferimento Google Trends
Consulta interesse di ricerca, suggerimenti, tendenze e notizie correlate su Google Trends.
Limite di concorrenza
IA e Data condividono ciascuno un pool di richieste simultanee per account: 5 IA / 2 Data per impostazione predefinita, secondo l’abbonamento. Anche i limiti degli endpoint sono vincolati al pool di categoria. Al raggiungimento di un limite viene restituito HTTP 429. Le attività asincrone occupano un posto fino al termine dell’esecuzione.
GET /v1/google-trends/search GET /v1/google-trends/autocomplete GET /v1/google-trends/news GET /v1/google-trends/trending-now Consulta interesse di ricerca, suggerimenti, tendenze e notizie correlate su Google Trends.
Autenticazione e fatturazione
Il prezzo predefinito è $0.0003 (300 credits) per richiesta riuscita. Usa la chiave API API Hop. L’accesso dipende dai gateway attivi e dai permessi. Consulta catalogo e account per il prezzo per richiesta riuscita; prevalgono i prezzi dell’account. Anche i risultati vuoti riusciti sono fatturati. Gli errori liberano la prenotazione. Timeout: 60 secondi, senza tentativi o paginazione automatici. Gli errori di contabilizzazione non ripetono la richiesta al fornitore.
Authorization: Bearer YOUR_API_KEYSolo parametri di query, senza corpo. Valori sconosciuti, duplicati, vuoti o non validi sono rifiutati, salvo geo e gprop vuoti documentati. Solo JSON; nessuna paginazione o ripetizione automatica. AND = entrambi, OR = oppure, XOR = uno solo, NOT = escluso, => = richiede. Copiare ID e token notizie da risposte recenti; gli esempi non sono risultati di test reali. Ogni richiesta riuscita è addebitata separatamente.
Google Trends: Esplora interesse di ricerca
GET https://api.apihop.ai/v1/google-trends/search
Parametri
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
query | string | Testo di ricerca; query: REQUIRED | tesla |
country | string | Codice paese o negozio (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Lingua; language: optional | - |
category | string | Tipo grafico o risoluzione geografica (category); category: optional; interest_over_time, interest_by_region, related_queries, related_topics | interest_over_time |
time_range | string | Periodo relativo o intervallo date (time_range); time_range: optional | - |
device | string | Dispositivo; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Non archiviare le risposte; zero_trace: optional | true |
data_type | string | Tipo grafico o risoluzione geografica (data_type); data_type: optional; TIMESERIES, GEO_MAP, GEO_MAP_0, RELATED_TOPICS, RELATED_QUERIES | TIMESERIES |
geo | string | Codice località Trends (geo); geo: optional; UTF-8 bytes: 100 | - |
region | string | Tipo grafico o risoluzione geografica (region); region: optional; COUNTRY, REGION, DMA, CITY | COUNTRY |
cat | integer | ID categoria tematica (cat); cat: optional; 0, 3, 5, 7, 8, 11, 12, 13, 14, 16, ... 1133 | 0 |
gprop | string | Fonte di ricerca (gprop); gprop: optional; `, images, news, froogle, youtube` | |
date | string | Periodo relativo o intervallo date (date); date: optional; UTF-8 bytes: 256 | - |
csv | boolean | Dati CSV aggiuntivi (csv); csv: optional | true |
include_low_search_volume | boolean | Regioni con basso volume di ricerca (include_low_search_volume); include_low_search_volume: optional | true |
tz | integer | Offset fuso in minuti (convenzione browser) (tz); tz: optional; min: -1439; max: 1439 | -1439 |
Convalida
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/query: 1..5 nonempty comma-separated terms; NOT (category AND data_type); NOT (date AND time_range)category: interest_over_time = TIMESERIES, interest_by_region = GEO_MAP_0, related_queries = RELATED_QUERIES, related_topics = RELATED_TOPICS; default TIMESERIESregion OR include_low_search_volume => data_type = GEO_MAP OR GEO_MAP_0; GEO_MAP_0 requires exactly one termgeo: empty = worldwide; uppercase country or subdivision; overrides country; comma-separated locations require TIMESERIES and one location per termgprop: empty = web search; froogle = shopping; tz: browser offset minutes (420 = UTC-07:00)date, time_range: all, now 1-H, now 4-H, now 1-d, now 7-d, today 1-m, today 3-m, today 12-m, today 5-y, OR ordered YYYY-MM-DD YYYY-MM-DD within 2004-01-01..todaydate: multiple comma-separated custom ranges require TIMESERIES and one range per term; cat: topic ID (default 0)
Esempi
curl --get "https://api.apihop.ai/v1/google-trends/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=tesla"Google Trends: Consulta suggerimenti di argomenti
GET https://api.apihop.ai/v1/google-trends/autocomplete
Parametri
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
query | string | Testo di ricerca; query: REQUIRED | tesla |
language | string | Lingua; language: optional | - |
limit | integer | Limite risultati; limit: optional; min: 1; max: 100 | 1 |
device | string | Dispositivo; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Non archiviare le risposte; zero_trace: optional | true |
Convalida
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/
Esempi
curl --get "https://api.apihop.ai/v1/google-trends/autocomplete" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=tesla"Google Trends: Consulta notizie correlate
GET https://api.apihop.ai/v1/google-trends/news
Parametri
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
page_token | string | Token notizie da un risultato Trending Now recente (page_token); page_token: REQUIRED; UTF-8 bytes: 32768; ^gtn1\.[A-Za-z0-9_-]+$ | ${NEWS_PAGE_TOKEN} |
device | string | Dispositivo; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Non archiviare le risposte; zero_trace: optional | true |
Convalida
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/page_token: exact news_page_token from a fresh Trending Now response; account-bound opaque continuation, do not fabricate or reuse expired tokens
Esempi
curl --get "https://api.apihop.ai/v1/google-trends/news" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "page_token=${NEWS_PAGE_TOKEN}"Google Trends: Consulta ricerche di tendenza
GET https://api.apihop.ai/v1/google-trends/trending-now
Parametri
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
country | string | Codice paese o negozio (country); country: optional; ^[A-Za-z]{2}$ | us |
language | string | Lingua; language: optional | - |
limit | integer | Limite risultati; limit: optional; min: 1; max: 100 | 1 |
device | string | Dispositivo; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Non archiviare le risposte; zero_trace: optional | true |
geo | string | Codice località Trends (geo); geo: optional; `, AL, DZ, AO, AR, AR-C, AR-B, AR-K, AR-H, AR-U`, ... 1445 | |
hours | integer | Ore precedenti (hours); hours: optional; 4, 24, 48, 168 | 4 |
category_id | integer | ID categoria tematica (category_id); category_id: optional; 0, 1, 2, 3, 20, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19 | 0 |
only_active | boolean | Solo tendenze attive (only_active); only_active: optional | true |
Convalida
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedstring: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integerlanguage: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/geo: empty = US; overrides country; hours: default 24; category_id: 0 = all; only_active: active trends only
Esempi
curl --get "https://api.apihop.ai/v1/google-trends/trending-now" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "country=us"Risposte ed errori
JSON originale e precisione sono conservati. Esempio di risultato vuoto riuscito. HTTP 400: input; 401: autenticazione; 402: credito; 403: accesso; 405: metodo; 429: limite; 5xx: servizio. Conserva X-Request-Id.
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}