# Public Commons Media Search

## Links

- Product page URL: https://www.agentpmt.com/marketplace/public-commons-media-search
- Product markdown URL: https://www.agentpmt.com/marketplace/public-commons-media-search?format=agent-md
- Product JSON URL: https://www.agentpmt.com/marketplace/public-commons-media-search?format=agent-json

## Overview

- Product ID: 696ef640fb2f7d26fd1ef7ab
- Vendor: Apoth3osis
- Type: function
- Unit type: request
- Price: 500 credits
- Categories: Web Scraping & Data Collection, Synthetic Data Generation, Automation, 3D Design & Modeling, Graphic Design & Layout, Image Generation & Manipulation, Stock Media & Asset Libraries, Marketing Automation, Task & Workflow Automation, Academic & Scientific Research
- Generated at: 2026-05-30T20:25:50.051Z

### Page Description

Let AI agents search Wikipedia and Wikimedia Commons to discover and download free images, audio, video, and other public media assets. The tool provides simple actions for page title search, listing media on a page, fetching file URLs (thumbnail, preferred, original), and direct Commons media search with pagination, enabling agentic content sourcing and research workflows with clear file description and licensing context.

### Agent Description

Search Wikipedia and Wikimedia Commons for free images, audio, video. Get file URLs and licensing info. Supports pagination.

## Details

### Details

Let AI agents search Wikipedia and Wikimedia Commons to discover and download free images, audio, video, and other public media assets. The tool provides simple actions for page title search, listing media on a page, fetching file URLs (thumbnail, preferred, original), and direct Commons media search with pagination, enabling agentic content sourcing and research workflows with clear file description and licensing context.

### Actions

- `search_titles` (5 credits): Search Wikipedia for article titles matching a query. Returns matching pages with title, description, and excerpt.
- `list_page_media` (5 credits): List all media files (images, audio, video) embedded on a specific Wikipedia page.
- `get_file` (5 credits): Retrieve detailed file metadata and URLs (original, preferred, thumbnail) for a specific media file.
- `search_commons_media` (5 credits): Search Wikimedia Commons directly for media files (images, audio, video, SVGs). Supports pagination for browsing large result sets.

### Use Cases

Agentic media discovery, Search Wikimedia Commons files by keyword, Find free images for articles, Retrieve media download URLs, Check file description and license pages, Collect public media assets for presentations, Build datasets of public images, Source audio or video clips for projects

### Workflows Using This Tool

No public workflows currently reference this product.

### Related Content

No related content is currently linked to this product.

## Integration Details

### DynamicMCP

- Setup page URL: https://www.agentpmt.com/dynamic-mcp
- Claude setup guide: https://www.agentpmt.com/dynamic-mcp?platform=claude#videos
- ChatGPT setup guide: https://www.agentpmt.com/dynamic-mcp?platform=chatgpt#videos
- Cursor setup guide: https://www.agentpmt.com/dynamic-mcp?platform=cursor#videos
- Windsurf setup guide: https://www.agentpmt.com/dynamic-mcp?platform=windsurf#videos

Use the local router for command-based MCP clients. It forwards requests to `https://api.agentpmt.com/mcp` and does not execute tools locally.

```bash
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

### REST API

The live page renders cURL, Python, JavaScript, and Node.js examples. Logged-in users see those examples prefilled with their own API and budget credentials.

- Purchase endpoint: https://api.agentpmt.com/products/purchase
- Authorization format: `Bearer <base64(apiKey:budgetKey)>`

```bash
curl -X POST "https://api.agentpmt.com/products/purchase" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eW91ci1hcGkta2V5LWhlcmU6eW91ci1idWRnZXQta2V5LWhlcmU=" \
  -d '{
    "product_id": "696ef640fb2f7d26fd1ef7ab",
    "parameters": {
      "action": "search_titles",
      "q": "example_q",
      "project": "wikipedia",
      "language": "en",
      "limit": 50
    }
  }'
