Data source: Embedded (ISO 3166)
https://context.gnist.ai/rest/country-info/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (5)
get_countryGet detailed information about a country by ISO code (alpha-2 or alpha-3).
Args:
code: ISO 3166-1 alpha-2 (e.g. "NO") or alpha-3 (e.g. "NOR") country code.
Returns:
Dictionary with country details including capital, population, currencies, and more.
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | required |
{
"code": "example"
}search_countriesSearch countries by name (case-insensitive partial match).
Args:
query: Search string to match against country names.
limit: Maximum number of results to return (default 10).
Returns:
Dictionary with count and list of matching countries.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | |
limit | integer | optional | (default: 10) |
{
"query": "example"
}list_countries_by_regionList all countries in a given region.
Args:
region: Region name — one of Africa, Americas, Asia, Europe, Oceania.
Returns:
Dictionary with region, count, and list of countries.
| Parameter | Type | Required | Description |
|---|---|---|---|
region | string | required |
{
"region": "example"
}get_country_statsGet summary statistics about countries in the database.
Returns:
Dictionary with total countries, UN members, landlocked count, breakdown by region, and total population.
{
"query": "example"
}report_feedbackReport a bug, feature request, or general feedback for this data source.
Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.
Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"feedback": "example"
}Quick Start
curl -X POST "https://context.gnist.ai/rest/country-info/get_country" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"code": "example"}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/rest/country-info/get_country",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={
"code": "example"
},
)
print(resp.json())