country

Look up country metadata via REST Countries.

Look up country metadata via REST Countries. Pass alpha2 (2-letter ISO 3166-1), alpha3 (3-letter), or name (with optional fullText=true for exact match). Returns common + official name, ISO codes, region + subregion, independence + UN-member flags, capital(s), population, area km², landlocked flag, neighboring borders (alpha-3), timezones, currencies (code → name + symbol), languages, calling code, flag emoji + SVG/PNG URLs, lat/lng coordinates, Google Maps + OSM URLs, driving side, top-level domains.

get/api/country/lookup

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/country/lookup
  • Auth: API key in header PAYMENT-SIGNATURE

Query parameters

alpha2string

Alpha2.

alpha3string

Alpha3.

namestring

Name to search for.

fullTextboolean

Full text.

trial1

Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.