apilayer/restcountries — reverse-engineered prompt
Reverse engineered prompt
Build me a simple country info API in Java, basically a REST service where I can look up countries in a bunch of common ways and get JSON back. I want endpoints to return all countries, search by country name or exact full name, look up a single country by its two or three letter code, look up multiple codes at once, and search by currency, language, capital city, calling code, region, and regional bloc.
Each country response should include the usual details people expect, like name, native name, country codes, capital, region, population, area, time zones, borders, currencies, languages, translations, and flag URL when available. Please also support a fields query so I can request only certain properties instead of the full payload.
Make it easy to run locally and include a few example requests and responses so someone can quickly test it. If anything in the old public REST Countries docs has changed, look up the current details online and keep the behavior as close as practical.
Want more depth? Deep Reverse