Get the state details from ISO2 code or ID
GET
http://api.countrystatecity.org/v1/countries/{cisoORid}/states/{sisoORid}
#
AuthenticationThis free api uses API Key to authenticate. API Key needs to be passed in headers.
- Header Name : X-API-KEY
#
Request ParametersName | Location | Description | Required | Type |
---|---|---|---|---|
{cisoORid} | URL | ISO2 Code OR ID | YES | string |
{sisoORid} | URL | ISO2 Code OR ID | YES | string |
#
ResponseCode | Description |
---|---|
200 | Returns a state detail |
401 | Unauthorized |
404 | Not Found |
#
Example Usagescript.js
#
Example Success ResponseSuccess Response
#
Example Error ResponseError Response
#
Example NotFound ResponseError Response