Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

Stock Photo APIs: 10 Image Libraries Developers Can Use

A free, open-licence photo API is the quickest way to put good images into an app or site, provided you follow its attribution and rate-limit rules. A licensed stock API is the safer route for a commercial product where every image needs a clear licence, and it's often an enterprise conversation rather than a sign-up form.

What happens to your app the day a user picks a photo, publishes it, and someone else turns out to own the rights? That question, more than search quality or speed, is what separates one stock photo API from another. The code to call any of them is a few lines. The rules that come with the pictures are where the real decisions are.

This page is for developers adding an image picker to a CMS, a design tool, a website builder or an AI product. It covers the two families of API, the situations each one fits, and the limits that shape your build.

Free libraries and licensed libraries

Free photo APIs give you search and download access to a library of images under that library's own licence, usually with conditions such as crediting the source or staying within a request limit. They're quick to start with, and for a blog, a side project or a non-commercial tool they may be all you need.

Licensed stock APIs give you access to a commercial library where images are licensed through your account. You'll get commercial terms written for paying customers, and you'll also get contracts, subscriptions and in some cases an enterprise agreement before you get a key. Adobe states its Stock API is now only available to Stock for Enterprise customers.

A third group sits between them: open collections such as Wikimedia Commons, whose API lets you read each media file along with its licence information. They ask more of you, because you have to read and respect the licence on each item rather than one blanket set of terms.

Who each kind of photo API suits

For a personal blog, a prototype or an internal tool, a free API with a generous request limit is the easy choice. For an educational site, a museum project or a research tool, search an openly licensed collection for your subjects before assuming you'll need a paid library. For a paid product that hands images to customers, I'd want a licensed library, because the licence travels with every image you serve.

If you're building a commercial product

Read the developer terms before you write a line of code. A free API can still come with conditions on commercial use. Flickr's API, for instance, is available for non-commercial use by outside developers, and commercial use is by prior arrangement.

On the licensed side, ask how licensing works inside your app: does each download count against a subscription, do your users need their own accounts, and who holds the licence once an image is used? Shutterstock's API needs a paid subscription to license media, though it has a free option to try the API on its free collection. Get the answers in writing, because they decide your pricing as much as your code.

If attribution has to show on screen

Attribution rules are easy to miss and awkward to retrofit. Pixabay asks that you show users where images came from. A credit line built into the image component from day one, with the photographer's name and the source, is far easier than one squeezed in after launch.

For open collections, the licence can differ from one file to the next. I'd pull the licence and author fields through the API and store them alongside each image, so the credit line stays correct and you can prove where a picture came from.

If your users search in their own words

Search quality is the one thing no documentation page can tell you. Run the same twenty searches your users would type through each API you're considering: plain ones like office desk, awkward ones like diverse team outdoors winter, and a few in another language. Count how many of the top ten results you'd put in front of a customer. You'll see the gap between libraries within an hour.

Free and open-licence image APIs

Unsplash API

A free JSON API for searching and downloading Unsplash photos, with a separate dataset API and an enterprise tier above it.

Pixabay API

Royalty-free images and videos from Pixabay, searched and retrieved through a plain RESTful interface.

Openverse API

Openverse publishes a documented API with a quickstart guide, plus reference pages on authentication and throttling.

Wikimedia Commons API

The MediaWiki API running on Wikimedia Commons, used to search and read media files along with their licence information.

Flickr API

The Flickr Services API, open to outside developers for non-commercial use, with commercial use arranged separately.

Work with me

Want AI doing the heavy lifting in your marketing?

I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.

Licensed and enterprise stock APIs

Shutterstock API

Access to Shutterstock's media library and to account and contributor information, using OAuth, with a free option for trying it out.

Getty Images API

Getty's developer documentation, SDKs and sample code for searching and licensing its library, plus an MCP server and SSO guides.

Adobe Stock API

Adobe's API for building Stock integrations, which is now limited to Stock for Enterprise customers.

Magnific API (Freepik)

Freepik's developer API, now under the Magnific name, carries a stock content endpoint next to image generation and editing.

Depositphotos API suite

A suite of APIs from Depositphotos spanning its stock library, a graphic editor and generative AI tools.

Rate limits and how they shape your build

Rate limits decide your architecture more than you'd expect, so find the limit in the docs before you design the picker. Unsplash's free API plan lists up to a thousand requests per hour with access to all endpoints, while Pixabay allows a hundred requests per sixty seconds by default.

Those numbers sound generous until every keystroke in a search box fires a request. Debouncing the search box, caching popular queries and reusing thumbnails you've already fetched all cut the call count. Whether caching is allowed at all depends on each API's terms, so read them before you store anything on your own servers.

Access can change, too. Pexels' own API page says new API key issuance is currently paused, which is why it isn't on this list.

Do you make stock photo APIs? Tool makers can ask to be considered for a featured place on this list.

What these APIs cost to run

Free APIs cost your development time and the obligations in their terms. Licensed APIs follow a few different models: a subscription that covers licensing, a credit balance spent per action, or an enterprise agreement negotiated with the vendor. Freepik's developer docs, now titled Magnific API, use a credit-based system.

Prices aren't published in the same way across these vendors, so look at each pricing page and, for the enterprise ones, ask for a quote that matches your expected download volume. Ask what counts as a download, too: a preview, a comp image or only a full-size licensed file.

Video works the same way, with its own set of libraries; the round-up of video APIs covers that side. And if your users will crop, resize or retouch what they pick, pair the API with something from the list of free photo editing software.

Twenty searches and one rate-limit error before you integrate

Sign up for two APIs, one free and one licensed if you can get a key. Run your twenty searches, check the licence and credit fields that come back with each result, and hit the rate limit on purpose to see the error you get. Then write down, in one paragraph, what your app must show and store for every image. If you can't write that paragraph, you're not ready to choose.

Want your tool on this list? Featured spots and reviews here are paid partnerships. Here's how to partner with me.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.