Skip to main content

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 identifiers
LicenseIdentifierCommercial useAttribution
CC0cc0YesNot required
Public Domain MarkpdmYesNot required
US government public domainus-gov-pdYesNot required
CC BYcc-byYesRequired
CC BY-SAcc-by-saYes (share alike)Required
CC BY-NDcc-by-ndYes (no derivatives)Required
CC BY-NC, BY-NC-SA, BY-NC-NDcc-by-nc…No (opt-in only)Required

Sources

Example request

Search for commercially usable CC BY or CC0 images
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

Rights fields
FieldMeaning
licenseNormalized license identifier, such as cc0, cc-by, or cc-by-sa.
license_verbatimThe license text exactly as the source published it.
commercialWhether commercial use is permitted.
derivativesWhether derivative works are permitted.
share_alikeWhether derivatives must carry the same license.
attribution_requiredWhether attribution is required.
attributionReady-to-use credit line: title, author, source, license.
provenance_urlThe source page the image was collected from.