Skip to content

Licensed photo and video search

$0.005 per callUSDC via x402POST /api/licensed-media-search

Find photos and videos you can reuse, with the license on every result.

Category: Web & documentsTags: images photos video stock license creative-commons public-domain search

Try in playground →

Details

Searches Wikimedia Commons and returns up to 20 files per call, each with its file link, preview, size, author, license, license link and a credit line ready to paste. Filter to public domain files, or to files with no share-alike condition, and by minimum width. Files marked as showing nudity or sexual acts are left out. Author and license are what each file page records; read the page before you publish. Not affiliated with or endorsed by the Wikimedia Foundation.

Parameters

NameTypeRequiredDescription
qstringyesWhat the photo or video shows, in a few words. Also accepted as query, search, term, keyword. Up to 200 characters. The example sends lighthouse sunset.
typestring (one of: photo, video)nophoto (JPEG files, the default; some are scans or paintings) or video. One of photo, video.
licensestring (one of: any, no-share-alike, public-domain)noany (the default), no-share-alike (public domain or credit only) or public-domain. One of any, no-share-alike, public-domain.
minWidthinteger (1-20000)noSmallest width in pixels. From 1 to 20000.
limitinteger (1-20)noFiles to return (default 10, at most 20). From 1 to 20. The example sends 2.
offsetinteger (0-1000)noWhere to start: the nextOffset of the answer before. From 0 to 1000.

Example request

curl -i -X POST https://agent402.tools/api/licensed-media-search \
  -H "Content-Type: application/json" \
  -d '{"q":"lighthouse sunset","limit":2}'

Watch a call get paid

RequestPOST /api/licensed-media-search
402$0.005 USDC
SignPAYMENT-SIGNATURE
Settleon 14 chains
Answer200 OK
ReceiptAgent402-ReceiptEd25519

Example response

{
  "query": "lighthouse sunset",
  "type": "photo",
  "license": "any",
  "files": [
    {
      "title": "Cape May Lighthouse September 2020 002",
      "type": "photo",
      "contentType": "image/jpeg",
      "url": "https://upload.wikimedia.org/wikipedia/commons/a/a3/Cape_May_Lighthouse_September_2020_002.jpg",
      "previewUrl": "https://thumb.wikimedia.org/wikipedia/commons/thumb/a/a3/Cape_May_Lighthouse_September_2020_002.jpg/960px-Cape_May_Lighthouse_September_2020_002.jpg",
      "pageUrl": "https://commons.wikimedia.org/wiki/File:Cape_May_Lighthouse_September_2020_002.jpg",
      "width": 5700,
      "height": 3800,
      "bytes": 5217122,
      "author": "King of Hearts",
      "license": "CC BY-SA 4.0",
      "licenseUrl": "https://creativecommons.org/licenses/by-sa/4.0",
      "licenseFamily": "share-alike",
      "creditRequired": true,
      "creditLine": "\"Cape May Lighthouse September 2020 002\" by King of Hearts, CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0), via Wikimedia Commons",
      "restrictions": []
    }
  ],
  "returned": 1,
  "matched": 2,
  "complete": false,
  "truncated": true,
  "matchedIsLowerBound": true,
  "nextOffset": 1,
  "filesRead": 1,
  "explicitLeftOut": 0,
  "source": {
    "name": "Wikimedia Commons",
    "url": "https://commons.wikimedia.org"
  },
  "readAt": "2026-12-04T15:20:32.106Z",
  "note": "Author, license and restrictions are what each file page records. Read the file page before you publish: people, trademarks and buildings in a picture can need permission of their own."
}
FieldTypeAlways presentIn the example
querystringyeslighthouse sunset
typestringyesphoto
licensestringyesany
filesarray of objectsyes1 item in the example
returnednumberyes1
matchednumberyes2
completebooleanyesfalse
truncatedbooleanyestrue
matchedIsLowerBoundbooleanyestrue
nextOffsetnumberyes1
filesReadnumberyes1
explicitLeftOutnumberyes0
sourceobjectyes2 fields: name, url
readAtstringyes2026-12-04T15:20:32.106Z
notestringyesAuthor, license and restrictions are what each file page records. Read the fi...

From an MCP client

catalog.call {
  "slug": "licensed-media-search",
  "params": {
    "q": "lighthouse sunset",
    "limit": 2
  }
}

Hosted connector (https://agent402.tools/mcp): paid in the call. Stdio package (npx -y agent402-mcp@0.20.1): pays from a wallet or AGENT402_CREDITS_KEY.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.005" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/licensed-media-search", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "q": "lighthouse sunset",
    "limit": 2
  }),
});

Get a wallet or run npx -y agent402-mcp@0.20.1 wallet new.

The quote (Python)

import base64, json, urllib.error, urllib.request

req = urllib.request.Request("https://agent402.tools/api/licensed-media-search", method="POST", data="{\"q\":\"lighthouse sunset\",\"limit\":2}".encode(), headers={"Content-Type": "application/json"})
try:
    urllib.request.urlopen(req)
except urllib.error.HTTPError as e:
    quote = json.loads(base64.b64decode(e.headers["PAYMENT-REQUIRED"]))
    print(e.code, [(a["network"], a["amount"]) for a in quote["accepts"]])  # the price, per chain, in base units

Related tools