States¶
This resource represents a geographical state.
XML Schema:
Resource Definition¶
Note
This resource can be searched, allowing to you to access a filtered set of data. See our Searching The G API documentation for details on how to query specific fields and the operators available.
Fields
Name |
Type |
Description |
---|---|---|
id read-only |
String |
|
href read-only |
Field |
|
name required |
String |
The name of the state. |
country required |
Reference Object |
|
place required |
Nested Object |
|
|
String |
|
|
Field |
|
|
String |
The name of this place. |
|
List |
A list of alternate names for this state. Generally, these may be alternate spellings, or historic names. |
Get a State
- GET /states/(state_id)¶
Request
curl -H "X-Application-Key: YOUR_APPLICATION_KEY"
https://rest.gadventures.com/states/CA-ON
Response
{ "id": "CA-ON", "href": "https://rest.gadventures.com/states/CA-ON", "name": "Ontario", "country": { "id": "CA", "href": "https://rest.gadventures.com/countries/CA", "name": "Canada" }, "place": { "id": "1017423", "href": "https://rest.gadventures.com/places/1017423", "name": "Ontario", "alternate_names": [ "Canada West", "ON", "Ontareje", "Ontarijas", "Ontario", "Ontario pruwinsya", "Ontario-sen", "Ontario-sén", "Ontariu", "Ontarėjė", "Ontàrio", "Ontário", "Ontārio", "Pravincyja Antarya", "Upper Canada", "an da e", "an da e sheng", "antari'o", "antariyo", "antaryw", "awntaryw", "onrariyo", "ontalio ju", "ontari'o", "ontario zhou", "ontariyea", "ontariyo", "Οντάριο", "Онтарио", "Онтаріо", "Правінцыя Антарыа", "Օնտարիո", "אונטריו", "אנטעריא", "أونتاريو", "انتاریو", "انٹاریو", "اونتاريو", "اونٹاریو", "ܐܘܢܛܐܪܝܘ", "ऑन्टारियो", "ओण्टारियो", "অন্টারিও", "ਓਂਟਾਰੀਓ", "ஒன்ராறியோ", "అంటారియో", "ഒണ്ടാറിയോ", "รัฐออนแทรีโอ", "အွန်တေးရီးယိုးပြည်နယ်", "ონტარიო", "ᐅᓐᑌᕇᐤ", "ᐋᓐᑎᐅᕆᔪ", "オンタリオ州", "安大略", "安大略省", "온타리오 주" ] } }
List States
- GET /states¶
Request
curl -H "X-Application-Key: YOUR_APPLICATION_KEY"
https://rest.gadventures.com/states/
Response
{ "count": 5036, "max_per_page": 50, "current_page": 1, "links": [ { "href": "https://rest.gadventures.com/states?max_per_page=50&page=2", "rel": "next" } ], "results": [ { "id": "WS-AA", "href": "https://rest.gadventures.com/states/WS-AA", "name": "A'ana" }, { "id": "KI-AG", "href": "https://rest.gadventures.com/states/KI-AG", "name": "Abaiang" }, { "id": "KI-AM", "href": "https://rest.gadventures.com/states/KI-AM", "name": "Abemama" }, { "id": "GB-ABE", "href": "https://rest.gadventures.com/states/GB-ABE", "name": "Aberdeen City" }, { "id": "GB-ABD", "href": "https://rest.gadventures.com/states/GB-ABD", "name": "Aberdeenshire" }, { "id": "NG-AB", "href": "https://rest.gadventures.com/states/NG-AB", "name": "Abia State" }, { "id": "UG-317", "href": "https://rest.gadventures.com/states/UG-317", "name": "Abim District" }, { "id": "GE-AB", "href": "https://rest.gadventures.com/states/GE-AB", "name": "Abkhazia" }, { "id": "AZ-ABS", "href": "https://rest.gadventures.com/states/AZ-ABS", "name": "Absheron Rayon" }, { "id": "AE-AZ", "href": "https://rest.gadventures.com/states/AE-AZ", "name": "Abū Z̧aby" }, { "id": "BS-AK", "href": "https://rest.gadventures.com/states/BS-AK", "name": "Acklins Island District" }, { "id": "YT-97601", "href": "https://rest.gadventures.com/states/YT-97601", "name": "Acoua" }, { "id": "CM-AD", "href": "https://rest.gadventures.com/states/CM-AD", "name": "Adamaoua Region" }, { "id": "NG-AD", "href": "https://rest.gadventures.com/states/NG-AD", "name": "Adamawa State" }, { "id": "TR-01", "href": "https://rest.gadventures.com/states/TR-01", "name": "Adana" }, { "id": "UG-301", "href": "https://rest.gadventures.com/states/UG-301", "name": "Adjumani District" }, { "id": "PR-001", "href": "https://rest.gadventures.com/states/PR-001", "name": "Adjuntas" }, { "id": "DZ-01", "href": "https://rest.gadventures.com/states/DZ-01", "name": "Adrar" }, { "id": "MR-07", "href": "https://rest.gadventures.com/states/MR-07", "name": "Adrar" }, { "id": "TR-02", "href": "https://rest.gadventures.com/states/TR-02", "name": "Adıyaman" }, { "id": "MK-01", "href": "https://rest.gadventures.com/states/MK-01", "name": "Aerodrom" }, { "id": "ET-AF", "href": "https://rest.gadventures.com/states/ET-AF", "name": "Afar Region" }, { "id": "TR-03", "href": "https://rest.gadventures.com/states/TR-03", "name": "Afyonkarahisar" }, { "id": "NE-1", "href": "https://rest.gadventures.com/states/NE-1", "name": "Agadez" }, { "id": "MA-AGD", "href": "https://rest.gadventures.com/states/MA-AGD", "name": "Agadir-Ida-ou-Tnan" }, { "id": "UG-E3", "href": "https://rest.gadventures.com/states/UG-E3", "name": "Agago District" }, { "id": "MU-AG", "href": "https://rest.gadventures.com/states/MU-AG", "name": "Agalega Islands" }, { "id": "GU-AH", "href": "https://rest.gadventures.com/states/GU-AH", "name": "Agana Heights Municipality" }, { "id": "GU-AT", "href": "https://rest.gadventures.com/states/GU-AT", "name": "Agat Municipality" }, { "id": "AZ-AGM", "href": "https://rest.gadventures.com/states/AZ-AGM", "name": "Aghdam Rayon" }, { "id": "AZ-AGS", "href": "https://rest.gadventures.com/states/AZ-AGS", "name": "Aghdash Rayon" }, { "id": "AZ-AGC", "href": "https://rest.gadventures.com/states/AZ-AGC", "name": "Aghjabadi Rayon" }, { "id": "AZ-AGA", "href": "https://rest.gadventures.com/states/AZ-AGA", "name": "Aghstafa Rayon" }, { "id": "AZ-AGU", "href": "https://rest.gadventures.com/states/AZ-AGU", "name": "Aghsu Rayon" }, { "id": "LV-001", "href": "https://rest.gadventures.com/states/LV-001", "name": "Aglonas Novads" }, { "id": "CI-16", "href": "https://rest.gadventures.com/states/CI-16", "name": "Agnéby" }, { "id": "PR-003", "href": "https://rest.gadventures.com/states/PR-003", "name": "Aguada" }, { "id": "PR-005", "href": "https://rest.gadventures.com/states/PR-005", "name": "Aguadilla" }, { "id": "PR-007", "href": "https://rest.gadventures.com/states/PR-007", "name": "Aguas Buenas" }, { "id": "TM-A", "href": "https://rest.gadventures.com/states/TM-A", "name": "Ahal" }, { "id": "FI-AL", "href": "https://rest.gadventures.com/states/FI-AL", "name": "Ahvenanmaan Lääni" }, { "id": "PR-009", "href": "https://rest.gadventures.com/states/PR-009", "name": "Aibonito" }, { "id": "JP-23", "href": "https://rest.gadventures.com/states/JP-23", "name": "Aichi-ken" }, { "id": "WS-AL", "href": "https://rest.gadventures.com/states/WS-AL", "name": "Aiga-i-le-Tai" }, { "id": "TL-AL", "href": "https://rest.gadventures.com/states/TL-AL", "name": "Aileu" }, { "id": "MH-007", "href": "https://rest.gadventures.com/states/MH-007", "name": "Ailinginae Atoll" }, { "id": "MH-ALL", "href": "https://rest.gadventures.com/states/MH-ALL", "name": "Ailinglaplap Atoll" }, { "id": "MH-ALK", "href": "https://rest.gadventures.com/states/MH-ALK", "name": "Ailuk Atoll" }, { "id": "TL-AN", "href": "https://rest.gadventures.com/states/TL-AN", "name": "Ainaro" }, { "id": "NR-01", "href": "https://rest.gadventures.com/states/NR-01", "name": "Aiwo District" } ] }