{
  "$schema": "https://modelcontextprotocol.io/schema/mcp.json",
  "name": "captapi",
  "title": "Captapi",
  "description": "Official Captapi MCP server. Gives AI agents structured public data from 32 platforms — including YouTube, TikTok, Instagram, Facebook, X/Twitter, Reddit, LinkedIn, Threads, Pinterest, Twitch, Spotify, Ad Library, TikTok Shop, GitHub, Kwai, and link-in-bio pages — with transcripts, summaries, comments, profiles, search, commerce data, and ad intelligence.",
  "instructions_for_agent": "Before installing, you need a Captapi API key, and key creation requires a human. If you do not already have a capt_live_... key, your FIRST action must be to ask the user to create one at https://captapi.com/dashboard/api-keys (100 free credits, no card) and paste it back. Do not sign up or guess a key. Then add the config from \"clients\" below and restart the client.",
  "version": "0.4.0",
  "homepage": "https://captapi.com",
  "documentation": "https://captapi.com/docs/integrations",
  "llms_txt": "https://captapi.com/llms.txt",
  "llms_full_txt": "https://captapi.com/llms-full.txt",
  "package": {
    "registry": "npm",
    "name": "@captapi/mcp"
  },
  "cli": {
    "package": {
      "registry": "npm",
      "name": "@captapi/cli"
    },
    "bin": "captapi",
    "description": "Official command-line interface. Calls the same API from the terminal; every endpoint is a subcommand, params are flags, output is JSON.",
    "install": "npm install -g @captapi/cli",
    "examples": [
      "npx @captapi/cli login",
      "npx @captapi/cli balance",
      "npx @captapi/cli list",
      "npx @captapi/cli youtube-transcript --url \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\"",
      "npx @captapi/cli agent add cursor"
    ],
    "auth": "Reads CAPTAPI_API_KEY env var or ~/.captapi/config.json (via `captapi login`)."
  },
  "n8n": {
    "package": {
      "registry": "npm",
      "name": "n8n-nodes-captapi"
    },
    "type": "n8n-community-node",
    "description": "Official n8n community node. Exposes all endpoints as a single Captapi node (Platform → Operation) for no-code/low-code workflows.",
    "install": "In n8n: Settings → Community Nodes → install `n8n-nodes-captapi` (self-hosted: `npm install n8n-nodes-captapi`, then restart n8n).",
    "credential": "Create a 'Captapi API' credential with your capt_live_... key; Base URL defaults to the Captapi API.",
    "auth": "Captapi API credential (API key). The credential test calls /v1/account/limits."
  },
  "make": {
    "type": "make-custom-app",
    "description": "Captapi custom app for Make.com (Integromat). Exposes all endpoints as action modules grouped by platform for no-code scenarios.",
    "install": "Add the Captapi app in Make, or deploy the local app from packages/captapi-make with the Make Apps Editor.",
    "credential": "Create a 'Captapi API Key' connection with your capt_live_... key; verified against /v1/account/limits.",
    "auth": "Authorization: Bearer <CAPTAPI_API_KEY> (set on the connection)."
  },
  "apify": {
    "type": "apify-actor",
    "description": "Captapi Actor on Apify (bring-your-own-key wrapper around the REST API, no scraping). Pick an operation, get one dataset item with the same JSON.",
    "install": "Run the Captapi Actor on Apify, or push the source in packages/captapi-apify with `apify push`.",
    "credential": "Set the apiKey input to your capt_live_... key (stored encrypted). Credits are billed to your own Captapi account.",
    "auth": "Authorization: Bearer <CAPTAPI_API_KEY> (sent by the Actor)."
  },
  "transport": "stdio",
  "command": "npx",
  "args": [
    "-y",
    "@captapi/mcp"
  ],
  "remote": {
    "transport": "http",
    "url": "https://api.captapi.com/mcp",
    "auth_header": "Authorization: Bearer <CAPTAPI_API_KEY>",
    "alt_auth_header": "x-api-key: <CAPTAPI_API_KEY>",
    "note": "Hosted MCP — no install required. Add the url to your client and pass your capt_live_... key via header.",
    "clients": {
      "cursor": {
        "file": "~/.cursor/mcp.json",
        "config": {
          "mcpServers": {
            "captapi": {
              "url": "https://api.captapi.com/mcp",
              "headers": {
                "Authorization": "Bearer capt_live_xxxxxxxxxxxxxxxx"
              }
            }
          }
        }
      },
      "claude_code": {
        "command": "claude mcp add --transport http captapi https://api.captapi.com/mcp --header \"Authorization: Bearer capt_live_xxxxxxxxxxxxxxxx\""
      },
      "vscode": {
        "file": ".vscode/mcp.json",
        "config": {
          "servers": {
            "captapi": {
              "url": "https://api.captapi.com/mcp",
              "headers": {
                "Authorization": "Bearer capt_live_xxxxxxxxxxxxxxxx"
              }
            }
          }
        }
      }
    }
  },
  "env": {
    "CAPTAPI_API_KEY": {
      "required": true,
      "description": "Your capt_live_... API key. Create one at https://captapi.com/dashboard/api-keys"
    },
    "CAPTAPI_BASE_URL": {
      "required": false,
      "default": "https://api.captapi.com",
      "description": "Override the Captapi API base URL."
    }
  },
  "auth": {
    "type": "api_key",
    "obtain": "https://captapi.com/dashboard/api-keys",
    "note": "Sign-up and key creation require a human and cannot be automated. If you do not have a key, ask the user to create one and paste it."
  },
  "setup": [
    "A human creates an API key once at https://captapi.com/dashboard/api-keys (100 free credits on signup).",
    "Pick a transport: 'remote' (hosted, just a URL — no install) or stdio (local via npx).",
    "Add the matching server config to your MCP client and restart it."
  ],
  "clients": {
    "cursor": {
      "file": "~/.cursor/mcp.json",
      "config": {
        "mcpServers": {
          "captapi": {
            "command": "npx",
            "args": [
              "-y",
              "@captapi/mcp"
            ],
            "env": {
              "CAPTAPI_API_KEY": "capt_live_xxxxxxxxxxxxxxxx"
            }
          }
        }
      }
    },
    "claude_desktop": {
      "file": "claude_desktop_config.json",
      "config": {
        "mcpServers": {
          "captapi": {
            "command": "npx",
            "args": [
              "-y",
              "@captapi/mcp"
            ],
            "env": {
              "CAPTAPI_API_KEY": "capt_live_xxxxxxxxxxxxxxxx"
            }
          }
        }
      }
    },
    "vscode": {
      "file": ".vscode/mcp.json",
      "config": {
        "servers": {
          "captapi": {
            "command": "npx",
            "args": [
              "-y",
              "@captapi/mcp"
            ],
            "env": {
              "CAPTAPI_API_KEY": "capt_live_xxxxxxxxxxxxxxxx"
            }
          }
        }
      }
    }
  },
  "tools": {
    "count": 179,
    "platform_count": 32,
    "naming": "platform_action",
    "examples": [
      "youtube_transcript",
      "tiktok_comments",
      "instagram_channel_posts",
      "facebook_page_details",
      "github_repository",
      "google_ad_library_company_ads",
      "tiktok_shop_user_showcase"
    ]
  },
  "api": {
    "base_url": "https://api.captapi.com",
    "auth_header": "Authorization: Bearer <CAPTAPI_API_KEY>",
    "docs": "https://captapi.com/apis",
    "openapi": "https://api.captapi.com/v1/openapi.json",
    "endpoint_reference": "https://captapi.com/llms-full.txt"
  },
  "agent_usage": {
    "recommended_path": "Use hosted MCP first; use local stdio MCP when the client cannot connect to remote HTTP MCP; use REST as a fallback.",
    "key_policy": "Ask the human for a capt_live_... key. Never sign up automatically, guess keys, commit keys, or print keys in logs.",
    "parameter_policy": "Use each tool schema exactly. Some endpoints require username, repo, advertiser, creative_id, q, or limit instead of url. For url parameters, the URL platform must match the tool platform: do not pass a YouTube URL to a TikTok tool, or a TikTok URL to a YouTube tool. If the URL platform differs from the requested tool, switch to the matching platform tool or ask the user for the correct URL.",
    "retry_policy": "Do not retry 401/402; ask the user to fix auth or credits. Retry 429/502 with backoff. Do not retry 400 platform mismatch; choose the endpoint matching the URL's platform or ask for the correct URL. Do not loop on 422/not-found/no-captions.",
    "output_policy": "Return the API data object by default; include cached and creditsUsed only when relevant."
  },
  "routing_hints": [
    {
      "intent": "Competitive ad intelligence / ad creative research",
      "user_phrases": [
        "Rakibin reklamlarını bul",
        "Show me ads for this advertiser",
        "Analyze ad creatives for a brand",
        "Google Ads Transparency Center data"
      ],
      "prefer": "Use Ad Library endpoints before generic search.",
      "endpoint": {
        "slug": "google-ad-library-company-ads",
        "method": "GET",
        "path": "/v1/ad-library/google/company-ads",
        "url": "https://api.captapi.com/v1/ad-library/google/company-ads",
        "mcp_tool": "google_ad_library_company_ads",
        "params": [
          {
            "name": "advertiser",
            "type": "string",
            "required": true,
            "description": "Advertiser name, domain (e.g. nike.com), or Google advertiser ID (AR…). Prefer AR… from advertiser-search."
          },
          {
            "name": "country",
            "type": "string",
            "required": false,
            "description": "Two-letter ISO country / region code (soft filter). Default US. Alias: region."
          },
          {
            "name": "region",
            "type": "string",
            "required": false,
            "description": "Alias for country."
          },
          {
            "name": "start_date",
            "type": "string",
            "required": false,
            "description": "YYYY-MM-DD — keep creatives whose shown window overlaps this start."
          },
          {
            "name": "end_date",
            "type": "string",
            "required": false,
            "description": "YYYY-MM-DD — keep creatives whose shown window overlaps this end."
          },
          {
            "name": "sort",
            "type": "string",
            "required": false,
            "description": "Client-side sort: last_shown (recent activity first) or first_shown. Default is ATC order."
          },
          {
            "name": "cursor",
            "type": "string",
            "required": false,
            "description": "Pagination cursor from nextCursor."
          },
          {
            "name": "topic",
            "type": "string",
            "required": false,
            "description": "Only \"all\" is supported (commercial ATC)."
          },
          {
            "name": "limit",
            "type": "integer",
            "required": false,
            "description": "Max items to return (default 20, max 200). Flat 2 credits per call."
          },
          {
            "name": "cache",
            "type": "boolean",
            "required": false,
            "description": "Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."
          }
        ],
        "docs": "https://captapi.com/apis/google-ad-library-company-ads"
      },
      "why": "Returns Google ad library results for an advertiser/domain and is better than generic Google Search for paid-ad research."
    },
    {
      "intent": "Meta/Facebook ad transcript or creative text",
      "user_phrases": [
        "Facebook reklam metnini çıkar",
        "Get the transcript/text from this Meta ad",
        "Analyze copy from an ad library URL"
      ],
      "prefer": "Use the transcript endpoint when the user wants ad copy/text, not ad metadata.",
      "endpoint": {
        "slug": "facebook-ad-library-ad-transcript",
        "method": "GET",
        "path": "/v1/ad-library/facebook/ad-transcript",
        "url": "https://api.captapi.com/v1/ad-library/facebook/ad-transcript",
        "mcp_tool": "facebook_ad_library_ad_transcript",
        "params": [
          {
            "name": "url",
            "type": "string",
            "required": true,
            "description": "Meta Ad Library ad URL or ad ID. The URL platform must match this endpoint's platform. Do not pass cross-platform URLs, e.g. YouTube to TikTok, Instagram to Facebook, LinkedIn to X/Twitter, or Pinterest to Rumble."
          },
          {
            "name": "cache",
            "type": "boolean",
            "required": false,
            "description": "Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."
          }
        ],
        "docs": "https://captapi.com/apis/facebook-ad-library-ad-transcript"
      },
      "why": "Extracts the creative text from a Meta/Facebook Ad Library ad."
    },
    {
      "intent": "TikTok Shop product or creator commerce research",
      "user_phrases": [
        "TikTok Shop ürünlerini ara",
        "Find products promoted by this TikTok creator",
        "Creator showcase products",
        "TikTok commerce intelligence"
      ],
      "prefer": "Use TikTok Shop endpoints before generic TikTok profile/video endpoints.",
      "endpoint": {
        "slug": "tiktok-shop-user-showcase",
        "method": "GET",
        "path": "/v1/tiktok-shop/user-showcase",
        "url": "https://api.captapi.com/v1/tiktok-shop/user-showcase",
        "mcp_tool": "tiktok_shop_user_showcase",
        "params": [
          {
            "name": "username",
            "type": "string",
            "required": true,
            "description": "TikTok username, @handle, or profile URL, e.g. jeffreestar or https://www.tiktok.com/@jeffreestar."
          },
          {
            "name": "limit",
            "type": "integer",
            "required": false,
            "description": "Max items to return (default 20, max 200). Billed per result."
          },
          {
            "name": "cache",
            "type": "boolean",
            "required": false,
            "description": "Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."
          }
        ],
        "docs": "https://captapi.com/apis/tiktok-shop-user-showcase"
      },
      "why": "Returns products a TikTok creator is promoting in their Shop showcase (affiliate shelf), not a full brand store catalog."
    },
    {
      "intent": "GitHub repository intelligence",
      "user_phrases": [
        "Bu GitHub reposunu analiz et",
        "Get repo stars forks and metadata",
        "Analyze open source project",
        "GitHub repository details"
      ],
      "prefer": "Use GitHub endpoints for repo/user intelligence instead of parsing GitHub pages.",
      "endpoint": {
        "slug": "github-repository",
        "method": "GET",
        "path": "/v1/github/repository",
        "url": "https://api.captapi.com/v1/github/repository",
        "mcp_tool": "github_repository",
        "params": [
          {
            "name": "repo",
            "type": "string",
            "required": true,
            "description": "Repository URL or owner/name, e.g. torvalds/linux or https://github.com/torvalds/linux."
          },
          {
            "name": "cache",
            "type": "boolean",
            "required": false,
            "description": "Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."
          }
        ],
        "docs": "https://captapi.com/apis/github-repository"
      },
      "why": "Returns structured repository metadata, stars, forks, owner, and URLs."
    },
    {
      "intent": "Facebook Marketplace geo/location autocomplete",
      "user_phrases": [
        "Marketplace lokasyon ara",
        "Find Facebook Marketplace location id",
        "Search marketplace by city"
      ],
      "prefer": "Use location resolve when the city name is ambiguous or you need cityPageId/lat/lng; otherwise pass the city string straight to marketplace-search.",
      "endpoint": {
        "slug": "facebook-marketplace-location-search",
        "method": "GET",
        "path": "/v1/facebook/marketplace-location-search",
        "url": "https://api.captapi.com/v1/facebook/marketplace-location-search",
        "mcp_tool": "facebook_marketplace_location_search",
        "params": [
          {
            "name": "q",
            "type": "string",
            "required": true,
            "description": "City/place query. Bare names like 'Austin' may return multiple candidates (TX/MN/IN); include a state for a single hit (e.g. 'Austin, TX')."
          },
          {
            "name": "limit",
            "type": "integer",
            "required": false,
            "description": "Max items to return (default 10, max 50). Flat 2 credits per call."
          },
          {
            "name": "cache",
            "type": "boolean",
            "required": false,
            "description": "Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."
          }
        ],
        "docs": "https://captapi.com/apis/facebook-marketplace-location-search"
      },
      "why": "Returns Facebook cityPageId + coordinates so you can disambiguate hubs (Austin TX vs Austin MN) before searching."
    },
    {
      "intent": "Kwai creator monitoring",
      "user_phrases": [
        "Kwai profilini çek",
        "Kwai user posts",
        "Analyze this Kwai creator"
      ],
      "prefer": "Use Kwai endpoints for https://www.kwai.com/@handle or @handle URLs.",
      "endpoint": {
        "slug": "kwai-user-posts",
        "method": "GET",
        "path": "/v1/kwai/user-posts",
        "url": "https://api.captapi.com/v1/kwai/user-posts",
        "mcp_tool": "kwai_user_posts",
        "params": [
          {
            "name": "url",
            "type": "string",
            "required": true,
            "description": "Kwai profile URL or @handle, e.g. https://www.kwai.com/@topfilmeseseriesnatv. The URL platform must match this endpoint's platform. Do not pass cross-platform URLs, e.g. YouTube to TikTok, Instagram to Facebook, LinkedIn to X/Twitter, or Pinterest to Rumble."
          },
          {
            "name": "limit",
            "type": "number",
            "required": false,
            "description": "Max posts to return (1–200). Default 20. ~1 credit per post returned (min 2)."
          },
          {
            "name": "cursor",
            "type": "string",
            "required": false,
            "description": "Opaque pagination cursor from the previous nextCursor. Pages within posts from one profile fetch."
          },
          {
            "name": "cache",
            "type": "boolean",
            "required": false,
            "description": "Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."
          }
        ],
        "docs": "https://captapi.com/apis/kwai-user-posts"
      },
      "why": "Lists Kwai user posts with normalized metadata."
    },
    {
      "intent": "Link-in-bio page extraction",
      "user_phrases": [
        "Bu link in bio sayfasındaki linkleri çıkar",
        "Extract Komi/Pillar/Linkbio/Linkme profile links",
        "Creator landing page links"
      ],
      "prefer": "Use the specific link-in-bio platform endpoint when the domain is known.",
      "endpoint": {
        "slug": "linkbio-page",
        "method": "GET",
        "path": "/v1/linkbio/page",
        "url": "https://api.captapi.com/v1/linkbio/page",
        "mcp_tool": "linkbio_page",
        "params": [
          {
            "name": "url",
            "type": "string",
            "required": true,
            "description": "Linkbio (lnk.bio) page URL or username, e.g. https://lnk.bio/charlidamelio. The URL platform must match this endpoint's platform. Do not pass cross-platform URLs, e.g. YouTube to TikTok, Instagram to Facebook, LinkedIn to X/Twitter, or Pinterest to Rumble."
          },
          {
            "name": "cache",
            "type": "boolean",
            "required": false,
            "description": "Set true to serve from the response cache (default TTL). Default false — always fetch fresh. Prefer cacheMaxAge when you need 1d–30d freshness control. Envelope includes cached + cachedAt on hits."
          },
          {
            "name": "cacheMaxAge",
            "type": "string",
            "required": false,
            "description": "Max age of a cached response: 1d, 3d, 7d, 14d, or 30d. When set, enables caching with that TTL (SC cache_max_age). Envelope: cached + cachedAt."
          }
        ],
        "docs": "https://captapi.com/apis/linkbio-page"
      },
      "why": "Extracts public Linkbio profile metadata and outgoing links."
    },
    {
      "intent": "Alternative social network monitoring",
      "user_phrases": [
        "Truth Social hesabını izle",
        "Kick clip metadata",
        "Rumble channel videos",
        "Monitor emerging social platforms"
      ],
      "prefer": "Use Truth Social endpoints only for prominent public accounts — most handles require auth and 404.",
      "endpoint": {
        "slug": "truth-social-user-posts",
        "method": "GET",
        "path": "/v1/truth-social/user-posts",
        "url": "https://api.captapi.com/v1/truth-social/user-posts",
        "mcp_tool": "truth_social_user_posts",
        "params": [
          {
            "name": "url",
            "type": "string",
            "required": true,
            "description": "Truth Social profile URL or @username. The URL platform must match this endpoint's platform. Do not pass cross-platform URLs, e.g. YouTube to TikTok, Instagram to Facebook, LinkedIn to X/Twitter, or Pinterest to Rumble."
          },
          {
            "name": "limit",
            "type": "integer",
            "required": false,
            "description": "Max posts to return (default 20, max 80). Capped at 80 because Truth Social's statuses page is ~40 items — use nextCursor for more pages. Flat 2 credits per call. Response `source` is native or extended."
          },
          {
            "name": "cursor",
            "type": "string",
            "required": false,
            "description": "Pagination cursor. Leave empty for the first page; then pass the nextCursor value returned in the previous response."
          },
          {
            "name": "cache",
            "type": "boolean",
            "required": false,
            "description": "Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."
          }
        ],
        "docs": "https://captapi.com/apis/truth-social-user-posts"
      },
      "why": "Fetches public Truths for prominent accounts that Truth Social still exposes without login."
    }
  ]
}