Documentação do API Hop
Referência do Google Trends
Consulte interesse de pesquisa, sugestões, tendências e notícias relacionadas no Google Trends.
Limite de simultaneidade
IA e Data compartilham, cada um, um conjunto de solicitações simultâneas por conta: 5 IA / 2 Data por padrão, conforme a assinatura. Os limites específicos de endpoints também respeitam o limite da categoria. Atingir qualquer limite retorna HTTP 429. Tarefas assíncronas ocupam uma vaga até o fim da execução.
GET /v1/google-trends/search GET /v1/google-trends/autocomplete GET /v1/google-trends/news GET /v1/google-trends/trending-now Consulte interesse de pesquisa, sugestões, tendências e notícias relacionadas no Google Trends.
Autenticação e cobrança
O preço padrão é $0.0003 (300 credits) por requisição bem-sucedida. Use sua chave API API Hop. O acesso depende dos gateways ativos e das permissões. Veja catálogo e conta para o preço por requisição bem-sucedida; o preço da conta prevalece. Resultados vazios bem-sucedidos são cobrados. Falhas liberam a reserva. Limite: 60 segundos, sem repetição ou paginação automática. Falhas de liquidação não repetem a requisição ao fornecedor.
Authorization: Bearer YOUR_API_KEYSomente parâmetros de consulta, sem corpo. Valores desconhecidos, repetidos, vazios ou inválidos são rejeitados, exceto geo e gprop vazios documentados. Somente JSON; sem paginação ou repetição automática. AND = ambos, OR = ou, XOR = apenas um, NOT = excluído, => = exige. Copie IDs e tokens de notícias de respostas recentes; exemplos não são resultados de testes reais. Cada consulta bem-sucedida é cobrada separadamente.
Google Trends: Explorar interesse de pesquisa
GET https://api.apihop.ai/v1/google-trends/search
Parâmetros
| Campo | Tipo | Limites | Exemplo |
|---|---|---|---|
query | string | Texto de busca; query: REQUIRED | tesla |
country | string | Código de país ou loja (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | Idioma; language: optional | - |
category | string | Tipo de gráfico ou resolução geográfica (category); category: optional; interest_over_time, interest_by_region, related_queries, related_topics | interest_over_time |
time_range | string | Período relativo ou intervalo de datas (time_range); time_range: optional | - |
device | string | Dispositivo; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Não arquivar respostas; zero_trace: optional | true |
data_type | string | Tipo de gráfico ou resolução geográfica (data_type); data_type: optional; TIMESERIES, GEO_MAP, GEO_MAP_0, RELATED_TOPICS, RELATED_QUERIES | TIMESERIES |
geo | string | Código de local do Trends (geo); geo: optional; UTF-8 bytes: 100 | - |
region | string | Tipo de gráfico ou resolução geográfica (region); region: optional; COUNTRY, REGION, DMA, CITY | COUNTRY |
cat | integer | ID da categoria temática (cat); cat: optional; 0, 3, 5, 7, 8, 11, 12, 13, 14, 16, ... 1133 | 0 |
gprop | string | Fonte de pesquisa (gprop); gprop: optional; `, images, news, froogle, youtube` | |
date | string | Período relativo ou intervalo de datas (date); date: optional; UTF-8 bytes: 256 | - |
csv | boolean | Dados CSV adicionais (csv); csv: optional | true |
include_low_search_volume | boolean | Regiões com baixo volume de pesquisa (include_low_search_volume); include_low_search_volume: optional | true |
tz | integer | Deslocamento de fuso em minutos (convenção do navegador) (tz); tz: optional; min: -1439; max: 1439 | -1439 |
Validação
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)
Exemplos
curl --get "https://api.apihop.ai/v1/google-trends/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=tesla"Google Trends: Consultar sugestões de temas
GET https://api.apihop.ai/v1/google-trends/autocomplete
Parâmetros
| Campo | Tipo | Limites | Exemplo |
|---|---|---|---|
query | string | Texto de busca; query: REQUIRED | tesla |
language | string | Idioma; language: optional | - |
limit | integer | Limite de resultados; limit: optional; min: 1; max: 100 | 1 |
device | string | Dispositivo; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Não arquivar respostas; zero_trace: optional | true |
Validação
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})?$/
Exemplos
curl --get "https://api.apihop.ai/v1/google-trends/autocomplete" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=tesla"Google Trends: Consultar notícias relacionadas
GET https://api.apihop.ai/v1/google-trends/news
Parâmetros
| Campo | Tipo | Limites | Exemplo |
|---|---|---|---|
page_token | string | Token de notícias de um resultado recente do Trending Now (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 | Não arquivar respostas; zero_trace: optional | true |
Validação
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
Exemplos
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: Consultar pesquisas em alta
GET https://api.apihop.ai/v1/google-trends/trending-now
Parâmetros
| Campo | Tipo | Limites | Exemplo |
|---|---|---|---|
country | string | Código de país ou loja (country); country: optional; ^[A-Za-z]{2}$ | us |
language | string | Idioma; language: optional | - |
limit | integer | Limite de resultados; limit: optional; min: 1; max: 100 | 1 |
device | string | Dispositivo; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | Não arquivar respostas; zero_trace: optional | true |
geo | string | Código de local do Trends (geo); geo: optional; `, AL, DZ, AO, AR, AR-C, AR-B, AR-K, AR-H, AR-U`, ... 1445 | |
hours | integer | Horas anteriores (hours); hours: optional; 4, 24, 48, 168 | 4 |
category_id | integer | ID da categoria temática (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 | Somente tendências ativas (only_active); only_active: optional | true |
Validação
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
Exemplos
curl --get "https://api.apihop.ai/v1/google-trends/trending-now" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "country=us"Respostas e erros
JSON nativo e precisão são preservados. Exemplo de resultado vazio bem-sucedido. HTTP 400: entrada; 401: autenticação; 402: saldo; 403: acesso; 405: método; 429: limite; 5xx: serviço. Guarde X-Request-Id.
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}