Welcome, Guest Sign In | Sign Up | Help
Upcoming API Documentation
Currently, the use of these APIs are restricted to non-commercial use only. If you'd like to use it for commercial purposes, please contact us first.
country.getInfo [HTTP GET]
Retrieve the details about a country.
Arguments
api_key (Required)
Your API application key. If you don't have one, create one.

country_id (Required)
The country_id number of the country to look within. Country ID's are referred to within other API methods, such as metro.getStateList and state.getInfo. To run getInfo on multiple countries, simply pass a comma-separated list of country_id numbers.

Example Response

XML

<?xml version="1.0" encoding="UTF-8"?>
<rsp stat="ok" version="1.0">
	<country id="1" name="United States" code="us"/>
	<country id="2" name="Canada" code="ca"/>
	<country id="3" name="Sweden" code="se"/>
	<country id="4" name="Germany" code="de"/>
</rsp>		

JSON

{ "rsp" : { "country" : [ { "code" : "us",
            "id" : 1,
            "name" : "United States"
          },
          { "code" : "ca",
            "id" : 2,
            "name" : "Canada"
          },
          { "code" : "se",
            "id" : 3,
            "name" : "Sweden"
          },
          { "code" : "de",
            "id" : 4,
            "name" : "Germany"
          }
        ],
      "stat" : "ok",
      "version" : 1
    }
}
Error Codes
404 Not Found:
  • Missing valid api_key - Please create an API key using the above link.
  • Your api_key is inactive or not found - Please contact us for support.
  • Missing valid country_id parameter - Your country_id may be improperly formatted or non-numeric. Only numeric country_id's are allowed.
Tools
Upcoming Badges for Your Blog/Website | Invite Friends | Groups | Developers API
Help
News Blog | Community Guidelines | FAQ | Contact Us | Suggestion Board | About Us