curl -L -X GET 'https://maps.googleapis.com/maps/api/distancematrix/json?origins=Washington%2C%20DC&destinations=New%20York%20City%2C%20NY&units=imperial&key=YOUR_API_KEY'
Попробуйте! Проверьте этот запрос, введя URL-адрес в свой веб-браузер — обязательно замените YOUR_API_KEYсвоим фактическим ключом API . В ответе показано расстояние и продолжительность между указанными пунктами отправления и назначения.
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-01-14 UTC."],[[["This page provides a sample request and response for the Distance Matrix API, demonstrating how to calculate the distance and travel time between two locations."],["The example uses Washington, DC and New York City, NY as locations and showcases the request URL, cURL command, and expected JSON/XML responses."],["Users are encouraged to try the example with their own API key and explore further documentation on building requests and understanding responses."]]],[]]