
Posted on · 5 min read
11 Free APIs for AI Agents in 2026 (Tested, With Ready-Made Tool Definitions)
On this page · 4 sections
An AI agent is only as useful as the tools you give it. A good tool API answers one clear question per call, returns compact JSON, needs no key or a free one, and stays up. We took 15 popular free APIs, turned each into an agent tool and called them the way an agent would, in October 2026. These 11 made the cut, along with the gotchas we hit, so your agent doesn't hit them too.
Each one links to the AI Tool Generator, pre-filled with a working request, a tool name and a description, ready to copy as an OpenAI or Claude tool definition or a complete MCP server. If you're new to tool calling, start with how to give your AI agent real-time data.
#The list
API | What your agent can do | Tool | Key? |
|---|---|---|---|
Localise answers using the visitor's IP location | | Free key | |
Answer weather questions for any place on Earth | | No | |
Convert currencies with daily reference rates | | No | |
Check public holidays before scheduling anything | | No | |
Ground answers in a short, sourced summary of any topic | | No | |
Quote live crypto prices | | No | |
Turn place names into coordinates for other tools | | No | |
Plan around daylight anywhere | | No | |
Answer questions with official economic statistics | | No | |
Report recent earthquakes worldwide | | No | |
Power a fun Pokémon assistant or Discord bot | | No |
#The APIs in detail
#1. ipstack: localise answers using the visitor's IP location
IP geolocation from APILayer, with a free plan (needs a key). Ask only for the fields you need with fields=. The key stays in an environment variable, never in the tool definition.
curl "https://api.ipstack.com/134.201.250.155?access_key=YOUR_ACCESS_KEY&fields=country_name,region_name,city"Tool: lookup_ip_location, "Look up the country, region and city of an IP address. Use to localise answers (units, currency, language)." Make it an AI tool →
#2. Open-Meteo: answer weather questions for any place on Earth
Fast and reliable in every test. Ask only for the variables you need (current=temperature_2m,precipitation) to keep responses to a few hundred bytes.
curl "https://api.open-meteo.com/v1/forecast?latitude=6.45&longitude=3.39¤t=temperature_2m,precipitation"Tool: get_weather, "Get current weather (temperature in °C, precipitation in mm) for a latitude and longitude. Use when the user asks about weather or what to wear." Make it an AI tool →
#3. Frankfurter: convert currencies with daily reference rates
Daily reference rates from the European Central Bank, so it covers about 30 major currencies. It has no Nigerian naira: tell the model, or it will guess.
curl "https://api.frankfurter.dev/v1/latest?base=USD&symbols=EUR,GBP"Tool: get_exchange_rates, "Get today's exchange rates from a base currency (ISO code like USD) to target currencies (comma-separated codes like EUR,GBP). Covers ECB currencies only." Make it an AI tool →
#4. Nager.Date: check public holidays before scheduling anything
Covers 100+ countries. For Nigeria it lists fixed-date holidays but not the moon-dependent Islamic ones (Eid al-Fitr, Eid al-Adha, Mawlid), which are public holidays there. Put that caveat in the tool description.
curl "https://date.nager.at/api/v3/PublicHolidays/2026/NG"Tool: get_public_holidays, "List public holidays for a year and country (two-letter ISO code like NG or US). Use before scheduling meetings or deliveries." Make it an AI tool →
#5. Wikipedia: ground answers in a short, sourced summary of any topic
The REST summary endpoint returns a short extract (about 2 KB), ideal for grounding facts. The model must pass the exact article title, with underscores for spaces.
curl "https://en.wikipedia.org/api/rest_v1/page/summary/Lagos"Tool: get_wikipedia_summary, "Get the summary of an English Wikipedia article by title (spaces as underscores, e.g. Lagos or Alan_Turing). Use to check facts about people, places and things." Make it an AI tool →
#6. CoinGecko: quote live crypto prices
No key needed for basic price lookups, and responses are tiny (about 50 bytes for two coins). The free tier is rate-limited, so cache prices for a minute or so.
curl "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd"Tool: get_crypto_prices, "Get current prices for cryptocurrencies by CoinGecko id (comma-separated, e.g. bitcoin,ethereum) in fiat currencies (e.g. usd,ngn)." Make it an AI tool →
#7. Nominatim (OpenStreetMap): turn place names into coordinates for other tools
Returned 403 Forbidden until we sent a User-Agent naming our app: its usage policy requires one, and allows one request per second. Pair it with the weather tool so the agent can go from place name to forecast.
curl "https://nominatim.openstreetmap.org/search?q=Yaba,Lagos&format=json&limit=1" -H "User-Agent: YourApp/1.0 (contact@your-site.com)"Tool: geocode_place, "Find the latitude and longitude of a place name or address. Use before calling tools that need coordinates, like weather. Max 1 request per second." Make it an AI tool →
#8. Sunrise and Sunset: plan around daylight anywhere
Times come back in UTC with formatted=0. Tell the model so it converts to local time before answering.
curl "https://api.sunrise-sunset.org/json?lat=6.45&lng=3.39&formatted=0"Tool: get_sun_times, "Get sunrise, sunset and day length (times in UTC) for a latitude and longitude." Make it an AI tool →
#9. World Bank: answer questions with official economic statistics
Hundreds of indicators (GDP, population, inflation) for every country. Responses are verbose JSON arrays; ask for 5 years (per_page=5) rather than the full history.
curl "https://api.worldbank.org/v2/country/NG/indicator/NY.GDP.MKTP.CD?format=json&per_page=5"Tool: get_country_indicator, "Get recent yearly values of a World Bank indicator (e.g. NY.GDP.MKTP.CD for GDP in US$) for a country (two-letter ISO code)." Make it an AI tool →
#10. USGS Earthquakes: report recent earthquakes worldwide
Real-time GeoJSON from the US Geological Survey, worldwide. With minmagnitude and limit set, a response is about 4 KB.
curl "https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&minmagnitude=5&limit=5"Tool: get_recent_earthquakes, "List the most recent earthquakes at or above a minimum magnitude, worldwide, as GeoJSON." Make it an AI tool →
#11. PokéAPI: power a fun Pokémon assistant or Discord bot
Great for fun bots, but Pikachu's full record is 309 KB. Never return it raw: pick the fields you need, or the model's context fills up in one call.
curl "https://pokeapi.co/api/v2/pokemon/pikachu"Tool: get_pokemon, "Get a Pokémon's types, abilities and stats by name or Pokédex number (lowercase, e.g. pikachu)." Make it an AI tool →
#APIs that didn't make the cut (this time)
Four APIs we tested failed on the day, a reminder that free APIs change without warning:
API | What happened |
|---|---|
REST Countries | The v3.1 endpoint redirects to a deprecation notice. Check its docs for the current version before using it. |
Open Library | Search returned 503 errors and 20-second responses. |
Free Dictionary | Returned a Cloudflare 530 error (its origin server was unreachable). |
NASA APOD | The shared |
Before building on any API, check its live status page: we check every API in the directory daily.
#How to choose APIs for your agent
- One question per call. "Weather at these coordinates" is a great tool; "query anything about any city" isn't. Narrow tools are easier for the model to choose and call correctly.
- Small responses. You pay for every token a tool returns. Prefer APIs that let you pick fields (
fields=,current=), and trim the rest in your handler. - Clear errors. APIs that return a useful message on a bad request let the model fix its own mistake.
- Keys stay server-side. Even free keys belong in environment variables, never in prompts or tool descriptions.
- Combine tools. A geocoder plus a weather API gives you "is it raining in Yaba?" The agent chains them itself.
Want these as tools your AI apps can use directly? Wrap them in an MCP server, or browse ready-made ones on our APIs for AI agents page. Looking for AI models themselves rather than tools for them? See our list of free AI APIs.