AI-generated Key Takeaways
-
This API endpoint enables searching for political divisions using either their natural name or OCD ID.
-
The search query can include any part of the division name or OCD ID and supports most Apache Lucene query operators.
-
A successful response returns a list of matching divisions in the
results
array. -
The response includes a
kind
property identifying the resource type as"civicinfo#divisionSearchResponse"
. -
No request body is required for this GET method.
Searches for political divisions by their natural name or OCD ID. Try it now.
Request
HTTP request
GET https://www.googleapis.com/civicinfo/v2/divisions
Parameters
Parameter name | Value | Description |
---|---|---|
Optional query parameters | ||
query |
string |
The search query. Queries can cover any parts of a OCD ID or a human readable division name. All words given in the query are treated as required patterns. In addition to that, most query operators of the Apache Lucene library are supported. See http://lucene.apache.org/core/2_9_4/queryparsersyntax.html |
Request body
Do not supply a request body with this method.
Response
If successful, this method returns a response body with the following structure:
{ "kind": "civicinfo#divisionSearchResponse", "results": [ divisions Resource ] }
Property name | Value | Description | Notes |
---|---|---|---|
kind |
string |
Identifies what kind of resource this is. Value: the fixed string "civicinfo#divisionSearchResponse" . |
|
results[] |
list |