# Twitter / X Tweets

Extract tweets from Twitter (X) by handle, search keyword, or tweet URL — with full text, date, media, quoted/retweeted content, and all engagement metrics

**Pricing:** $0.25 / 1k tweets

**Endpoint:** `POST /api/v1/agents/twitter/tweets/run`

**Auth:** `Authorization: Bearer mk_live_...`

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `inputs` | array | Yes | One per line. Enter Twitter/X handles (e.g. 'elonmusk' for their timeline incl. retweets), search keywords or advanced-search operators (e.g. 'AI research min_faves:100'), or single tweet URLs. |
| `maxResults` | integer | No | Maximum number of tweets to return. Use 0 for all. |
| `query` | string | No | Optional advanced-search query string (Twitter search operators supported, e.g. 'from:nasa min_retweets:50 since:2026-01-01'). |

## Example

```bash
curl -X POST https://api.mindcase.co/api/v1/agents/twitter/tweets/run \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params":{"inputs":["..."]}}'
```

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/api/v1/agents/twitter/tweets/run",
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {
    "inputs": [
        "..."
    ]
}},
)
data = resp.json()
```

## Get the results

`run` is async and returns a `job_id`. Poll until `status` is `completed`, then read the rows:

```bash
# 1) check status
curl https://api.mindcase.co/api/v1/jobs/JOB_ID \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"

# 2) when status == completed, fetch the rows
curl https://api.mindcase.co/api/v1/jobs/JOB_ID/results \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"
```

Full API reference (auth, jobs, balance, endpoints): https://mindcase.co/skills.md

## Response columns

| Field | Display name | Type |
|-------|--------------|------|
| `tweetUrl` | Tweet URL | url |
| `tweetText` | Tweet Text | text |
| `postedDate` | Posted Date | text |
| `language` | Language | text |
| `conversationId` | Conversation ID | text |
| `views` | Views | number |
| `likes` | Likes | number |
| `retweets` | Retweets | number |
| `replies` | Replies | number |
| `quotes` | Quotes | number |
| `bookmarks` | Bookmarks | number |
| `isReply` | Is Reply | boolean |
| `isQuote` | Is Quote | boolean |
| `isPinned` | Is Pinned | boolean |
| `repliesRestricted` | Replies Restricted | boolean |
| `replyToHandle` | Reply To Handle | text |
| `replyToTweetUrl` | Reply To Tweet URL | url |
| `retweetedTweetUrl` | Retweeted Tweet URL | url |
| `retweetedTweetText` | Retweeted Tweet Text | text |
| `originalPostDate` | Original Post Date | text |
| `quotedTweetUrl` | Quoted Tweet URL | url |
| `quotedTweetText` | Quoted Tweet Text | text |
| `hashtags` | Hashtags | array |
| `mentions` | Mentions | object_array |
| `outboundLinks` | Outbound Links | array |
| `cashtags` | Cashtags | array |
| `linkCardTitle` | Link Card Title | text |
| `linkCardDescription` | Link Card Description | text |
| `linkCardDomain` | Link Card Domain | text |
| `tweetMedia` | Tweet Media | object_array |
| `taggedPlace` | Tagged Place | text |
| `taggedPlaceCountry` | Tagged Place Country | text |
| `author` | Author | object |
