Wykorzystanie i płatności interfejsu Distance Matrix API
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Żądania do interfejsu Distance Matrix API wywołują jedno z 2 interfejsów SKU w zależności od typu żądania: podstawowy lub zaawansowany.
Aby wyświetlić spis treści tej strony, kliknij ikonę informacje.
Ten SKU jest uruchamiany w przypadku każdego elementu zwróconego przez żądanie do interfejsu Distance Matrix API. Każde zapytanie wysłane do interfejsu Distance Matrix API generuje elementy, gdzie liczba origins razy liczba destinations jest równa liczbie elementów.
Ten SKU jest uruchamiany w przypadku każdego elementu zwróconego przez żądanie do interfejsu Distance Matrix API.
Każde zapytanie wysłane do interfejsu Distance Matrix API generuje elementy, przy czym liczba elementów origins pomnożona przez liczbę destinations jest równa liczbie elementów.
Informacje o natężeniu ruchu Gdy użyjesz wszystkich tych opcji żądania, aby odpowiedź zwracała pole duration_in_traffic
w odpowiedzi Distance Matrix:
Tryb podróży to jazda samochodem: ustaw
travel mode
nadriving. Driving to domyślny środek transportu.
Czas wyjazdu jest ustawiony: podaj prawidłową godzinę.departure_time Możesz ustawić wartość departure_time na bieżącą godzinę lub na pewien czas w przyszłości. Nie może ona przypadać w przeszłości.
Modyfikatory lokalizacji. Gdy używasz tych
modyfikatorów lokalizacji, aby wskazać kierowcom, jak powinni się poruszać w określonej lokalizacji:
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-03-12 UTC."],[[["The Distance Matrix API is priced on a pay-as-you-go basis, charging per element, which is calculated by multiplying the number of origins by the number of destinations in a request."],["There are two SKUs for billing: Distance Matrix (basic requests) and Distance Matrix Advanced (requests using traffic information or location modifiers), each having its own pricing tier."],["While there is no daily limit on the total number of elements, the API has usage restrictions on the maximum number of origins, destinations, and elements per request, as well as a rate limit of 60,000 elements per minute."],["Users can manage their costs by setting daily quota limits for the Distance Matrix API within the Google Cloud Console, ensuring their application's usage stays within budget."],["You must enable billing on your projects and include an API key or OAuth token for all API requests to utilize the Distance Matrix API."]]],["The Distance Matrix API requires enabled billing and an API key or OAuth token. It uses a pay-as-you-go model, with costs based on SKU usage, either basic or advanced. The advanced SKU includes traffic and location modifiers. Usage limits include maximums of 25 origins/destinations, 100 elements per request, and 60,000 elements per minute. Users can manage costs by setting daily quota limits in the Google Cloud console and utilize the $200 monthly credit until March 1, 2025.\n"]]