NYC Weekend Planner
NYC Weekend Planner · GPT Actions
Google Places API
OpenAPI specification for Google Places API to retrieve address components based on Place ID.
GET /places/{place_id}Retrieve information about a place
原始 API 定义
{
"openapi": "3.1.0",
"info": {
"title": "Google Places API",
"description": "OpenAPI specification for Google Places API to retrieve address components based on Place ID.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://places.googleapis.com/v1",
"description": "Google Places API Server"
}
],
"paths": {
"/places/{place_id}": {
"get": {
"summary": "Retrieve information about a place",
"operationId": "getPlaceInformation",
"tags": [
"Place Information"
],
"parameters": [
{
"name": "place_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "A textual identifier that uniquely identifies a place."
},
{
"name": "fields",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "The fields specifying the types of place data to return."
},
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "AIzaSyBSEysu2aaijhv5dOUZEmoQ74XpCiYM5Wo"
}
],
"responses": {
"200": {
"description": "Successful response with place information",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlaceInformation"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"PlaceInformation": {
"type": "object",
"properties": {
"addressComponents": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AddressComponent"
}
}
}
},
"AddressComponent": {
"type": "object",
"properties": {
"long_name": {
"type": "string",
"description": "The full text description or name of the address component as returned by the API."
},
"short_name": {
"type": "string",
"description": "An abbreviated textual name for the address component, if available."
},
"types": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array indicating the type of the address component."
}
}
}
}
}
}