# Wikimedia Commons on Onekey > 4 endpoints for Wikimedia Commons (4 stable, 0 beta), 1 to 5 credits each. Category: Entertainment, art & culture. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/commons Reference (Markdown): https://onekey.dev/docs/api/commons.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 4 mapped Wikimedia Commons endpoints return each: - `content.id` (string): 4 - `content.title` (string): 4 - `content.text` (string): 2 - `author.displayName` (string): 1 - `content.updatedAt` (ISO 8601 date): 1 - `media.height` (integer): 1 - `media.mimeType` (string): 1 - `media.sizeBytes` (integer): 1 - `media.thumbnailUrl` (URL): 1 - `media.url` (URL): 1 - `media.width` (integer): 1 - `package.license` (string): 1 ## Endpoints ### commons.category_files Files in a Wikimedia Commons category (first 50). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/commons/category_files?category=Cats` with header `x-api-key: YOUR_API_KEY` - Parameters: - `category` (string, required): Category name without the Category: prefix - Fields returned: `content.id`, `content.title` - Reference: https://onekey.dev/docs/api/commons/category_files.md ### commons.file_info Wikimedia Commons file: URL, size, license and description. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/commons/file_info?name=Alan%20turing%20header.jpg` with header `x-api-key: YOUR_API_KEY` - Parameters: - `name` (string, required): File name without File: prefix - Fields returned: `content.id`, `content.title`, `media.url`, `media.thumbnailUrl`, `media.width`, `media.height`, `media.mimeType`, `media.sizeBytes`, `content.text`, `package.license`, `author.displayName` - Reference: https://onekey.dev/docs/api/commons/file_info.md ### commons.random_files Random Wikimedia Commons files. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/commons/random_files` with header `x-api-key: YOUR_API_KEY` - Parameters: none - Fields returned: `content.id`, `content.title` - Reference: https://onekey.dev/docs/api/commons/random_files.md ### commons.search Search Wikimedia Commons files. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/commons/search?q=cat` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `content.id`, `content.title`, `content.text`, `content.updatedAt` - Reference: https://onekey.dev/docs/api/commons/search.md ## Sample request ```bash curl "https://api.onekey.dev/v1/commons/file_info?name=Alan%20turing%20header.jpg" \ -H "x-api-key: YOUR_API_KEY" ```