{
  "resources": {
    "v1alpha": {
      "methods": {
        "lookupRegion": {
          "id": "regionlookup.lookupRegion",
          "path": "v1alpha:lookupRegion",
          "description": "Lookup region RPC. Looks up a set of region Place IDs of types related to geographic boundaries. The API looks up a region Place ID using the `RegionIdentifier` proto. See `RegionIdentifier` for more details and examples. The following region place types are supported for look up: postal_code, administrative_area_level_1, administrative_area_level_2, locality, neighborhood, and country.",
          "request": {
            "$ref": "LookupRegionRequest"
          },
          "flatPath": "v1alpha:lookupRegion",
          "response": {
            "$ref": "LookupRegionResponse"
          },
          "parameters": {},
          "parameterOrder": [],
          "httpMethod": "POST"
        },
        "searchRegion": {
          "path": "v1alpha:searchRegion",
          "flatPath": "v1alpha:searchRegion",
          "response": {
            "$ref": "SearchRegionResponse"
          },
          "description": "Search region RPC. Searches for a set of region Place IDs of types related to geographic boundaries. Similar to `LookupRegion` RPC but instead of looking up Place IDs for the given `RegionIdentifier`, the API searches for Region Place IDs by considering all regions that are contained within a specified location. The `RegionSearchValue` is used to specify the search values. See `RegionSearchValue` for more details and examples. The following region place types are supported for searching: postal_code, administrative_area_level_1, administrative_area_level_2, locality, neighborhood, and country.",
          "id": "regionlookup.searchRegion",
          "parameters": {},
          "parameterOrder": [],
          "httpMethod": "POST",
          "request": {
            "$ref": "SearchRegionRequest"
          }
        }
      }
    }
  },
  "protocol": "rest",
  "ownerDomain": "google.com",
  "kind": "discovery#restDescription",
  "ownerName": "Google",
  "baseUrl": "https://regionlookup.googleapis.com/",
  "canonicalName": "Region Lookup",
  "title": "Region Lookup API (Experimental)",
  "parameters": {
    "callback": {
      "type": "string",
      "description": "JSONP",
      "location": "query"
    },
    "fields": {
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query",
      "type": "string"
    },
    "$.xgafv": {
      "type": "string",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "location": "query",
      "description": "V1 error format.",
      "enum": [
        "1",
        "2"
      ]
    },
    "key": {
      "type": "string",
      "location": "query",
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token."
    },
    "oauth_token": {
      "description": "OAuth 2.0 token for the current user.",
      "type": "string",
      "location": "query"
    },
    "quotaUser": {
      "location": "query",
      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
      "type": "string"
    },
    "access_token": {
      "type": "string",
      "location": "query",
      "description": "OAuth access token."
    },
    "prettyPrint": {
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "location": "query",
      "default": "true"
    },
    "upload_protocol": {
      "type": "string",
      "location": "query",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
    },
    "alt": {
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "location": "query",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "description": "Data format for response.",
      "type": "string",
      "default": "json"
    },
    "uploadType": {
      "location": "query",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "type": "string"
    }
  },
  "schemas": {
    "LookupRegionRequest": {
      "id": "LookupRegionRequest",
      "properties": {
        "pageToken": {
          "description": "A page token, received from a previous `LookupRegion` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `LookupRegion` must match the call that provided the page token.",
          "type": "string"
        },
        "identifiers": {
          "items": {
            "$ref": "RegionIdentifier"
          },
          "type": "array",
          "description": "Each `RegionIdentifier` represents the desired fields used to lookup a single region. See `RegionIdentifier` proto for more details and examples."
        },
        "pageSize": {
          "description": "The maximum number of matches to return. The service may return fewer than this value. If unspecified, at most 50 matches will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
          "type": "integer",
          "format": "int32"
        }
      },
      "type": "object",
      "description": "Lookup Region Request. Next available tag: 4"
    },
    "LookupRegionResponse": {
      "id": "LookupRegionResponse",
      "type": "object",
      "description": "Lookup Region Response. Next available tag: 3",
      "properties": {
        "matches": {
          "type": "array",
          "items": {
            "$ref": "RegionMatch"
          },
          "description": "Lookup region matches, one for each `RegionIdentifier` in `LookupRegionRequest.identifiers`."
        },
        "nextPageToken": {
          "type": "string",
          "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages."
        }
      }
    },
    "SearchRegionResponse": {
      "properties": {
        "matches": {
          "items": {
            "$ref": "RegionMatch"
          },
          "type": "array",
          "description": "Search region matches, one for each `RegionSearchValue` in `SearchRegionRequest.search_values`."
        },
        "nextPageToken": {
          "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.",
          "type": "string"
        }
      },
      "description": "Match Region Response. Next available tag: 3",
      "id": "SearchRegionResponse",
      "type": "object"
    },
    "RegionMatch": {
      "description": "Region Match. Next available tag: 5",
      "properties": {
        "debugInfo": {
          "type": "string",
          "description": "Matching debug information for when no match is found."
        },
        "matchedPlaceId": {
          "description": "Place ID of the region that is matched. If region is found, this field is not set.",
          "type": "string"
        },
        "candidatePlaceIds": {
          "description": "Region candidate IDs. Up to three candidates may be returned.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "type": "object",
      "id": "RegionMatch"
    },
    "RegionIdentifier": {
      "type": "object",
      "description": "Region Identifier. Identifies a region to look up. One of place or unit_code must be specified. If none is specified, an INVALID_ARGUMENT error is returned. region_code must also be specified except when place_type is \"country\". place and unit_code specify a location to match a Place ID to. For example if place is \"California\" and region_code \"US\" the API returns the following matched_place_id results when the following place_types are specified: place_type: matched_place_id results: administrative_area_level_1 Place ID for The State of California (All other supported types) No Match If unit_code is \"6\" (FIPs code for California) and region_code is \"US the API returns the following matched_place_id results when the following place_types are specified: place type: matched_place_id results: administrative_area_level_1 Place ID for The State of California (All other supported types) No Match or if unit_code is \"US\" the API returns the following results when the following place_types are specified: place type: matched_place_id results: country Place ID for the United States (All other supported types) No Match If no match is found, matched_place_id is not set. Candidate Place IDs are returned when a lookup finds a region with a different place_type then the one requested. For example if place is \"California\" and place_type is \"country\" the Place ID for The State of California is returned as a candidate in the candidate_place_ids field. Next available tag: 10",
      "id": "RegionIdentifier",
      "properties": {
        "placeType": {
          "type": "string",
          "enumDescriptions": [
            "Default value. This value is unused.",
            "Postal code.",
            "Administrative area level 1 (State in the US).",
            "Administrative area level 2 (County in the US).",
            "Locality (City).",
            "Neighborhood.",
            "Country.",
            "Sublocality.",
            "Administrative area level 3.",
            "Administrative area level 4.",
            "School district."
          ],
          "enum": [
            "PLACE_TYPE_UNSPECIFIED",
            "POSTAL_CODE",
            "ADMINISTRATIVE_AREA_LEVEL_1",
            "ADMINISTRATIVE_AREA_LEVEL_2",
            "LOCALITY",
            "NEIGHBORHOOD",
            "COUNTRY",
            "SUBLOCALITY_LEVEL_1",
            "ADMINISTRATIVE_AREA_LEVEL_3",
            "ADMINISTRATIVE_AREA_LEVEL_4",
            "SCHOOL_DISTRICT"
          ],
          "description": "Required. Place type to match."
        },
        "languageCode": {
          "type": "string",
          "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\", corresponding to the language in which the place name and address is requested. If none is requested, then it defaults to English."
        },
        "unitCode": {
          "type": "string",
          "description": "The FIPs state or county codes (US only) or ISO-3166-1 country code to be matched. The unit_code field is used in combination with place_type to look up the region Place ID. For example: If place_type is \"country\", a valid unit_code can be \"US\" (ISO-3166-1 Alpha-2 code for United States) or \"BR\" (ISO-3166-1 Alpha-2 code for Brazil). If place_type is \"administrative_area_level_1\" (state) and region_code is \"US\", a valid unit_code can be \"6\" (FIPs code for California) or \"12\"(FIPs code for Florida). If place_type is \"administrative_area_level_2\" (county) and region_code is \"US\", a valid unit_code can be \"6001\" (FIPs code for Alameda County in California) or \"12086\" (FIPs code for Miami-Dade County in Florida). region_code is required when specifying a FIPs code. region_code is ignored for ISO-3166-1 country codes."
        },
        "place": {
          "description": "The name of the region to match to a Place ID. The place field is used in combination with place_type to look up the region Place ID. For example: If place_type is \"locality\", a valid place can be \"Palo Alto, CA\". If place_type is \"postal_code\", a valid place can be \"94109\". If place_type is \"country\", a valid place can be \"United States\". etc. region_code is required when place is specified except when place_type is \"country\".",
          "type": "string"
        },
        "regionCode": {
          "type": "string",
          "description": "Two-letter ISO-3166 country/region code for the location you're trying to match. region_code is optional if place_type is \"country\"."
        }
      }
    },
    "SearchRegionRequest": {
      "type": "object",
      "id": "SearchRegionRequest",
      "description": "Search Region Request. Next available tag: 4",
      "properties": {
        "searchValues": {
          "type": "array",
          "items": {
            "$ref": "RegionSearchValue"
          },
          "description": "Each value represents desired search values of a single region to match. The API tries to match them to Place IDs. See `RegionSearchValue` proto for more info and examples."
        },
        "pageSize": {
          "type": "integer",
          "format": "int32",
          "description": "The maximum number of matches to return. The service may return fewer than this value. If unspecified, at most 50 matches will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000."
        },
        "pageToken": {
          "type": "string",
          "description": "A page token, received from a previous `SearchRegion` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `LookupRegion` must match the call that provided the page token."
        }
      }
    },
    "RegionSearchValue": {
      "type": "object",
      "description": "Region Search Values. Desired search values of a single region. Location must be specified by one of the following: address, latlng or place_id. If none is specified, an INVALID_ARGUMENT error is returned. region_code must also be provided when address is specified. The fields address, latlng and place_id specify a location contained inside the region to match. For example if address is \"1600 Amphitheatre Pkwy, Mountain View, CA 94043\" the API returns the following matched_place_id results when the following place_types are specified: place_type: matched_place_id results: postal_code Place ID for \"94043\" administrative_area_level_1 Place ID for The State of California administrative_area_level_2 Place ID for Santa Clara County etc. More Examples: If latlng is \"latitude: 37.4220656 longitude: -122.0862784\" and place_type is \"locality\", the result contains the Place ID (of type \"locality\") for that location (the Place ID of Mountain View, CA, in this case). If place_id is \"ChIJj61dQgK6j4AR4GeTYWZsKWw\" (Place ID for Google office in Mountain view, CA) and place_type is \"locality\", the result contains the Place ID (of type \"locality\") for that location (the Place ID of Mountain View, CA, in this case). If no match is found, matched_place_id is not set. Candidates Place IDs are returned when a search finds multiple Place IDs for the location specified. For example if the API is searching for region Place IDs of type neighboorhood for a location that is contained within multiple neighboords. The Place Ids will be returned as candidates in the candidate_place_ids field. Next available tag: 10",
      "properties": {
        "languageCode": {
          "type": "string",
          "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\", corresponding to the language in which the place name and address is requested. If none is requested, then it defaults to English."
        },
        "placeId": {
          "description": "The Place ID that is contained inside a region to match.",
          "type": "string"
        },
        "latlng": {
          "description": "The latitude and longitude that is contained inside a region to match.",
          "$ref": "LatLng"
        },
        "placeType": {
          "enum": [
            "PLACE_TYPE_UNSPECIFIED",
            "POSTAL_CODE",
            "ADMINISTRATIVE_AREA_LEVEL_1",
            "ADMINISTRATIVE_AREA_LEVEL_2",
            "LOCALITY",
            "NEIGHBORHOOD",
            "COUNTRY",
            "SUBLOCALITY_LEVEL_1",
            "ADMINISTRATIVE_AREA_LEVEL_3",
            "ADMINISTRATIVE_AREA_LEVEL_4",
            "SCHOOL_DISTRICT"
          ],
          "type": "string",
          "description": "Required. The type of the place to match.",
          "enumDescriptions": [
            "Default value. This value is unused.",
            "Postal code.",
            "Administrative area level 1 (State in the US).",
            "Administrative area level 2 (County in the US).",
            "Locality (City).",
            "Neighborhood.",
            "Country.",
            "Sublocality.",
            "Administrative area level 3.",
            "Administrative area level 4.",
            "School district."
          ]
        },
        "regionCode": {
          "description": "Two-letter ISO-3166 country/region code for the location you're trying to match. region_code is required when address is specified.",
          "type": "string"
        },
        "address": {
          "description": "The unstructured street address that is contained inside a region to match. region_code is required when address is specified.",
          "type": "string"
        }
      },
      "id": "RegionSearchValue"
    },
    "LatLng": {
      "type": "object",
      "properties": {
        "longitude": {
          "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].",
          "type": "number",
          "format": "double"
        },
        "latitude": {
          "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].",
          "type": "number",
          "format": "double"
        }
      },
      "id": "LatLng",
      "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges."
    }
  },
  "basePath": "",
  "revision": "20261103",
  "mtlsRootUrl": "https://regionlookup.mtls.googleapis.com/",
  "version_module": true,
  "description": "The Region Lookup API.",
  "fullyEncodeReservedExpansion": true,
  "name": "regionlookup",
  "servicePath": "",
  "discoveryVersion": "v1",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "rootUrl": "https://regionlookup.googleapis.com/",
  "batchPath": "batch",
  "id": "regionlookup:v1alpha",
  "version": "v1alpha",
  "documentationLink": "https://www.google.com"
}
