googlemaps / openapi-specification Goto Github PK
View Code? Open in Web Editor NEWOpenAPI specification for Google Maps Platform API
License: Apache License 2.0
OpenAPI specification for Google Maps Platform API
License: Apache License 2.0
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
List<string> destinationList = request.DestinationPoints.Select(s => s.ToString()).ToList();
List<string> originList = request.StartPoints.Select(s => s.ToString()).ToList();
var data = await _googleDistanceMatrix.DistanceMatrixAsync(destinationList, originList);
return data;
# example
[```](https://maps.googleapis.com/maps/api/distancematrix/json?destinations=42.7101%2C-78.8026%2C42.991077%2C-78.759279&origins=43.004179%2C-78.751965&key=)
Following these steps will guarantee the quickest resolution possible.
Thanks!
There is a small typo in the docs of the nearby search endpoint, under the optional parameters "keyword".
Doesn't optimize the route instead it adds another waypoint to True Track Software Ltd, Office 9-10, Cauldon Locks, Shelton New Rd, Stoke-on-Trent ST4 7AB, United Kingdom.
Following these steps will guarantee the quickest resolution possible.
Thanks!
Specify the API at the beginning of the title (for example, "Places: ...")
Distance matrix api on postman
Library version and other environment information
1.17.10. I imported the collection from https://developers.google.com/maps/documentation/distance-matrix/start?hl=en_US#maps_http_distancematrix_start-postman
Expected : Receive a response to my query since this is the happy path
Actual : I receive an error page
It seems that in the provided collection, the capitalization of the word distanceMatrix is wrong. To prove this, if you try this request instead, it works fine : https://maps.googleapis.com/maps/api/distancematrix/json?destinations=Washington%2C%20DC&origins=New%20York%20City%2C%20NY
For the Place Details API documentation, under the PlaceOpeningHours section, the description for the weekday_text
field is copied from the description of the open_now
text field.
The existing example for the weekday_text
field shows the following JSON entry:
...
"weekday_text":
[
"Monday: 9:00 AM – 5:00 PM",
"Tuesday: 9:00 AM – 5:00 PM",
"Wednesday: 9:00 AM – 5:00 PM",
"Thursday: 9:00 AM – 5:00 PM",
"Friday: 9:00 AM – 5:00 PM",
"Saturday: Closed",
"Sunday: Closed",
],
...
I suggest a new description for the weekday_text
field as follows:
An array of strings describing in human-readable text the weekly opening hours of the place.
This is just a suggestion. I'm not confident that it is accurate, and it could use some further clarification from someone who knows what the weekday_text
field is supposed to be.
Thanks!
Need documentation for new Place fields.
Is your feature request related to a problem? Please describe.
The current business_status enum is missing a value: FUTURE_OPENING
Describe the solution you'd like
Add the value to the enum
const URI = encodeURI
(
https://maps.googleapis.com/maps/api/place/textsearch/json?query=%22best%20Internist%22&key=secret&fileds=place_id,formatted_address,name,rating,opening_hours/open_now,geometry,business_status,price_level,pagetoken,photos&language=en-us&location=52.516282,13.3131672&radius=5000
);
const { data } = await axios(URI, {
method: 'GET',
});
Currently, we have a method that gets the distance matrix from google distance api.
public async Task<DistanceMatrix?> GetDistanceMatrix(List<string> rawDestinationAddress,
string rawOrigin,
string travelMode = "DRIVING",
string unitSystem = "imperial")
{
var destinationAddress = JsonSerializer.Serialize(rawDestinationAddress.Select(x => HttpUtility.UrlEncode(x)));
string url = @$"api/distancematrix/json?origins={HttpUtility.UrlEncode(rawOrigin)}
&destinations={destinationAddress}
&travelMode={travelMode}
&units={unitSystem}
&key={Config.Key}";
return await HttpClient.GetFromJsonAsync<DistanceMatrix>(url);
}
Even though we're sending in units=imperial, we always get km in distance.text.
Note: We have tested it just using browser and in there, it returns miles but when we use it in our project, we always get km.
May we know what's the right value for units?
Blocked by postmanlabs/openapi-to-postman#400
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
# example
# example
Following these steps will guarantee the quickest resolution possible.
Thanks!
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
# example
# example
Following these steps will guarantee the quickest resolution possible.
Thanks!
radius
is linked under "Optional Parameters" on the docs page but towards the bottom of the page in “Status codes returned by service” it's listed as being a possible reason for the INVALID_QUERY
status code if it's missing due to being a required query parameter-- alongside location
which IS listed as a necessary parameter
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photo_reference=photo_reference&key=YOUR_API_KEY
Field | Required | Type | Description |
---|---|---|---|
height | required | number | The height of the photo. |
html_attributions | required | Array | The HTML attributions for the photo. |
photo_reference | required | string | A string used to identify the photo when you perform a Photo request. |
width | required | number | The width of the photo. |
Following these steps will guarantee the quickest resolution possible.
Seems I could improve that with operationId
although the fallback in the could also be improved. https://github.com/ferdikoomen/openapi-typescript-codegen/blob/830b317d0a0f6aaa97dba43818ce6d1ccc109be2/src/openApi/v3/parser/getOperation.ts#L22-L23
Originally posted by @jpoehnelt in #197 (comment)
The location parameter doc should be updated to indicate that radius is required.
b/241023763
Documentation samples are needed for the Advanced Markers feature.
Steps to reproduce
Code example
https://maps.googleapis.com:443/maps/api/place/findplacefromtext/json?key=<mykey>&input=airport&inputtype=textquery&locationbias=circle%3a50000%4048.856614%2c2.3522219&fields=name&language=en
Response
{
"candidates": [
{
"name": "Bucharest Băneasa - Aurel Vlaicu International Airport"
}
],
"status": "OK"
}
Thanks!
The README for this repo lists the APIs and provides a link to Postman, but if I would like to browse rendered documentation it would be helpful to know where I can see the rendered docs.
Perhaps adding a column to the table in https://github.com/googlemaps/openapi-specification/blob/main/README.md#description with links to the corresponding pages in https://developers.google.com/maps/documentation/ would be the most straightforward way to do this.
components.parameters.region.schema.enum
does not contain 'en' which is the default value
located in the openapi3 spec
/dist/google-maps-platform-openapi3.json
Seems I can't link directly to the file for ease of use, because Github thinks the file is too big.
Should be around line 28303-28558
https://developers.google.com/maps/documentation/directions/get-directions
Contains 2 links pointing to internal locations.
https://developers.devsite.corp.google.com/maps/documentation/utilities/polylinealgorithm
https://developers.devsite.corp.google.com/maps/billing/gmp-billing#directions-advanced
If this repository is anything to go on there are 10 instances of "corp.google.com":
https://github.com/googlemaps/openapi-specification/search?q=corp.google.com
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
"/maps/api/distanceMatrix/json": { "get": { "operationId": "distanceMatrix", "servers": [ { "url": "https://maps.googleapis.com" } ], "tags": [ "Distance Matrix API" ], "description": "The Distance Matrix API is a service that provides travel distance and time for a matrix of origins and destinations. The API returns information based on the recommended route between start and end points, as calculated by the Google Maps API, and consists of rows containing duration and distance values for each pair.", "parameters": [ { "$ref": "#/components/parameters/arrival_time" }, { "$ref": "#/components/parameters/departure_time" }, { "$ref": "#/components/parameters/distancematrix_avoid" },
# example
# example
Following these steps will guarantee the quickest resolution possible.
Thanks!
Shared parameters should be in components and avoid internal references such as:
- $ref: '#/paths/~1maps~1api~1place~1details~1json/get/parameters/1'
Related to APIDevTools/swagger-cli#29
https://maps.googleapis.com/maps/api/place/findplacefromtext/json?key=<mykey>&inputtype=textquery&locationrestriction=circle:[email protected],-81.2452768&input=london&fields=place_id,name,formatted_address
{
"candidates": [
{
"formatted_address": "London, UK",
"name": "London",
"place_id": "ChIJdd4hrwug2EcRmSrV3Vo6llI"
}
],
"status": "OK"
}
Swapping locationrestriction with locationbias here, it also returns London, UK. I would somewhat expect locationbias to return London, Ontario, Canada, but I understand it depends on how strong the location bias is.
However, I fully expect locationrestriction to return the 'london' that is within the location constraint provided.
I also tried specifying a rectangle for locationrestriction, but that did not work either.
The following should work without any dependencies other than Node and NPM.
npm i
npm run build
When making a request to the Google Autocomplete API A 500 internal error is being thrown by the when the JSON object is being deserialized. The following properties are required in the PlaceAutocompleteStructuredFormat object:
try { return JsonConvert.DeserializeObject(response.Content, type, _serializerSettings); } catch (Exception e) { throw new ApiException(500, e.Message); } }
https://maps.googleapis.com/maps/api/place/findplacefromtext/json?fields=formatted_address,name,geometry,utc_offset&input=CN%20Tower,%20Toronto,%20Ontario&inputtype=textquery&key=<mykey>
{
"candidates": [],
"error_message": "Error while parsing 'fields' parameter: Unsupported field name 'utc_offset'. ",
"status": "INVALID_REQUEST"
}
Following these steps will guarantee the quickest resolution possible.
Thanks!
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
# example
# example
Following these steps will guarantee the quickest resolution possible.
Thanks!
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
# example
# example
Following these steps will guarantee the quickest resolution possible.
Thanks!
The close
field on the PlaceOpeningHoursPeriod
structure is marked as required
but the documentation says:
If a place is always open, the close section will be missing [...]
which indicates that close
should be optional.
root issue here: postmanlabs/postman-code-generators#506
The keyword
parameter needs a note to inform devs that if the parameter is omitted, certain business_status
values (CLOSED_TEMPORARILY
, CLOSED_PERMANENTLY
) are not returned.
Sorry for deleting your nice template. If there isn't an obvious solution to this, I'll come back and fill out the full template. For now the file is just too big to parse out the exact details you require, and the issue is relatively simple and widespread.
Some properties are missing a type
.
For example:
on line 23140:
steps:
description: Contains detailed directions for walking or driving steps in transit directions. Substeps are only available when travel_mode is set to "transit". The inner steps array is of the same type as steps.
And, on line 23288:
partial_match:
description: |
Indicates that the geocoder did not return an exact match for the original request, though it was able to match part of the requested address. You may wish to examine the original request for misspellings and/or an incomplete address.
Partial matches most often occur for street addresses that do not exist within the locality you pass in the request. Partial matches may also be returned when a request matches two or more locations in the same locality. For example, "21 Henr St, Bristol, UK" will return a partial match for both Henry Street and Henrietta Street. Note that if a request includes a misspelled address component, the geocoding service may suggest an alternative address. Suggestions triggered in this way will also be marked as a partial match.
This understandably trips up some code generators.
Is this expected behavior?
I´m trying to create a simple carousel to show the reviews of a place that my customer owns.
I already have the API Key and configured de project at GCP Console, I need to know how to use this
https://maps.googleapis.com/maps/api/place/details/json?place_id=MY_PLACE_ID&language=pt-BR&key=MY_API_KEY to show only the "reviews" at this carousel on the site of the owner?
{
"predictions" : [
{
"description" : "Voortrekker Monument, Eeufees Road, Groenkloof 358-Jr, Pretoria, South Africa",
"distance_meters" : 49264,
"matched_substrings" : [
{
"length" : 20,
"offset" : 0
}
],
"place_id" : "ChIJNSI5EExilR4RlDDAbNks5s0",
"reference" : "ChIJNSI5EExilR4RlDDAbNks5s0",
"structured_formatting" : {
"main_text" : "Voortrekker Monument",
"main_text_matched_substrings" : [
{
"length" : 20,
"offset" : 0
}
],
"secondary_text" : "Eeufees Road, Groenkloof 358-Jr, Pretoria, South Africa"
},
"terms" : [
{
"offset" : 0,
"value" : "Voortrekker Monument"
},
{
"offset" : 22,
"value" : "Eeufees Road"
},
{
"offset" : 36,
"value" : "Groenkloof 358-Jr"
},
{
"offset" : 55,
"value" : "Pretoria"
},
{
"offset" : 65,
"value" : "South Africa"
}
],
"types" : [ "tourist_attraction", "point_of_interest", "establishment" ]
},
etc, etc
],
"status" : "OK"
}
The response contains a "distance_meters" field. The docs for the origin parameter say that a distance will be returned when an origin is provided.
We're using v1.17.10 of the spec and the "distance_meters" field in the response is missing.
Thanks.
According to the Place Data Fields table, the field name should be reviews
plural. Currently, review
singular is listed.
this api cannot use,I tried to use jsonp , but it didn't solve it .Is there any other way?
Place Autocomplete documentation does not mention that the radius parameter is required when using location.
See b/241023763
Documentation is required for the new editorial_summary field.
Update reference docs for Places API to include new atmosphere fields:
This bug covers the OpenAPI portion of b/234461705 (Update Place Details for Reviews Launch). Companion CL/469203836
This issue is a companion to internal bug b/221276477 Update Place Search input param docs to be clearer about how they must be used.
I follow this thread,
but I still can't see editorial_summary
in the response.
Did I miss something?
I'm using New York for testing, which place_id
is ChIJOwg_06VPwokRYv534QaPC8g
.
curl https://maps.googleapis.com/maps/api/place/details/json\?place_id\=ChIJOwg_06VPwokRYv534QaPC8g\&fields\=editorial_summary\&key\=<key>
curl https://maps.googleapis.com/maps/api/place/details/json\?place_id\=ChIJOwg_06VPwokRYv534QaPC8g\&fields\=editorial_summary\&key\=<key>
{
"html_attributions" : [],
"result" : {},
"status" : "OK"
}
The The Places api Nearby Search documentation says that radius
is an optional parameter. However, when I make a request without the radius
parameter I get a response with "status" : "INVALID_REQUEST"
{
"html_attributions" : [],
"results" : [],
"status" : "INVALID_REQUEST"
}
I want to fetch Google Business Profile description using API, currently using this API call https://developers.google.com/maps/documentation/places/web-service/details#place-details-example for fetching star ratings of Google my Business profiles but it does not have description parameter in its response result.
It seems to me like this query should return J A Wettergrens Gata, but it returns Askims Stationsväg much further away. Is this a bug?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.