# TwitterShots

```json
{
  "name": "TwitterShots",
  "slug": "twittershots",
  "url": "https://composio.dev/toolkits/twittershots",
  "markdown_url": "https://composio.dev/toolkits/twittershots.md",
  "logo_url": "https://logos.composio.dev/api/twittershots",
  "categories": [
    "social media"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-10-04T15:10:53.825Z"
}
```

![TwitterShots logo](https://logos.composio.dev/api/twittershots)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with TwitterShots MCP or direct API to render X post screenshots, fetch tweet content, check API usage, and capture public post references through natural language.

## Summary

TwitterShots is an API service that renders public X posts as clean screenshots and retrieves tweet content.
Use it to capture social posts, extract tweet text, and track API usage without building screenshot infrastructure.

## Categories

- social media

## Toolkit Details

- Tools: 5

## Images

- Logo: https://logos.composio.dev/api/twittershots

## Authentication

- **Api Key**
  - Type: `api_key`
  - Description: Api Key authentication for TwitterShots.
  - Setup:
    - Configure Api Key credentials for TwitterShots.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- Screenshot this public X product review
- Fetch tweet text from this URL
- Check my TwitterShots API usage

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `TWITTERSHOTS_GENERATE_TEMPORARY_SCREENSHOT_URL` | Generate Temporary Screenshot URL | Render a public tweet or post and return a provider-hosted temporary URL. Download the result promptly or use Generate Tweet Screenshot when it must be retained. A successful render consumes one API credit. |
| `TWITTERSHOTS_GENERATE_TWEET_SCREENSHOT` | Generate Tweet Screenshot | Render a public tweet or post as an SVG, PNG, or HTML file suitable for saving. A successful render consumes one API credit. |
| `TWITTERSHOTS_GET_API_USAGE` | Get API Usage | Return the remaining and total TwitterShots API credits for the connected API key. This read does not consume a credit. |
| `TWITTERSHOTS_GET_BULK_TWEET_CONTENT` | Get Bulk Tweet Content | Fetch up to 100 public tweets as one Markdown document. Inspect the returned Markdown for a 'Failed to fetch tweets' section because individual IDs can fail within an HTTP 200 response. A successful bulk request consumes one API credit. |
| `TWITTERSHOTS_GET_TWEET_CONTENT` | Get Tweet Content | Fetch one public tweet as structured Markdown, with optional statistics, media links, and quoted-tweet content. A successful call consumes one API credit. |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
```python
pip install composio composio_openai openai
```

```typescript
npm install @composio/core @composio/openai openai
```

#### Path 1, Step 2: Create a Composio session

Initialize Composio with the OpenAI Responses provider and create a session scoped to TwitterShots
```python
import json
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
client = OpenAI()

session = composio.create(user_id="your-user-id", toolkits=["twittershots"])
tools = session.tools()
```

```typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["twittershots"] });
const tools = await session.tools();
```

#### Path 1, Step 3: Run TwitterShots tools with your agent

Send a request, execute the TwitterShots tool calls through the session, and print the final answer
```python
response = client.responses.create(
    model="gpt-5.6-sol",
    tools=tools,
    input=[{"role": "user", "content": "Render a screenshot of this public X post and return its tweet text: https://x.com/ComposioHQ/status/1234567890"}],
)

while True:
    tool_calls = [o for o in response.output if o.type == "function_call"]
    if not tool_calls:
        break
    results = composio.provider.handle_tool_calls(response=response, session=session)
    response = client.responses.create(
        model="gpt-5.6-sol",
        tools=tools,
        previous_response_id=response.id,
        input=[
            {"type": "function_call_output", "call_id": call.call_id, "output": json.dumps(results[i])}
            for i, call in enumerate(tool_calls)
        ],
    )

print(response.output_text)
```

```typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Render a screenshot of this public X post and return its tweet text: https://x.com/ComposioHQ/status/1234567890" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK and your agent framework
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
```

#### Path 2, Step 2: Create a session with MCP enabled

Create a session scoped to TwitterShots and read its MCP URL and headers
```python
from composio import Composio

composio = Composio()
session = composio.create(user_id="your-user-id", toolkits=["twittershots"], mcp=True)
```

```typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["twittershots"],
  mcp: true,
});
```

#### Path 2, Step 3: Connect your agent to the MCP server

Pass the session's MCP URL and headers to your agent and run a TwitterShots request
```python
import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, AssistantMessage, TextBlock

options = ClaudeAgentOptions(
    mcp_servers={
        "composio": {
            "type": "http",
            "url": session.mcp.url,
            "headers": session.mcp.headers,
        }
    },
    system_prompt="You are a helpful assistant with access to TwitterShots tools.",
    tools=[],
    allowed_tools=["mcp__composio__*"],
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query("Render a screenshot of this public X post and return its tweet text: https://x.com/ComposioHQ/status/1234567890")
        async for message in client.receive_response():
            if isinstance(message, AssistantMessage):
                for block in message.content:
                    if isinstance(block, TextBlock):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Render a screenshot of this public X post and return its tweet text: https://x.com/ComposioHQ/status/1234567890",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
```

## Why Use Composio?

### 1. AI Native TwitterShots Integration

- Supports both TwitterShots MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable screenshot and tweet lookup actions
- Rich coverage for rendering public X posts, retrieving tweet content, and checking TwitterShots API usage

### 2. Managed Auth

- Secure API key handling so you don't hard-code TwitterShots credentials in your agent
- Central place to manage, scope, and revoke TwitterShots access
- Per user and per environment credentials for safer production workflows

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Clear tool schemas help agents choose the right TwitterShots action for screenshots, tweet content, or usage checks
- Comprehensive execution logs so you always know what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC so you control which agents and users can access TwitterShots
- Scoped, least privilege access to TwitterShots resources
- Full audit trail of agent actions to support review and compliance

## Use TwitterShots with any AI Agent Framework

Choose a framework you want to connect TwitterShots with:

None listed.

## Related Toolkits

- [Twitter](https://composio.dev/toolkits/twitter) - Twitter is a social media platform for sharing real-time updates, conversations, and news. Stay connected, informed, and engaged with communities worldwide.
- [Instagram](https://composio.dev/toolkits/instagram) - Instagram is a social platform for sharing photos, videos, and stories with your audience. It helps brands and creators engage, grow, and analyze their online presence.
- [Ayrshare](https://composio.dev/toolkits/ayrshare) - Ayrshare is a Social Media API for managing, automating, and analyzing posts across multiple platforms. It helps you streamline social media workflows and centralize analytics.
- [DEV Community](https://composio.dev/toolkits/devto) - DEV Community (dev.to) is a social publishing platform for software developers. Use it to share technical articles, grow a developer audience, and join community discussions.
- [Dotsimple](https://composio.dev/toolkits/dotsimple) - Dotsimple is a social media management platform for planning, creating, and publishing content. It helps teams boost their reach with AI-powered content generation and actionable analytics.
- [Just One API](https://composio.dev/toolkits/just_one_api) - Just One API is a unified platform providing public social, creator, entertainment, and ecommerce data. Use it to query standardized, metered datasets across hundreds of endpoints for research and product insights.
- [Pinterest](https://composio.dev/toolkits/pinterest) - Pinterest is a visual discovery platform for recipes, home ideas, style inspiration, travel plans, and more. It helps people save, organize, and revisit ideas through Pins and Boards.
- [Strava](https://composio.dev/toolkits/strava) - Strava is a social fitness network and app for cyclists and runners. It's perfect for tracking workouts, sharing progress, and joining active communities.
- [TikHub](https://composio.dev/toolkits/tik_hub) - TikHub is a social metadata API that exposes supported TikTok and social metadata routes. It provides consistent, API-key-based access to public metadata without cookies or device signatures.
- [Tiktok](https://composio.dev/toolkits/tiktok) - Tiktok is a short-form video platform for creating, sharing, and discovering viral content. It helps creators and brands reach massive audiences with creative tools and global social features.
- [Twitch](https://composio.dev/toolkits/twitch) - Twitch is a live streaming platform for gamers, creators, and communities. It enables real-time interaction, monetization, and community building.
- [Upload-Post](https://composio.dev/toolkits/upload_post) - Upload-Post is a social publishing API for posting, scheduling, and managing content across social networks. Use it to run multi-channel content workflows through one clean API instead of separate platform integrations.
- [Gmail](https://composio.dev/toolkits/gmail) - Gmail is Google's email service with powerful spam protection, search, and G Suite integration. It keeps your inbox organized and makes communication fast and reliable.
- [Google Calendar](https://composio.dev/toolkits/googlecalendar) - Google Calendar is a time management service for scheduling meetings, events, and reminders. It streamlines personal and team organization with integrated notifications and sharing options.
- [Google Drive](https://composio.dev/toolkits/googledrive) - Google Drive is a cloud storage platform for uploading, sharing, and collaborating on files. It's perfect for keeping your documents accessible and organized across devices.
- [Outlook](https://composio.dev/toolkits/outlook) - Outlook is Microsoft's email and calendaring platform for unified communications and scheduling. It helps users stay organized with powerful email, contacts, and calendar management.
- [Google Sheets](https://composio.dev/toolkits/googlesheets) - Google Sheets is a cloud-based spreadsheet tool for real-time collaboration and data analysis. It lets teams work together from anywhere, updating information instantly.
- [Supabase](https://composio.dev/toolkits/supabase) - Supabase is an open-source backend platform offering scalable Postgres databases, authentication, storage, and real-time APIs. It lets developers build modern apps without managing infrastructure.
- [Composio](https://composio.dev/toolkits/composio) - Composio is an integration platform that connects AI agents with hundreds of business tools. It streamlines authentication and lets you trigger actions across services—no custom code needed.
- [Notion](https://composio.dev/toolkits/notion) - Notion is a collaborative workspace for notes, docs, wikis, and tasks. It streamlines team knowledge, project tracking, and workflow customization in one place.

## Frequently Asked Questions

### Do I need my own developer credentials to use TwitterShots with Composio?

Yes, TwitterShots requires you to configure your own API key. Once set up, Composio handles secure credential storage and API request handling for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
