{"uid":"cap_DTJhshV2TEytbVLMp7aII","slug":"2s-io-f3c0897d","name":"2s.io Country Lookup","description":"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.","url":"https://2s.io/api/country/lookup","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"const":"GET"},"queryParams":{"properties":{"name":{"type":"string","description":"Country name (full or partial)."},"alpha2":{"type":"string","description":"2-letter ISO 3166-1 code."},"alpha3":{"type":"string","description":"3-letter ISO 3166-1 code."},"fullText":{"type":"boolean","description":"When name is set, exact match instead of fuzzy."}}}}}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"alpha2":"DE"}}},"response":{"data":{"query":{"name":null,"alpha2":"DE","alpha3":null,"fullText":false},"source":{"url":"https://restcountries.com/","license":"Aggregated public-domain country metadata.","provider":"REST Countries (community-maintained)"},"returned":1,"countries":[{"tld":[".de"],"cioc":"GER","flag":"🇩🇪","name":{"common":"Germany","official":"Federal Republic of Germany"},"alpha2":"DE","alpha3":"DEU","region":"Europe","areaKm2":357114,"borders":["AUT","BEL","CZE","DNK","FRA","LUX","NLD","POL","CHE"],"capital":["Berlin"],"flagPng":"https://flagcdn.com/w320/de.png","flagSvg":"https://flagcdn.com/de.svg","unMember":true,"languages":{"deu":"German"},"subregion":"Western Europe","timezones":["UTC+01:00"],"currencies":{"EUR":{"name":"euro","symbol":"€"}},"landlocked":false,"population":83491249,"callingCode":"+49","coordinates":{"lat":51,"lng":9},"drivingSide":"right","independent":true,"numericCode":"276","googleMapsUrl":"https://goo.gl/maps/mD9FBMq1nvXUBrkv6","openStreetMapsUrl":"https://www.openstreetmap.org/relation/51477"}]},"meta":{"cost":{"usd":0.0012,"tier":0},"caller":"x402","version":null,"endpoint":"country.lookup","settlement":{"txHash":"0xea1d126565f1dad76c21a34313a7c1128aab651b733ceffc93aee526b6fb5e9b","network":"eip155:8453","success":true}}}},"exampleRequest":{"alpha2":"DE"},"tags":["x402"],"displayCostAmount":"0.0012","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0012/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_P75z2UJvQz2YFtAyVsCm5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Look up comprehensive metadata for any country by 2-letter code, 3-letter code, or name, returning names, ISO codes, region, capital, population, area, currencies, languages, borders, timezones, coordinates, and more.","exampleAgentPrompt":"What are the capital, currency, official languages, and neighboring countries for Germany? Look it up using its ISO alpha2 code 'DE'.","exampleUseCases":null,"resultDescription":"Returns a rich country data object including common and official names, alpha2/alpha3 codes, region and subregion, independence and UN-member status, capital city or cities, population, area in km², landlocked flag, neighboring country codes (alpha3), timezones, currencies with code/name/symbol, languages, international calling code, flag emoji and SVG/PNG URLs, latitude/longitude coordinates, Google Maps and OpenStreetMap links, driving side, and top-level domains.","failureModes":["Country not found for the given code or name — returns 404 or empty result","Ambiguous partial name match when fullText=false returns unexpected country","Invalid alpha2/alpha3 code returns error","Missing required query parameter results in 400 bad request","Payment not included or insufficient — returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need comprehensive, structured country metadata in a single call — especially when you need ISO codes, currencies, languages, borders, timezones, and geographic details together. Prefer this over free-text web search when you need structured, machine-readable country data for enrichment, localization, or geopolitical workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:59:30.468Z","isFirstParty":false}