list_competitors
Retrieve a list of competitors tracked by your organization, including website performance, social media metrics, and marketplace pricing data.
Instructions
List competitors tracked under your organization.
Competitor tracking includes website crawling (PageSpeed, SEO), social media metrics (followers, engagement), and marketplace product prices (Hepsiburada, Trendyol).
Requires enterprise subscription with an org-bound API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (default 50) | |
| offset | No | Pagination offset | |
| org_id | No | Optional — override the org bound to the API key |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/yaparai/tools/enterprise.py:23-47 (handler)Main handler function for the list_competitors tool. Defines the async function with parameters (limit, offset, org_id) and calls the client method enterprise_list_competitors to fetch competitor data from the API.
async def list_competitors( limit: int = 50, offset: int = 0, org_id: str | None = None, ) -> dict: """ List competitors tracked under your organization. Competitor tracking includes website crawling (PageSpeed, SEO), social media metrics (followers, engagement), and marketplace product prices (Hepsiburada, Trendyol). Requires enterprise subscription with an org-bound API key. Args: limit: Max results (default 50) offset: Pagination offset org_id: Optional — override the org bound to the API key Returns: {"competitors": [...], "total": N} — each competitor with id, name, website, notes, created_at. """ client = YaparAIClient() return await client.enterprise_list_competitors(limit=limit, offset=offset, org_id=org_id) - src/yaparai/client.py:319-329 (helper)HTTP client helper method enterprise_list_competitors that sends a GET request to /v1/public/enterprise/competitors with optional X-Organization-Id header and pagination params.
async def enterprise_list_competitors( self, limit: int = 50, offset: int = 0, org_id: str | None = None ) -> dict: """List competitors under the org bound to the API key.""" headers = {"X-Organization-Id": org_id} if org_id else {} return await self._request( "GET", "/v1/public/enterprise/competitors", params={"limit": limit, "offset": offset}, headers=headers, ) - src/yaparai/server.py:177-177 (registration)Registration of list_competitors as an MCP tool via mcp.tool(list_competitors).
mcp.tool(list_competitors) - src/yaparai/server.py:94-101 (registration)Import of list_competitors from yaparai.tools.enterprise module into the server module.
from yaparai.tools.enterprise import ( list_competitors, get_competitor, compare_competitors, list_org_products, create_org_product, update_product_stock, )