Divisions: search
Stay organized with collections
Save and categorize content based on your preferences.
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 |
|
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[[["\u003cp\u003eThis API endpoint enables searching for political divisions using either their natural name or OCD ID.\u003c/p\u003e\n"],["\u003cp\u003eThe search query can include any part of the division name or OCD ID and supports most Apache Lucene query operators.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns a list of matching divisions in the \u003ccode\u003eresults\u003c/code\u003e array.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes a \u003ccode\u003ekind\u003c/code\u003e property identifying the resource type as \u003ccode\u003e"civicinfo#divisionSearchResponse"\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eNo request body is required for this GET method.\u003c/p\u003e\n"]]],[],null,["# Divisions: search\n\nSearches for political divisions by their natural name or OCD ID.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nGET https://www.googleapis.com/civicinfo/v2/divisions\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Optional query parameters** |||\n| `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 |\n\n### Request body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```objective-c\n{\n \"kind\": \"civicinfo#divisionSearchResponse\",\n \"results\": [\n divisions Resource\n ]\n}\n```\n\n| Property name | Value | Description | Notes |\n|---------------|----------|---------------------------------------------------------------------------------------------------------|-------|\n| `kind` | `string` | Identifies what kind of resource this is. Value: the fixed string `\"civicinfo#divisionSearchResponse\"`. | |\n| `results[]` | `list` | | |\n\nTry it!\n-------"]]