Skip to main content
Glama

list_twitterapi_endpoints

Browse and filter Twitter API endpoints by category to find available methods and paths for development tasks.

Instructions

List all TwitterAPI.io API endpoints organized by category.

USE THIS WHEN: You need to browse available endpoints or find endpoints by category. CATEGORIES: user, tweet, community, webhook, stream, action, dm, list, trend

RETURNS: Endpoint names with HTTP method and path for each category.

Input Schema

NameRequiredDescriptionDefault
categoryNoOptional filter: user, tweet, community, webhook, stream, action, dm, list, trend

Input Schema (JSON Schema)

{ "properties": { "category": { "description": "Optional filter: user, tweet, community, webhook, stream, action, dm, list, trend", "enum": [ "user", "tweet", "community", "webhook", "stream", "action", "dm", "list", "trend" ], "type": "string" } }, "type": "object" }

Implementation Reference

  • Handler logic for 'list_twitterapi_endpoints' tool: loads endpoints from docs, categorizes them based on keywords in names, optionally filters by category, generates markdown output listing endpoints grouped by category with method and path.
    case "list_twitterapi_endpoints": { // Validate category (optional) const validation = validateCategory(args.category); if (!validation.valid) { return formatToolError(validation.error); } const endpoints = Object.entries(data.endpoints || {}); const categories = { user: [], tweet: [], list: [], community: [], trend: [], dm: [], action: [], webhook: [], stream: [], other: [], }; for (const [name, ep] of endpoints) { if (name.includes("user") || name.includes("follow")) { categories.user.push({ name, ...ep }); } else if (name.includes("tweet") || name.includes("search") || name.includes("article")) { categories.tweet.push({ name, ...ep }); } else if (name.includes("list")) { categories.list.push({ name, ...ep }); } else if (name.includes("community")) { categories.community.push({ name, ...ep }); } else if (name.includes("trend")) { categories.trend.push({ name, ...ep }); } else if (name.includes("dm")) { categories.dm.push({ name, ...ep }); } else if (name.includes("webhook") || name.includes("rule")) { categories.webhook.push({ name, ...ep }); } else if (name.includes("monitor") || name.includes("stream")) { categories.stream.push({ name, ...ep }); } else if (["login", "like", "retweet", "create", "delete", "upload"].some(k => name.includes(k))) { categories.action.push({ name, ...ep }); } else { categories.other.push({ name, ...ep }); } } if (validation.value && categories[validation.value]) { const filtered = categories[validation.value]; return formatToolSuccess(`## ${validation.value.toUpperCase()} Endpoints (${filtered.length}) ${filtered.map((e) => `- **${e.name}**: ${e.method || "GET"} ${e.path || ""}\n ${e.description || ""}`).join("\n\n")}`); } let output = `# TwitterAPI.io Endpoints (Total: ${endpoints.length})\n\n`; for (const [cat, eps] of Object.entries(categories)) { if (eps.length > 0) { output += `## ${cat.toUpperCase()} (${eps.length})\n`; output += eps.map((e) => `- **${e.name}**: ${e.method || "GET"} ${e.path || ""}`).join("\n"); output += "\n\n"; } } return formatToolSuccess(output); }
  • Tool schema definition including name, description, input schema (optional category enum), and output schema (markdown text content). Part of the tools list returned by ListToolsRequest.
    name: "list_twitterapi_endpoints", description: `List all TwitterAPI.io API endpoints organized by category. USE THIS WHEN: You need to browse available endpoints or find endpoints by category. CATEGORIES: user, tweet, community, webhook, stream, action, dm, list, trend RETURNS: Endpoint names with HTTP method and path for each category.`, inputSchema: { type: "object", properties: { category: { type: "string", description: "Optional filter: user, tweet, community, webhook, stream, action, dm, list, trend", enum: ["user", "tweet", "community", "webhook", "stream", "action", "dm", "list", "trend"] }, }, }, outputSchema: { type: "object", properties: { content: { type: "array", items: { type: "object", properties: { type: { type: "string", enum: ["text"] }, text: { type: "string", description: "Markdown list organized by category (USER, TWEET, WEBHOOK, etc.) with endpoint format: name: METHOD /path" } } } } } } },
  • index.js:894-1120 (registration)
    Registration of all tools including 'list_twitterapi_endpoints' via setRequestHandler for ListToolsRequestSchema.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ { name: "search_twitterapi_docs", description: `Search TwitterAPI.io documentation: API endpoints, guides (pricing, rate limits, filter rules), and blog posts. USE THIS WHEN: You need to find information across the entire documentation. RETURNS: Ranked results with endpoint paths, descriptions, and relevance scores. Examples: - "advanced search" → finds tweet search endpoints - "rate limit" → finds QPS limits and pricing info - "webhook" → finds webhook setup endpoints - "getUserInfo" → finds user info endpoints (supports camelCase)`, inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query (1-500 chars). Use English keywords like: 'search', 'user', 'tweet', 'webhook', 'pricing', 'rate limit'. Supports camelCase and underscore formats.", minLength: 1, maxLength: 500 }, max_results: { type: "integer", description: "Number of results to return. Use higher values (15-20) for comprehensive research, lower values (3-5) for quick lookups.", minimum: 1, maximum: 20, default: 10 } }, required: ["query"], }, outputSchema: { type: "object", properties: { content: { type: "array", items: { type: "object", properties: { type: { type: "string", enum: ["text"] }, text: { type: "string", description: "Markdown formatted search results with sections: API Endpoints (name, method, path, description), Guides (name, title, url), Blog Posts (title, url)" } } } } } } }, { name: "get_twitterapi_endpoint", description: `Get complete documentation for a specific TwitterAPI.io endpoint. USE THIS WHEN: You know the exact endpoint name (e.g., from search results). RETURNS: Full details including path, parameters, cURL example, and code snippets. Common endpoints: - get_user_info, get_user_followers, get_user_following - tweet_advanced_search, get_tweet_by_id - add_webhook_rule, get_webhook_rules`, inputSchema: { type: "object", properties: { endpoint_name: { type: "string", description: "Exact endpoint name (use underscores). Examples: 'get_user_info', 'tweet_advanced_search', 'add_webhook_rule'", }, }, required: ["endpoint_name"], }, outputSchema: { type: "object", properties: { content: { type: "array", items: { type: "object", properties: { type: { type: "string", enum: ["text"] }, text: { type: "string", description: "Markdown with: Title, Endpoint Details (method, path, full URL, doc link), Description, Parameters list (name, required, description), cURL Example, Code Examples, Full Documentation" } } } } } } }, { name: "list_twitterapi_endpoints", description: `List all TwitterAPI.io API endpoints organized by category. USE THIS WHEN: You need to browse available endpoints or find endpoints by category. CATEGORIES: user, tweet, community, webhook, stream, action, dm, list, trend RETURNS: Endpoint names with HTTP method and path for each category.`, inputSchema: { type: "object", properties: { category: { type: "string", description: "Optional filter: user, tweet, community, webhook, stream, action, dm, list, trend", enum: ["user", "tweet", "community", "webhook", "stream", "action", "dm", "list", "trend"] }, }, }, outputSchema: { type: "object", properties: { content: { type: "array", items: { type: "object", properties: { type: { type: "string", enum: ["text"] }, text: { type: "string", description: "Markdown list organized by category (USER, TWEET, WEBHOOK, etc.) with endpoint format: name: METHOD /path" } } } } } } }, { name: "get_twitterapi_guide", description: `Get TwitterAPI.io guide pages for conceptual topics. USE THIS WHEN: You need information about pricing, rate limits, authentication, or filter rules. AVAILABLE GUIDES: pricing, qps_limits, tweet_filter_rules, changelog, introduction, authentication, readme RETURNS: Full guide content with headers, paragraphs, and code examples.`, inputSchema: { type: "object", properties: { guide_name: { type: "string", description: "Guide name: pricing, qps_limits, tweet_filter_rules, changelog, introduction, authentication, readme", enum: ["pricing", "qps_limits", "tweet_filter_rules", "changelog", "introduction", "authentication", "readme"] }, }, required: ["guide_name"], }, outputSchema: { type: "object", properties: { content: { type: "array", items: { type: "object", properties: { type: { type: "string", enum: ["text"] }, text: { type: "string", description: "Markdown with: Title, URL, Overview, Table of Contents, Content paragraphs, Key Points list, Code Examples, Full Content" } } } } } } }, { name: "get_twitterapi_pricing", description: `Get TwitterAPI.io pricing information: credit system, endpoint costs, QPS limits. USE THIS WHEN: You need to know API costs, credit calculations, or rate limits. RETURNS: Pricing tiers, credit costs per endpoint, QPS limits by balance level.`, inputSchema: { type: "object", properties: {}, }, outputSchema: { type: "object", properties: { content: { type: "array", items: { type: "object", properties: { type: { type: "string", enum: ["text"] }, text: { type: "string", description: "Markdown with: Credit System (USD to credits), Endpoint Costs table, Minimum Charge, QPS Limits by balance level, Important Notes, Cost Comparison" } } } } } } }, { name: "get_twitterapi_auth", description: `Get TwitterAPI.io authentication guide: API key usage, headers, code examples. USE THIS WHEN: You need to set up authentication or see request examples. RETURNS: API key header format, base URL, cURL/Python/JavaScript examples.`, inputSchema: { type: "object", properties: {}, }, outputSchema: { type: "object", properties: { content: { type: "array", items: { type: "object", properties: { type: { type: "string", enum: ["text"] }, text: { type: "string", description: "Markdown with: API Key Usage header name, Base URL, Getting Your API Key steps, Request Examples (cURL, Python, JavaScript code blocks)" } } } } } } }, ], }));
  • Helper function validateCategory used in the handler to validate and normalize the optional category input parameter.
    function validateCategory(category) { if (!category) { return { valid: true, value: null }; // Optional parameter } const trimmed = category.trim().toLowerCase(); if (!VALIDATION.CATEGORIES.includes(trimmed)) { return { valid: false, error: { type: ErrorType.INPUT_VALIDATION, message: `Unknown category: "${trimmed}"`, suggestion: `Available categories: ${VALIDATION.CATEGORIES.join(', ')}`, retryable: false } }; } return { valid: true, value: trimmed }; }
  • SLO (Service Level Objective) configuration for list_twitterapi_endpoints tool latency targets.
    list_twitterapi_endpoints: { target: 5, acceptable: 20, alert: 50 }, get_twitterapi_guide: { target: 10, acceptable: 50, alert: 100 },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dorukardahan/twitterapi-docs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server