Documentazione API Hop
Riferimento Google Maps
Cerca attività e luoghi su Google Maps o consulta un luogo tramite ID. Recensioni dei luoghi · Foto dei luoghi · Metadati delle foto · Post delle attività · Indicazioni stradali · Suggerimenti sui luoghi · Recensioni dei contributori · Ricerca locale · Servizi locali · Eventi.
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-maps/search GET /v1/google-maps/reviews GET /v1/google-maps/photos GET /v1/google-maps/photos/meta GET /v1/google-maps/posts GET /v1/google-maps/directions GET /v1/google-maps/autocomplete GET /v1/google-maps/contributor/reviews GET /v1/google-maps/local GET /v1/google-maps/local/services GET /v1/google-maps/events Cerca attività e luoghi su Google Maps o consulta un luogo tramite ID. Recensioni dei luoghi · Foto dei luoghi · Metadati delle foto · Post delle attività · Indicazioni stradali · Suggerimenti sui luoghi · Recensioni dei contributori · Ricerca locale · Servizi locali · Eventi.
- Cerca luoghi su Google Maps:
GET https://api.apihop.ai/v1/google-maps/search - Recensioni dei luoghi:
GET https://api.apihop.ai/v1/google-maps/reviews - Foto dei luoghi:
GET https://api.apihop.ai/v1/google-maps/photos - Metadati delle foto:
GET https://api.apihop.ai/v1/google-maps/photos/meta - Post delle attività:
GET https://api.apihop.ai/v1/google-maps/posts - Indicazioni stradali:
GET https://api.apihop.ai/v1/google-maps/directions - Suggerimenti sui luoghi:
GET https://api.apihop.ai/v1/google-maps/autocomplete - Recensioni dei contributori:
GET https://api.apihop.ai/v1/google-maps/contributor/reviews - Ricerca locale:
GET https://api.apihop.ai/v1/google-maps/local - Servizi locali:
GET https://api.apihop.ai/v1/google-maps/local/services - Eventi:
GET https://api.apihop.ai/v1/google-maps/events
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_KEYParametri
Cerca luoghi su Google Maps
GET https://api.apihop.ai/v1/google-maps/search
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
query | string | Ricerca | coffee shop |
type | string | Modalità; search, place | - |
place_id | string | ID luogo | ChIJP8p2kJC1RIYR2qrGoXZtZCk |
data_cid | string | CID decimale | 2982629209513831130 |
latitude | number | Latitudine; min: -90; max: 90 | 30.2672 |
longitude | number | Longitudine; min: -180; max: 180 | -97.7431 |
location | string | Origine | Austin, TX |
zoom | number | Zoom; min: 3; max: 30 | 13.1 |
m | number | Altezza in metri; min: 1; max: 15028132 | - |
start | integer | Offset; min: 0; max: 9007199254740991 | 0 |
gl | string | Paese | us |
hl | string | Lingua | en-US |
nearby | boolean | Vicinanza | - |
zero_trace | boolean | Disattiva archiviazione | - |
min_price | integer | Prezzo minimo; min: 0; max: 9007199254740991 | - |
max_price | integer | Prezzo massimo; min: 0; max: 9007199254740991 | - |
min_rating | number | Valutazione minima preferita; 2, 2.5, 3, 3.5, 4, 4.5 | - |
open_state | string | Apertura; now, 24h | - |
open_on_day | string | Giorno locale; mon, tue, wed, thu, fri, sat, sun | - |
open_at_hour | integer | Ora locale; min: 0; max: 23 | - |
Recensioni dei luoghi
GET https://api.apihop.ai/v1/google-maps/reviews
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
country | string | Codice paese di due lettere.; ^[A-Za-z]{2}$ | us |
language | string | Codice lingua supportato dal fornitore. | en |
device | string | Visualizzazione della fonte per dispositivo.; desktop, mobile, tablet | - |
zero_trace | boolean | Non archiviare i file di risposta del fornitore a monte; i metadati di fatturazione vengono conservati. | - |
no_cache | boolean | Flag di compatibilità; entrambi i valori recuperano dati aggiornati e applicano la fatturazione normale. | - |
id | string | ID luogo Google o ID dati esadecimale; i CID decimali e gli ID dei contributori non sono supportati.; obbligatorio | - |
next_page_token | string | Token di continuazione opaco; scade dopo un’ora. Non modificare account, parametri, dispositivo e limit.; maxLength: 24576 | - |
limit | integer | Numero massimo di elementi restituiti; la fonte può restituirne meno.; ≥ 1; ≤ 20 | - |
sort_by | string | Ordine delle recensioni.; relevance, newest, rating_high, rating_low, qualityScore, newestFirst, ratingHigh, ratingLow | - |
query | string | Filtro sul testo delle recensioni; non utilizzabile insieme a topic_id.; maxLength: 500 | - |
topic_id | string | ID argomento della fonte; non utilizzabile insieme a query.; maxLength: 131; ^(?:[A-Za-z0-9_-]{1,128}|/[mg]/[A-Za-z0-9_-]{1,128})$ | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiseid: Google place_id OR hexadecimal data_id; NOT decimal CID, contributor IDquery XOR topic_id (optional)next_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic paginationno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/reviews" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=ChIJM8w7rqS1RIYRhEz2-KuoqzE" \
--data-urlencode "limit=10"Foto dei luoghi
GET https://api.apihop.ai/v1/google-maps/photos
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
country | string | Codice paese di due lettere.; ^[A-Za-z]{2}$ | us |
language | string | Codice lingua supportato dal fornitore. | en |
device | string | Visualizzazione della fonte per dispositivo.; desktop, mobile, tablet | - |
zero_trace | boolean | Non archiviare i file di risposta del fornitore a monte; i metadati di fatturazione vengono conservati. | - |
no_cache | boolean | Flag di compatibilità; entrambi i valori recuperano dati aggiornati e applicano la fatturazione normale. | - |
id | string | Identificatore della fonte restituito dal corrispondente risultato di Google Maps.; obbligatorio | - |
next_page_token | string | Token di continuazione opaco; scade dopo un’ora. Non modificare account, parametri, dispositivo e limit.; maxLength: 24576 | - |
limit | integer | Numero massimo di elementi restituiti; la fonte può restituirne meno.; ≥ 1; ≤ 100 | - |
category_id | string | ID della categoria della galleria restituito per questo luogo.; maxLength: 1024; ^[A-Za-z0-9_-]+={0,2}$ | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiseid: Google Maps place identifier; category_id: copy from this place gallerynext_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic paginationno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/photos" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=0x8644b5a4ae3bcc33:0x31aba8abf8f64c84" \
--data-urlencode "limit=10"Metadati delle foto
GET https://api.apihop.ai/v1/google-maps/photos/meta
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
country | string | Codice paese di due lettere.; ^[A-Za-z]{2}$ | us |
language | string | Codice lingua supportato dal fornitore. | en |
zero_trace | boolean | Non archiviare i file di risposta del fornitore a monte; i metadati di fatturazione vengono conservati. | - |
no_cache | boolean | Flag di compatibilità; entrambi i valori recuperano dati aggiornati e applicano la fatturazione normale. | - |
id | string | ID foto copiato da photos results[].id; non usare il data_id del luogo.; obbligatorio; maxLength: 255; ^[A-Za-z0-9_-]{20,255}$ | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiseid: copy photo ID from GET https://api.apihop.ai/v1/google-maps/photos results; NOT place data_idno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/photos/meta" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=AF1QipPFfVtTCFKV9n-uOBqTTOHuRemFBg0PWN7xdVxp"Post delle attività
GET https://api.apihop.ai/v1/google-maps/posts
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
country | string | Codice paese di due lettere.; ^[A-Za-z]{2}$ | us |
language | string | Codice lingua supportato dal fornitore. | en |
device | string | Visualizzazione della fonte per dispositivo.; desktop, mobile, tablet | - |
zero_trace | boolean | Non archiviare i file di risposta del fornitore a monte; i metadati di fatturazione vengono conservati. | - |
no_cache | boolean | Flag di compatibilità; entrambi i valori recuperano dati aggiornati e applicano la fatturazione normale. | - |
id | string | Identificatore della fonte restituito dal corrispondente risultato di Google Maps.; obbligatorio | - |
next_page_token | string | Token di continuazione opaco; scade dopo un’ora. Non modificare account, parametri, dispositivo e limit.; maxLength: 24576 | - |
limit | integer | Numero massimo di elementi restituiti; la fonte può restituirne meno.; ≥ 1; ≤ 100 | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiseid: Google Maps place identifiernext_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic paginationno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=0x8644b5a4ae3bcc33:0x31aba8abf8f64c84" \
--data-urlencode "limit=10"Indicazioni stradali
GET https://api.apihop.ai/v1/google-maps/directions
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
country | string | Codice paese di due lettere.; ^[A-Za-z]{2}$ | us |
language | string | Codice lingua supportato dal fornitore. | en |
device | string | Visualizzazione della fonte per dispositivo.; desktop, mobile, tablet | - |
zero_trace | boolean | Non archiviare i file di risposta del fornitore a monte; i metadati di fatturazione vengono conservati. | - |
no_cache | boolean | Flag di compatibilità; entrambi i valori recuperano dati aggiornati e applicano la fatturazione normale. | - |
origin | string | Indirizzo di partenza; usare esattamente uno tra origin, start_data_id, start_coords. | - |
destination | string | Indirizzo di destinazione; usare esattamente uno tra destination, end_data_id, end_coords. | - |
start_data_id | string | ID dati Maps esadecimale del punto di partenza.; maxLength: 37; ^0x[0-9a-fA-F]{1,16}:0x[0-9a-fA-F]{1,16}$ | - |
end_data_id | string | ID dati Maps esadecimale della destinazione.; maxLength: 37; ^0x[0-9a-fA-F]{1,16}:0x[0-9a-fA-F]{1,16}$ | - |
start_coords | string | Coordinate di partenza nel formato latitude,longitude.; maxLength: 80 | - |
end_coords | string | Coordinate di destinazione nel formato latitude,longitude.; maxLength: 80 | - |
travel_mode | string | Mezzo di trasporto.; driving, walking, bicycling, transit, two-wheeler, best, flight | - |
distance_unit | integer | Chilometri (0) o miglia (1).; ≥ 0; ≤ 1 | - |
avoid | string | Tipi di strade da evitare, separati da virgole. | - |
prefer | string | Mezzi di trasporto pubblico separati da virgole; richiede travel_mode=transit. | - |
route | integer | Itinerario con trasporto pubblico: meno cambi (2), meno tratti a piedi (3), accessibile in sedia a rotelle (4).; ≥ 2; ≤ 4 | - |
time | string | depart_at:timestamp, arrive_by:timestamp oppure last_available solo per il trasporto pubblico.; maxLength: 40 | - |
limit | integer | Numero massimo di elementi restituiti; la fonte può restituirne meno.; ≥ 1; ≤ 100 | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiseorigin XOR start_data_id XOR start_coords (required)destination XOR end_data_id XOR end_coords (required)start_coords, end_coords: latitude,longitude; latitude: -90..90; longitude: -180..180prefer, route => travel_mode=transit; time=last_available => travel_mode=transittime: depart_at:Unix_seconds OR arrive_by:Unix_seconds OR last_availabledistance_unit: 0=km, 1=mi; route: 2=fewer transfers, 3=less walking, 4=wheelchair accessibleno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/directions" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "origin=Austin, TX" \
--data-urlencode "destination=Dallas, TX" \
--data-urlencode "travel_mode=driving"Suggerimenti sui luoghi
GET https://api.apihop.ai/v1/google-maps/autocomplete
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
country | string | Codice paese di due lettere.; ^[A-Za-z]{2}$ | us |
language | string | Codice lingua supportato dal fornitore. | en |
device | string | Visualizzazione della fonte per dispositivo.; desktop, mobile, tablet | - |
zero_trace | boolean | Non archiviare i file di risposta del fornitore a monte; i metadati di fatturazione vengono conservati. | - |
no_cache | boolean | Flag di compatibilità; entrambi i valori recuperano dati aggiornati e applicano la fatturazione normale. | - |
query | string | Query di ricerca, massimo 8192 byte UTF-8.; obbligatorio | - |
latitude | number | Latitudine; richiede longitude.; ≥ -90; ≤ 90 | - |
longitude | number | Longitudine; richiede latitude.; ≥ -180; ≤ 180 | - |
limit | integer | Numero massimo di elementi restituiti; la fonte può restituirne meno.; ≥ 1; ≤ 100 | - |
ll | string | Area visibile della mappa: @latitude,longitude,zoomz (3-21) oppure @latitude,longitude,heightm.; maxLength: 120 | - |
cp | integer | Posizione del cursore in query, in unità di codice UTF-16.; ≥ 0 | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiselatitude AND longitude (optional)cp <= query.length (UTF-16)ll: @latitude,longitude,zoomz (3..21) OR @latitude,longitude,heightm (>0)no_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/autocomplete" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee in Austin" \
--data-urlencode "limit=5"Recensioni dei contributori
GET https://api.apihop.ai/v1/google-maps/contributor/reviews
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
country | string | Codice paese di due lettere.; ^[A-Za-z]{2}$ | us |
language | string | Codice lingua supportato dal fornitore. | en |
device | string | Visualizzazione della fonte per dispositivo.; desktop, mobile, tablet | - |
zero_trace | boolean | Non archiviare i file di risposta del fornitore a monte; i metadati di fatturazione vengono conservati. | - |
no_cache | boolean | Flag di compatibilità; entrambi i valori recuperano dati aggiornati e applicano la fatturazione normale. | - |
id | string | ID numerico del contributore dall’URL del suo profilo Google Maps.; obbligatorio; ^[0-9]+$ | - |
next_page_token | string | Token di continuazione opaco; scade dopo un’ora. Non modificare account, parametri, dispositivo e limit.; maxLength: 24576 | - |
page | integer | Pagina tra le prime 200 recensioni; le pagine successive alla 1 non sono utilizzabili con un token.; ≥ 1; ≤ 200 | - |
limit | integer | Numero massimo di elementi restituiti; la fonte può restituirne meno.; ≥ 1; ≤ 50 | - |
sort_by | string | Solo le recensioni più recenti.; newest | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiseid: numeric Google Maps contributor profile ID(page - 1) * limit < 200; page default: 1; limit default: 20page > 1 => NOT next_page_tokennext_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic paginationno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/contributor/reviews" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=112967280418127956987" \
--data-urlencode "limit=20"Ricerca locale
GET https://api.apihop.ai/v1/google-maps/local
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
country | string | Codice paese di due lettere.; ^[A-Za-z]{2}$ | us |
language | string | Codice lingua supportato dal fornitore. | en |
device | string | Visualizzazione della fonte per dispositivo.; desktop, mobile, tablet | - |
zero_trace | boolean | Non archiviare i file di risposta del fornitore a monte; i metadati di fatturazione vengono conservati. | - |
no_cache | boolean | Flag di compatibilità; entrambi i valori recuperano dati aggiornati e applicano la fatturazione normale. | - |
query | string | Query di ricerca, massimo 8192 byte UTF-8.; obbligatorio | - |
location | string | Località indicata per nome; non utilizzabile con coordinate o uule. | - |
latitude | number | Latitudine; richiede longitude.; ≥ -90; ≤ 90 | - |
longitude | number | Longitudine; richiede latitude.; ≥ -180; ≤ 180 | - |
uule | string | Località Google codificata; non utilizzabile con location o coordinate.; maxLength: 4096 | - |
google_domain | string | Dominio nazionale di Google, ad esempio google.com o google.co.uk. | - |
start | integer | Offset dei risultati, a partire da zero.; ≥ 0; ≤ 1000 | - |
tbs | string | Filtri nativi di Google nel formato key:value, separati da virgole.; maxLength: 512 | - |
ludocid | string | Identificatore cliente (CID) del luogo Google.; ^[0-9]{1,20}$ | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise(latitude AND longitude) XOR location XOR uule (optional)tbs: comma-separated key:value filters; ludocid: Google place CIDno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/local" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee shop" \
--data-urlencode "location=Austin, TX"Servizi locali
GET https://api.apihop.ai/v1/google-maps/local/services
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
country | string | Codice paese di due lettere.; ^[A-Za-z]{2}$ | us |
language | string | Codice lingua supportato dal fornitore. | en |
device | string | Visualizzazione della fonte per dispositivo.; desktop, mobile, tablet | - |
zero_trace | boolean | Non archiviare i file di risposta del fornitore a monte; i metadati di fatturazione vengono conservati. | - |
no_cache | boolean | Flag di compatibilità; entrambi i valori recuperano dati aggiornati e applicano la fatturazione normale. | - |
query | string | Query di ricerca, massimo 8192 byte UTF-8.; obbligatorio | - |
location | string | Località indicata per nome; non utilizzabile con coordinate o uule. | - |
limit | integer | Numero massimo di elementi restituiti; la fonte può restituirne meno.; ≥ 1; ≤ 20 | - |
data_cid | string | CID geografico a 64 bit senza segno e diverso da zero; non utilizzabile con location. | - |
job_type | string | Selezione nativa del servizio, ad esempio restore_power.; maxLength: 100; ^[a-z][a-z0-9_]{0,99}$ | - |
cid | string | Identificatore del fornitore; fornire cid, bid e pid insieme.; ^[0-9]{1,20}$ | - |
bid | string | Identificatore del fornitore; fornire cid, bid e pid insieme.; ^[0-9]{1,20}$ | - |
pid | string | Identificatore del fornitore; fornire cid, bid e pid insieme.; ^[0-9]{1,20}$ | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwisedata_cid: geographic city/district CID, string 1..18446744073709551615; NOT locationcid AND bid AND pid (optional group); query selects the service categoryno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/local/services" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=plumber" \
--data-urlencode "location=Austin, TX" \
--data-urlencode "limit=5"Eventi
GET https://api.apihop.ai/v1/google-maps/events
| Campo | Tipo | Limiti | Esempio |
|---|---|---|---|
country | string | Codice paese di due lettere.; ^[A-Za-z]{2}$ | us |
language | string | Codice lingua supportato dal fornitore. | en |
device | string | Visualizzazione della fonte per dispositivo.; desktop, mobile, tablet | - |
zero_trace | boolean | Non archiviare i file di risposta del fornitore a monte; i metadati di fatturazione vengono conservati. | - |
no_cache | boolean | Flag di compatibilità; entrambi i valori recuperano dati aggiornati e applicano la fatturazione normale. | - |
query | string | Query di ricerca, massimo 8192 byte UTF-8.; obbligatorio | - |
location | string | Località indicata per nome; non utilizzabile con coordinate o uule. | - |
latitude | number | Latitudine; richiede longitude.; ≥ -90; ≤ 90 | - |
longitude | number | Longitudine; richiede latitude.; ≥ -180; ≤ 180 | - |
uule | string | Località Google codificata; non utilizzabile con location o coordinate.; maxLength: 4096 | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise(latitude AND longitude) XOR location XOR uule (optional)no_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/events" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=events in Austin" \
--data-urlencode "location=Austin, TX"Convalida
Solo parametri di query, senza corpo. Campi sconosciuti, duplicati, vuoti o con caratteri di controllo sono rifiutati. La ricerca richiede query; place_id o data_cid seleziona il luogo, sono esclusivi e type deve corrispondere. CID resta una stringa decimale. Coordinate in coppia, incompatibili con location. m e nearby richiedono un’origine; m esclude zoom. Il prezzo minimo non supera il massimo. open_state esclude giorno e ora; l’ora richiede un giorno, 0 è mezzanotte. gl è un paese di due lettere, hl una lingua. Nessun valore aggiunto; massimo 8192 caratteri. start solitamente 0, 20, 40; fino a 20 risultati per pagina. Le regole seguenti completano i limiti.
search: query; type = search (optional)place: place_id XOR data_cid; type = place (optional); data_cid: 1..18446744073709551615 (string)place: NOT latitude, longitude, location, zoom, m, start, nearby, min_price, max_price, min_rating, open_state, open_on_day, open_at_hourorigin (optional): (latitude AND longitude) XOR location; m => (coordinates OR location) AND NOT zoom; nearby => coordinates OR locationmin_price <= max_price; open_at_hour => open_on_day; open_state => NOT open_on_day AND NOT open_at_hourgl: /^[a-z]{2}$/i; hl: /^[a-z]{2,3}(?:-[a-z]{2,4})?$/i; string.length <= 8192
Esempi
curl --get "https://api.apihop.ai/v1/google-maps/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee shop" \
--data-urlencode "latitude=30.2672" \
--data-urlencode "longitude=-97.7431" \
--data-urlencode "start=0"curl --get "https://api.apihop.ai/v1/google-maps/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "data_cid=2982629209513831130" \
--data-urlencode "hl=en"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": {
"search_parameters": {
"q": "coffee shop",
"type": "maps",
"engine": "google_maps"
},
"has_next_page": false,
"results": []
}
}
}