Unsplash Without an API Key
April 2026Unsplash has millions of free stock photos. To access them programmatically, you need to register a developer account, create an application, wait for approval, and copy your API key into environment variables.
For a one-off project or a quick prototype, that's a lot of friction for "give me a photo of a coffee shop."
On top of that, Unsplash archived their official JavaScript library (unsplash-js) in 2024. The PHP wrapper is also archived. If you want to use the API, you're writing raw HTTP calls yourself — and you still need the key.
The zero-setup alternative
tteg is a free, open-source tool that searches Unsplash without requiring any registration or API keys. It works three ways:
1. HTTP API (no install)
curl "https://tteg-api-53227342417.asia-south1.run.app/search?q=coffee+shop&n=3"
Returns JSON with real Unsplash image URLs. No headers. No auth. Just GET.
2. CLI (for scripts and agents)
uv tool install tteg tteg save "startup office" ./public/hero --orientation landscape # Saves a real photo to ./public/hero.jpg tteg batch manifest.json # Fills an entire page from a JSON manifest
Works with Claude Code, Cursor, Codex, and any AI coding agent.
3. Embed widget (for websites)
<div data-tteg="coffee shop" data-count="3"></div> <script src="https://tteg.kushalsm.com/embed.js"></script>
Drop two lines into any HTML page. Real photos appear.
How it works
The backend holds Unsplash API keys and handles rotation. You never touch credentials. Free tier is 50 queries per day per IP. The CLI and API are MIT licensed.
It's not a scraper — it uses the official Unsplash API on your behalf, so attribution guidelines still apply.
When you'd use this
Building a landing page and need a hero image. Prototyping a travel site and need location photos. Your AI agent is building a website and stops mid-flow asking for an Unsplash API key. You need photos in a CI pipeline. You want stock photos in a static site generator without managing credentials.
When you need a photo and don't want to register for anything.