API Hop

Documentazione

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
Limite predefinito: 2
GET /v1/google-trends/autocomplete
Limite predefinito: 2
GET /v1/google-trends/news
Limite predefinito: 2
GET /v1/google-trends/trending-now
Limite predefinito: 2

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.

http
Authorization: Bearer YOUR_API_KEY

Solo 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.

GET https://api.apihop.ai/v1/google-trends/search

Parametri

CampoTipoLimitiEsempio
querystringTesto di ricerca; query: REQUIREDtesla
countrystringCodice paese o negozio (country); country: optional; ^[A-Za-z]{2}$-
languagestringLingua; language: optional-
categorystringTipo grafico o risoluzione geografica (category); category: optional; interest_over_time, interest_by_region, related_queries, related_topicsinterest_over_time
time_rangestringPeriodo relativo o intervallo date (time_range); time_range: optional-
devicestringDispositivo; device: optional; desktop, mobile, tabletdesktop
zero_tracebooleanNon archiviare le risposte; zero_trace: optionaltrue
data_typestringTipo grafico o risoluzione geografica (data_type); data_type: optional; TIMESERIES, GEO_MAP, GEO_MAP_0, RELATED_TOPICS, RELATED_QUERIESTIMESERIES
geostringCodice località Trends (geo); geo: optional; UTF-8 bytes: 100-
regionstringTipo grafico o risoluzione geografica (region); region: optional; COUNTRY, REGION, DMA, CITYCOUNTRY
catintegerID categoria tematica (cat); cat: optional; 0, 3, 5, 7, 8, 11, 12, 13, 14, 16, ... 11330
gpropstringFonte di ricerca (gprop); gprop: optional; `, images, news, froogle, youtube`
datestringPeriodo relativo o intervallo date (date); date: optional; UTF-8 bytes: 256-
csvbooleanDati CSV aggiuntivi (csv); csv: optionaltrue
include_low_search_volumebooleanRegioni con basso volume di ricerca (include_low_search_volume); include_low_search_volume: optionaltrue
tzintegerOffset 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 supported
  • string: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integer
  • language: /^[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 TIMESERIES
  • region OR include_low_search_volume => data_type = GEO_MAP OR GEO_MAP_0; GEO_MAP_0 requires exactly one term
  • geo: empty = worldwide; uppercase country or subdivision; overrides country; comma-separated locations require TIMESERIES and one location per term
  • gprop: 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..today
  • date: multiple comma-separated custom ranges require TIMESERIES and one range per term; cat: topic ID (default 0)

Esempi

bash
curl --get "https://api.apihop.ai/v1/google-trends/search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=tesla"

GET https://api.apihop.ai/v1/google-trends/autocomplete

Parametri

CampoTipoLimitiEsempio
querystringTesto di ricerca; query: REQUIREDtesla
languagestringLingua; language: optional-
limitintegerLimite risultati; limit: optional; min: 1; max: 1001
devicestringDispositivo; device: optional; desktop, mobile, tabletdesktop
zero_tracebooleanNon archiviare le risposte; zero_trace: optionaltrue

Convalida

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • string: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integer
  • language: /^[A-Za-z]{2,3}(?:[-_][A-Za-z]{2,4})?$/

Esempi

bash
curl --get "https://api.apihop.ai/v1/google-trends/autocomplete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=tesla"

GET https://api.apihop.ai/v1/google-trends/news

Parametri

CampoTipoLimitiEsempio
page_tokenstringToken notizie da un risultato Trending Now recente (page_token); page_token: REQUIRED; UTF-8 bytes: 32768; ^gtn1\.[A-Za-z0-9_-]+$${NEWS_PAGE_TOKEN}
devicestringDispositivo; device: optional; desktop, mobile, tabletdesktop
zero_tracebooleanNon archiviare le risposte; zero_trace: optionaltrue

Convalida

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • string: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integer
  • language: /^[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

bash
curl --get "https://api.apihop.ai/v1/google-trends/news" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "page_token=${NEWS_PAGE_TOKEN}"

GET https://api.apihop.ai/v1/google-trends/trending-now

Parametri

CampoTipoLimitiEsempio
countrystringCodice paese o negozio (country); country: optional; ^[A-Za-z]{2}$us
languagestringLingua; language: optional-
limitintegerLimite risultati; limit: optional; min: 1; max: 1001
devicestringDispositivo; device: optional; desktop, mobile, tabletdesktop
zero_tracebooleanNon archiviare le risposte; zero_trace: optionaltrue
geostringCodice località Trends (geo); geo: optional; `, AL, DZ, AO, AR, AR-C, AR-B, AR-K, AR-H, AR-U`, ... 1445
hoursintegerOre precedenti (hours); hours: optional; 4, 24, 48, 1684
category_idintegerID 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, 190
only_activebooleanSolo tendenze attive (only_active); only_active: optionaltrue

Convalida

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • string: UTF-8 bytes <= maxLength (default 8192); boolean = true OR false; integer: safe integer
  • language: /^[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

bash
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.

json
{
  "success": true,
  "request_id": "example-request",
  "data": {
    "format": "json",
    "content": {
      "results": []
    }
  }
}