```

### Autonomous Agents

Autonomous agents can access this tool through AgentAddress credit balances or direct x402 payments. Use the Autonomous Agent API reference for endpoint shapes after choosing the access pattern below.

- Autonomous Agent API reference URL: https://www.agentpmt.com/docs/api-reference/autonomous-agents
- Autonomous Agent API reference markdown URL: https://www.agentpmt.com/docs/api-reference/autonomous-agents?format=agent-md
- Credit-Based Access Using AgentAddress: https://www.agentpmt.com/docs/autonomous-agents/credit-based-tool-usage-with-agentaddress
- AgentAddress is preferred for persistent file access, stored platform state, and maximum tool use ability across repeated calls.
- Direct x402 is for independent one-off tool calls that do not require shared files or stored platform state.
- Direct x402 public payments: USDC on Base, Arbitrum, Optimism, Polygon, and Avalanche.

### Schema

#### Parameters

- Schema type: actions

```json
{
  "actions": {
    "search_titles": {
      "description": "Search Wikipedia for article titles matching a query. Returns matching pages with title, description, and excerpt.",
      "properties": {
        "q": {
          "type": "string",
          "description": "Search query string.",
          "required": true
        },
        "project": {
          "type": "string",
          "description": "Wikimedia project (e.g., 'wikipedia'). Must not be 'commons' for this action.",
          "required": false,
          "default": "wikipedia"
        },
        "language": {
          "type": "string",
          "description": "Language code (e.g., 'en', 'fr', 'de').",
          "required": false,
          "default": "en"
        },
        "limit": {
          "type": "integer",
          "description": "Maximum number of results to return.",
          "required": false,
          "default": 50,
          "minimum": 1,
          "maximum": 50
        }
      }
    },
    "list_page_media": {
      "description": "List all media files (images, audio, video) embedded on a specific Wikipedia page.",
      "properties": {
        "title": {
          "type": "string",
          "description": "Canonical page title (e.g., 'Solar_eclipse', 'Golden_Gate_Bridge').",
          "required": true
        },
        "project": {
          "type": "string",
          "description": "Wikimedia project (e.g., 'wikipedia'). Must not be 'commons' for this action.",
          "required": false,
          "default": "wikipedia"
        },
        "language": {
          "type": "string",
          "description": "Language code (e.g., 'en', 'fr', 'de').",
          "required": false,
          "default": "en"
        }
      }
    },
    "get_file": {
      "description": "Retrieve detailed file metadata and URLs (original, preferred, thumbnail) for a specific media file.",
      "properties": {
        "file_title": {
          "type": "string",
          "description": "Full file title including the 'File:' prefix (e.g., 'File:Example.jpg').",
          "required": true
        },
        "project": {
          "type": "string",
          "description": "Wikimedia project. Set to 'commons' when the file is hosted on Wikimedia Commons.",
          "required": false,
          "default": "wikipedia"
        },
        "language": {
          "type": "string",
          "description": "Language code (e.g., 'en'). Required when project is not 'commons'.",
          "required": false,
          "default": "en"
        }
      }
    },
    "search_commons_media": {
      "description": "Search Wikimedia Commons directly for media files (images, audio, video, SVGs). Supports pagination for browsing large result sets.",
      "properties": {
        "q": {
          "type": "string",
          "description": "Search query string.",
          "required": true
        },
        "limit": {
          "type": "integer",
          "description": "Maximum number of results to return.",
          "required": false,
          "default": 50,
          "minimum": 1,
          "maximum": 50
        },
        "offset": {
          "type": "integer",
          "description": "Pagination offset. Use the next_offset value from a previous response to get the next page.",
          "required": false,
          "default": 0,
          "minimum": 0
        }
      }
    }
  },
  "properties": {
    "action": {
      "type": "string",
      "description": "Action to perform",
      "required": true,
      "default": "search_titles",
      "enum": [
        "get_instructions",
        "search_titles",
        "list_page_media",
        "get_file",
        "search_commons_media"
      ]
    },
    "file_title": {
      "type": "string",
      "description": "File title including 'File:' prefix (used by get_file)",
      "required": false
    },
    "language": {
      "type": "string",
      "description": "Language code (e.g., 'en'). Not used for Commons.",
      "required": false,
      "default": "en"
    },
    "limit": {
      "type": "integer",
      "description": "Maximum results to return (search_titles, search_commons_media)",
      "required": false,
      "default": 50,
      "minimum": 1,
      "maximum": 50
    },
    "offset": {
      "type": "integer",
      "description": "Pagination offset for search_commons_media",
      "required": false,
      "minimum": 0
    },
    "project": {
      "type": "string",
      "description": "Wikimedia project (e.g., 'wikipedia'). Use 'commons' only for get_file when file_description_url indicates Commons.",
      "required": false,
      "default": "wikipedia"
    },
    "q": {
      "type": "string",
      "description": "Search query string (used by search_titles and search_commons_media)",
      "required": false
    },
    "title": {
      "type": "string",
      "description": "Canonical page title (used by list_page_media)",
      "required": false
    }
  }
}
```

### Usage Instructions

# Public Commons Media Search

Search Wikipedia and Wikimedia Commons to discover public media assets, find article titles, list media on pages, and retrieve file URLs with metadata.

## Actions

### search_titles

Search Wikipedia for article titles matching a query.

**Required fields:**
- `action`: `"search_titles"`
- `q`: Search query string

**Optional fields:**
- `project`: Wikimedia project (default: `"wikipedia"`). Must NOT be `"commons"`.
- `language`: Language code (default: `"en"`)
- `limit`: Maximum results, 1-50 (default: 50)

**Example:**
```json
{
  "action": "search_titles",
  "q": "solar eclipse",
  "language": "en",
  "limit": 10
}
```

Returns a list of matching pages with title, description, and excerpt.

---

### list_page_media

List all media files (images, audio, video) embedded on a specific Wikipedia page.

**Required fields:**
- `action`: `"list_page_media"`
- `title`: Canonical page title (e.g., `"Solar_eclipse"`)

**Optional fields:**
- `project`: Wikimedia project (default: `"wikipedia"`). Must NOT be `"commons"`.
- `language`: Language code (default: `"en"`)

**Example:**
```json
{
  "action": "list_page_media",
  "title": "Golden_Gate_Bridge",
  "language": "en"
}
```

Returns a list of media items found on the page.

---

### get_file

Retrieve detailed file metadata and URLs (original, preferred, thumbnail) for a specific media file.

**Required fields:**
- `action`: `"get_file"`
- `file_title`: Full file title including the `File:` prefix (e.g., `"File:Example.jpg"`)

**Optional fields:**
- `project`: Wikimedia project (default: `"wikipedia"`). Set to `"commons"` when the file is hosted on Wikimedia Commons.
- `language`: Language code (default: `"en"`). Required when project is not `"commons"`.

**Example — Wikipedia file:**
```json
{
  "action": "get_file",
  "file_title": "File:Golden_Gate_Bridge_20100906.jpg",
  "project": "wikipedia",
  "language": "en"
}
```

**Example — Commons file:**
```json
{
  "action": "get_file",
  "file_title": "File:Hubble_ultra_deep_field.jpg",
  "project": "commons"
}
```

Returns the file title, description URL, and links to original, preferred, and thumbnail versions of the file.

---

### search_commons_media

Search Wikimedia Commons directly for media files (images, audio, video, SVGs). Supports pagination for browsing large result sets.

**Required fields:**
- `action`: `"search_commons_media"`
- `q`: Search query string

**Optional fields:**
- `limit`: Maximum results, 1-50 (default: 50)
- `offset`: Pagination offset (default: 0). Use the `next_offset` value from a previous response to get the next page.

**Example:**
```json
{
  "action": "search_commons_media",
  "q": "northern lights aurora",
  "limit": 10
}
```

**Pagination example:**
```json
{
  "action": "search_commons_media",
  "q": "northern lights aurora",
  "limit": 10,
  "offset": 10
}
```

Returns matching file titles, page IDs, and text snippets. Includes `next_offset` when more results are available.

---

## Common Workflows

### Find and download a Wikipedia image
1. Use `search_titles` to find the article (e.g., `"q": "Eiffel Tower"`)
2. Use `list_page_media` with the returned title to see all media on the page
3. Use `get_file` with the desired `file_title` (include the `File:` prefix) to get the direct URL

### Search Commons for stock-style media
1. Use `search_commons_media` with a descriptive query (e.g., `"q": "sunset over ocean"`)
2. Pick a result and use `get_file` with `project` set to `"commons"` and the file title to get URLs

### Browse media in another language
- Set `language` to any valid code (e.g., `"fr"`, `"de"`, `"ja"`) when using `search_titles`, `list_page_media`, or `get_file` with Wikipedia

## Important Notes

- The `file_title` parameter must always include the `File:` prefix (e.g., `"File:Example.png"`).
- The `project` parameter should be set to `"commons"` only for `get_file` when the file is hosted on Wikimedia Commons. For `search_titles` and `list_page_media`, use `"wikipedia"` (the default).
- `search_commons_media` always searches Wikimedia Commons regardless of the `project` or `language` settings.
- All media found through this tool is from Wikimedia projects and is generally available under open licenses (Creative Commons, public domain, etc.). Always check the file description page for specific license terms.
- Results are capped at 50 per request. Use `offset` with `search_commons_media` to paginate through larger result sets.

### Frequently Asked Questions

#### How do I connect this tool to an external agent?

- Page URL: https://www.agentpmt.com/faq
- Markdown URL: https://www.agentpmt.com/faq?format=agent-md

You can install the local MCP server by opening a terminal and running:

```
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

This will connect you to local agents like Claude Code, Windsurf, Grok Build, Cursor, etc.

Alternatively you can connect to the hosted version with this config block, no installation required:

```
{
  "mcpServers": {
    "agentpmt": {
      "type": "streamable-http",
      "url": "https://api.agentpmt.com/mcp",
      "headers": {
        "Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
        "x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
      }
    }
  }
}
```

[View MCP Connection Instructions](/docs/mcp-reference/connection) for more details.

#### How does an external agent use this tool?

- Page URL: https://www.agentpmt.com/faq
- Markdown URL: https://www.agentpmt.com/faq?format=agent-md

After the external agent is connected to an Agent Group that can use this tool, paste this prompt into the agent:

> Call the AgentPMT-Tool-Search-and-Execution tool with action 'get\_schema' and tool\_id 696ef640fb2f7d26fd1ef7ab ("Public Commons Media Search"). Then call the same tool with action 'call\_tool', tool\_id 696ef640fb2f7d26fd1ef7ab, and the parameters needed for my request.

The agent should fetch the tool schema first, collect the required parameters for your request, and then call the tool through AgentPMT.

### Dependencies

This product has no public dependency products.