Creative Commons image API with license and attribution
Lightdrift is an API for finding openly licensed images. It searches 1,852,370 captioned Creative Commons and public domain images from 17 sources, hosts the files, and returns a normalized rights object with every result, so software can decide what it may use and how to credit it without reading license pages.
Updated
Licenses in the index
| License | Identifier | Commercial use | Attribution |
|---|---|---|---|
| CC0 | cc0 | Yes | Not required |
| Public Domain Mark | pdm | Yes | Not required |
| US government public domain | us-gov-pd | Yes | Not required |
| CC BY | cc-by | Yes | Required |
| CC BY-SA | cc-by-sa | Yes (share alike) | Required |
| CC BY-ND | cc-by-nd | Yes (no derivatives) | Required |
| CC BY-NC, BY-NC-SA, BY-NC-ND | cc-by-nc… | No (opt-in only) | Required |
Search returns only commercial-use licenses unless the request opts in to noncommercial ones. You can also restrict results with license_id, attribution_required, or derivatives filters.
Sources
Images come from Wikimedia Commons, Flickr, iNaturalist, the Smithsonian, NASA, US government photo collections, CC0 stock photo sites, and other open collections. Each result links to the page the image and its license were collected from.
Example request
curl https://api.lightdrift.ai/v1/search \
-H "X-API-Key: $LIGHTDRIFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "honeybee on a lavender flower, close up",
"k": 10,
"filters": { "license_id": ["cc0", "cc-by"], "orientation": "landscape" }
}'The rights object
| Field | Meaning |
|---|---|
| license | Normalized license identifier, such as cc0, cc-by, or cc-by-sa. |
| license_verbatim | The license text exactly as the source published it. |
| commercial | Whether commercial use is permitted. |
| derivatives | Whether derivative works are permitted. |
| share_alike | Whether derivatives must carry the same license. |
| attribution_required | Whether attribution is required. |
| attribution | Ready-to-use credit line: title, author, source, license. |
| provenance_url | The source page the image was collected from. |
Rights are reported as declared by the source. For well governed sources such as CC0, Creative Commons, and US government public domain, declarations are reliable in practice, but they remain declarations, and rights beyond copyright (likeness, trademark) are separate. Details are in the rights guide.
Using an agent? The same search is available as an MCP server. Comparing options? See image APIs compared.