DEV Community

Alex Spinov
Alex Spinov

Posted on

APIs That Don't Need Authentication (Just Curl and Go)

I spent 30 minutes setting up OAuth for an API I needed once. Then I discovered there are dozens of APIs where you just... make a request. No key. No signup. No OAuth dance.

Here are the best ones I've found.

Financial Data (No Key!)

CoinGecko — Crypto prices for 13,000+ coins

curl -s 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd'
Enter fullscreen mode Exit fullscreen mode
{"bitcoin":{"usd":67234},"ethereum":{"usd":3456}}
Enter fullscreen mode Exit fullscreen mode

SEC EDGAR — Every public company's filings

curl -s 'https://data.sec.gov/submissions/CIK0000320193.json' -H 'User-Agent: MyApp me@email.com'
Enter fullscreen mode Exit fullscreen mode

Apple's 10-K, 10-Q, 8-K filings going back decades. Free.

US Treasury — National debt in real-time

curl -s 'https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v2/accounting/od/debt_to_penny?sort=-record_date&page[size]=1'
Enter fullscreen mode Exit fullscreen mode

Weather & Geo (No Key!)

Open-Meteo — Weather forecasts + 80 years of history

curl -s 'https://api.open-meteo.com/v1/forecast?latitude=40.71&longitude=-74.01&current_weather=true'
Enter fullscreen mode Exit fullscreen mode

IP Geolocation

curl -s http://ip-api.com/json/
Enter fullscreen mode Exit fullscreen mode

Your IP, city, country, ISP, lat/long. That's it.

News & Content (No Key!)

Hacker News — Top stories right now

curl -s https://hacker-news.firebaseio.com/v0/topstories.json | python3 -c "import json,sys; ids=json.loads(sys.stdin.read())[:5]; [print(json.loads(__import__('urllib.request',fromlist=['urlopen']).urlopen(f'https://hacker-news.firebaseio.com/v0/item/{i}.json').read())['title']) for i in ids]"
Enter fullscreen mode Exit fullscreen mode

Wikipedia — Any article as JSON

curl -s 'https://en.wikipedia.org/api/rest_v1/page/summary/Python_(programming_language)' | python3 -c "import json,sys; print(json.loads(sys.stdin.read())['extract'][:200])"
Enter fullscreen mode Exit fullscreen mode

Science & Space (No Key!)

SpaceX — Launch data

curl -s https://api.spacexdata.com/v4/launches/latest | python3 -c "import json,sys; d=json.loads(sys.stdin.read()); print(f'{d[\"name\"]}: {d[\"date_utc\"][:10]}')"
Enter fullscreen mode Exit fullscreen mode

USGS Earthquakes — Real-time seismic data

curl -s 'https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&limit=3&orderby=time'
Enter fullscreen mode Exit fullscreen mode

Fun Ones

# Random dog photo
curl -s https://dog.ceo/api/breeds/image/random | python3 -c "import json,sys; print(json.loads(sys.stdin.read())['message'])"

# Random programming joke
curl -s https://official-joke-api.appspot.com/random_joke

# Pokemon data
curl -s https://pokeapi.co/api/v2/pokemon/pikachu | python3 -c "import json,sys; d=json.loads(sys.stdin.read()); print(f'HP: {d[\"stats\"][0][\"base_stat\"]}  Attack: {d[\"stats\"][1][\"base_stat\"]}')"
Enter fullscreen mode Exit fullscreen mode

The Full List

I compiled 40+ no-auth APIs into an awesome-list: awesome-no-auth-apis

Also check:

What no-auth APIs do you use regularly?

Top comments (0)