# Openperplex — how to use (mcp.ai)

Connect your Openperplex account and use 8 tools for artificial intelligence straight from your AI agent. Connect with your own API key. Openperplex API provides powerful, global search capabilities and web content analysis for AI applications.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_openperplex?ms=1787291460000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `openperplex_custom_search`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/openperplex`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/openperplex/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/openperplex/custom/search` — Tool to perform a custom search with optional filtering and field selection. Use when you need tailored results based on query, filters, size, or fields.
  - body: { size?: integer, query: string, filter?: object, user_prompt: string, system_prompt: string, exclude_fields?: string[], include_fields?: string[] }
- `POST https://api.mcp.ai/api/openperplex/custom/search/stream` — Tool to perform custom streaming search with custom prompts. Use when you need AI-powered search responses with custom system and user prompts for more specific or tailored queries. Returns aggregated
  - body: { model?: string, top_p?: number, location?: string, search_type?: string, temperature?: number, user_prompt: string, return_images?: boolean, system_prompt: string, recency_filter?: string, return_sources?: boolean }
- `POST https://api.mcp.ai/api/openperplex/get/website/markdown` — Tool to retrieve the markdown content of a specified website. Use after confirming the URL. Supports optional formats like 'gfm' or 'commonmark'.
  - body: { url: string, markdown_format?: string }
- `POST https://api.mcp.ai/api/openperplex/get/website/screenshot` — Tool to capture a screenshot of a website. Use after confirming the target URL is reachable.
  - body: { url: string, full_page?: boolean, viewport_width?: integer, viewport_height?: integer }
- `POST https://api.mcp.ai/api/openperplex/get/website/text` — Tool to retrieve the main text content of a specified website URL. Use when you need content extraction from online articles or pages. Use after confirming the URL is publicly accessible.
  - body: { url: string, clean?: boolean, max_length?: integer, return_type?: string }
- `POST https://api.mcp.ai/api/openperplex/query/from/url` — Tool to query documents from a URL. Use when you need to fetch and interrogate web-hosted content with a natural language question.
  - body: { url: string, model?: string, query: string, answer_type?: string, response_language?: string }
- `POST https://api.mcp.ai/api/openperplex/search` — Tool to search documents using query parameters. Use when you have a search query and optional filters ready.
  - body: { model?: string, query: string, location?: string, answer_type?: string, search_type?: string, date_context?: string, return_images?: boolean, recency_filter?: string, return_sources?: boolean, return_citations?: boolean, response_language?: string }
- `POST https://api.mcp.ai/api/openperplex/search/stream` — Tool to stream search results from OpenPerplex. Use when real-time AI-powered search responses are needed. Returns aggregated text response along with optional sources, images, and citations.
  - body: { model?: string, query: string, location?: string, answer_type?: string, search_type?: string, date_context?: string, return_images?: boolean, recency_filter?: string, return_sources?: boolean, return_citations?: boolean, response_language?: string }

## Example prompts
- "What can I do in Openperplex?"
- "Show me a summary of my Openperplex account"

## More
- Page: https://mcp.ai/openperplex
- Agent spec (llms.txt): https://mcp.ai/openperplex/llms.txt
- Postman collection: https://mcp.ai/openperplex/postman.json
