New to Corsair? See API access, authentication, and error handling.
Balance
get
balance.get
Get the API key balance (free, not billed)
Risk: read
await corsair.twittrapi.api.balance.get({});
| Name | Type | Required | Description |
|---|---|---|---|
user_id | number | No | — |
balance | number | No | — |
price_per_call | number | No | — |
is_active | boolean | No | — |
Communities
getById
communities.getById
Get community details by ID
Risk: read
await corsair.twittrapi.api.communities.getById({});
| Name | Type | Required | Description |
|---|---|---|---|
communityId | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object | null | Yes | — |
data full type
data full type
{
id: string,
name: string,
description: string,
createdAt: string | null,
memberCount: number,
moderatorCount: number,
joinPolicy: string | null,
nsfw: boolean,
topic: string | null,
bannerUrl: string | null,
creator: {
id: string,
username: string
} | null,
rules: {
id: string,
name: string,
description: string
}[]
} | null
getMembers
communities.getMembers
Get members of a community
Risk: read
await corsair.twittrapi.api.communities.getMembers({});
| Name | Type | Required | Description |
|---|---|---|---|
communityId | string | Yes | — |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
{
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
}[]
getModerators
communities.getModerators
Get moderators of a community
Risk: read
await corsair.twittrapi.api.communities.getModerators({});
| Name | Type | Required | Description |
|---|---|---|---|
communityId | string | Yes | — |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
{
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
}[]
getTweets
communities.getTweets
Get tweets posted in a community
Risk: read
await corsair.twittrapi.api.communities.getTweets({});
| Name | Type | Required | Description |
|---|---|---|---|
communityId | string | Yes | — |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
(
{
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
}
)[]
search
communities.search
Search X communities by keyword
Risk: read
await corsair.twittrapi.api.communities.search({});
| Name | Type | Required | Description |
|---|---|---|---|
searchTerm | string | Yes | Keyword, URL-encoded by the client |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
{
id: string,
name: string,
description: string,
createdAt: string | null,
memberCount: number,
moderatorCount: number,
joinPolicy: string | null,
nsfw: boolean,
topic: string | null,
bannerUrl: string | null,
creator: {
id: string,
username: string
} | null,
rules: {
id: string,
name: string,
description: string
}[]
}[]
Lists
getDetails
lists.getDetails
Get X list details by list ID
Risk: read
await corsair.twittrapi.api.lists.getDetails({});
| Name | Type | Required | Description |
|---|---|---|---|
listId | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object | null | Yes | — |
data full type
data full type
{
id: string,
name: string,
description: string,
createdAt: string | null,
memberCount: number,
followerCount: number,
private: boolean,
bannerUrl: string | null,
owner: {
id: string,
username: string
} | null
} | null
getFollowers
lists.getFollowers
Get followers of an X list
Risk: read
await corsair.twittrapi.api.lists.getFollowers({});
| Name | Type | Required | Description |
|---|---|---|---|
listId | string | Yes | — |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
{
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
}[]
getMembers
lists.getMembers
Get members of an X list
Risk: read
await corsair.twittrapi.api.lists.getMembers({});
| Name | Type | Required | Description |
|---|---|---|---|
listId | string | Yes | — |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
{
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
}[]
getTweets
lists.getTweets
Get tweets from an X list timeline
Risk: read
await corsair.twittrapi.api.lists.getTweets({ listId: '84839422', count: 20 });
| Name | Type | Required | Description |
|---|---|---|---|
listId | string | Yes | — |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
(
{
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
}
)[]
Monitors
addAccounts
monitors.addAccounts
Watch X accounts for new tweets (up to 100 per request)
Risk: write
await corsair.twittrapi.api.monitors.addAccounts({ usernames: ['XDevelopers'] });
| Name | Type | Required | Description |
|---|---|---|---|
username | string | No | Single handle to watch |
userId | string | No | Single numeric user ID to watch |
usernames | string[] | No | Handles to watch, up to 100 per request |
userIds | string[] | No | Numeric user IDs to watch, up to 100 per request |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
plan | object | No | — |
data full type
data full type
{
input: string,
userId?: string,
username?: string,
status?: string,
error?: string
}[]
plan full type
plan full type
{
planId?: string,
maxAccounts?: number,
usedAccounts?: number,
latencyClass?: string,
status?: string
}
createWebhook
monitors.createWebhook
Add a webhook for watched-account tweet events
Risk: write
await corsair.twittrapi.api.monitors.createWebhook({ url: 'https://example.com/hooks/twittrapi', label: 'Production' });
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Public https URL, no redirects |
label | string | No | — |
accounts | string[] | null | No | X user IDs to forward. Null (default) = all watched accounts |
| Name | Type | Required | Description |
|---|---|---|---|
webhook | object | Yes | — |
webhook full type
webhook full type
{
id: number,
url: string,
label?: string | null,
accounts?: string[] | null,
secret?: string,
active: boolean,
failureCount?: number,
disabledAt?: string | null,
disabledReason?: string | null,
lastSuccessAt?: string | null,
lastFailureAt?: string | null,
createdAt?: string
}
deleteWebhook
monitors.deleteWebhook
Remove an account-monitoring webhook
Risk: destructive · Irreversible
await corsair.twittrapi.api.monitors.deleteWebhook({});
| Name | Type | Required | Description |
|---|---|---|---|
webhookId | string | number | Yes | — |
getDeliveries
monitors.getDeliveries
Show latest monitor events with delivery status
Risk: read
await corsair.twittrapi.api.monitors.getDeliveries({});
| Name | Type | Required | Description |
|---|---|---|---|
limit | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
data full type
data full type
{
event: string,
id: string,
monitoredUserId: string,
tweetId: string,
tweetCreatedAt: string,
detectedAt: string,
tweet?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
},
webhookId?: string | number,
status?: string,
attempts?: number,
deliveredAt?: string | null,
lastError?: string | null
}[]
getEvents
monitors.getEvents
Pull monitor events after an event ID (7-day retention)
Risk: read
await corsair.twittrapi.api.monitors.getEvents({ since: '1849203', limit: 100 });
| Name | Type | Required | Description |
|---|---|---|---|
since | string | No | Event ID (exclusive) or RFC 3339 time. Oldest kept events when omitted |
limit | number | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextSince | string | No | — |
hasMore | boolean | No | — |
data full type
data full type
{
event: string,
id: string,
monitoredUserId: string,
tweetId: string,
tweetCreatedAt: string,
detectedAt: string,
tweet?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
},
status?: string,
attempts?: number,
deliveredAt?: string | null,
lastError?: string | null
}[]
getPlan
monitors.getPlan
Get the account-monitoring plan and webhooks
Risk: read
await corsair.twittrapi.api.monitors.getPlan({});
| Name | Type | Required | Description |
|---|---|---|---|
plan | object | No | — |
webhooks | object[] | No | — |
plan full type
plan full type
{
planId?: string,
maxAccounts?: number,
usedAccounts?: number,
latencyClass?: string,
status?: string
}
webhooks full type
webhooks full type
{
id: number,
url: string,
label?: string | null,
accounts?: string[] | null,
secret?: string,
active: boolean,
failureCount?: number,
disabledAt?: string | null,
disabledReason?: string | null,
lastSuccessAt?: string | null,
lastFailureAt?: string | null,
createdAt?: string
}[]
getWebhook
monitors.getWebhook
Get one account-monitoring webhook
Risk: read
await corsair.twittrapi.api.monitors.getWebhook({});
| Name | Type | Required | Description |
|---|---|---|---|
webhookId | string | number | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
webhook | object | Yes | — |
webhook full type
webhook full type
{
id: number,
url: string,
label?: string | null,
accounts?: string[] | null,
secret?: string,
active: boolean,
failureCount?: number,
disabledAt?: string | null,
disabledReason?: string | null,
lastSuccessAt?: string | null,
lastFailureAt?: string | null,
createdAt?: string
}
listAccounts
monitors.listAccounts
List watched X accounts and plan usage
Risk: read
await corsair.twittrapi.api.monitors.listAccounts({});
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
plan | object | No | — |
data full type
data full type
{
userId: string,
username: string,
state: string,
stage?: string,
latencyClass?: string,
subscribedAt?: string,
monitoringSince?: string | null,
filters?: {
replies: boolean,
retweets: boolean,
quotes: boolean
}
}[]
plan full type
plan full type
{
planId?: string,
maxAccounts?: number,
usedAccounts?: number,
latencyClass?: string,
status?: string
}
listWebhooks
monitors.listWebhooks
List account-monitoring webhooks, oldest first
Risk: read
await corsair.twittrapi.api.monitors.listWebhooks({});
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
data full type
data full type
{
id: number,
url: string,
label?: string | null,
accounts?: string[] | null,
secret?: string,
active: boolean,
failureCount?: number,
disabledAt?: string | null,
disabledReason?: string | null,
lastSuccessAt?: string | null,
lastFailureAt?: string | null,
createdAt?: string
}[]
removeAccount
monitors.removeAccount
Stop watching an X account
Risk: destructive · Irreversible
await corsair.twittrapi.api.monitors.removeAccount({});
| Name | Type | Required | Description |
|---|---|---|---|
usernameOrId | string | Yes | Watched handle or numeric user ID |
testWebhook
monitors.testWebhook
Send a signed test event to a webhook
Risk: write
await corsair.twittrapi.api.monitors.testWebhook({});
| Name | Type | Required | Description |
|---|---|---|---|
webhookId | string | number | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
ok | boolean | Yes | — |
statusCode | number | No | — |
latencyMs | number | No | — |
error | string | No | — |
updateAccount
monitors.updateAccount
Change a watched account’s reply/retweet/quote filters
Risk: write
await corsair.twittrapi.api.monitors.updateAccount({ usernameOrId: 'XDevelopers', filters: { replies: false } });
| Name | Type | Required | Description |
|---|---|---|---|
usernameOrId | string | Yes | Watched handle or numeric user ID |
filters | object | Yes | Reply/retweet/quote filters. Omitted fields keep their value |
filters full type
filters full type
{
replies?: boolean,
retweets?: boolean,
quotes?: boolean
}
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
userId: string,
username: string,
state: string,
stage?: string,
latencyClass?: string,
subscribedAt?: string,
monitoringSince?: string | null,
filters?: {
replies: boolean,
retweets: boolean,
quotes: boolean
}
}
updateWebhook
monitors.updateWebhook
Change a webhook URL, filter, secret, or active flag
Risk: write
await corsair.twittrapi.api.monitors.updateWebhook({});
| Name | Type | Required | Description |
|---|---|---|---|
webhookId | string | number | Yes | Webhook ID |
url | string | No | — |
label | string | No | — |
accounts | string[] | null | No | — |
rotateSecret | boolean | No | — |
active | boolean | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
webhook | object | Yes | — |
webhook full type
webhook full type
{
id: number,
url: string,
label?: string | null,
accounts?: string[] | null,
secret?: string,
active: boolean,
failureCount?: number,
disabledAt?: string | null,
disabledReason?: string | null,
lastSuccessAt?: string | null,
lastFailureAt?: string | null,
createdAt?: string
}
Trends
getByLocation
trends.getByLocation
Get trending topics by location (WOEID, 1 = worldwide)
Risk: read
await corsair.twittrapi.api.trends.getByLocation({ locationId: '1' });
| Name | Type | Required | Description |
|---|---|---|---|
locationId | string | Yes | Yahoo WOEID. 1 = worldwide, 23424977 = United States |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
{
name: string,
query: string,
url: string,
tweetVolume: number | null
}[]
getLocations
trends.getLocations
List available trend locations (WOEIDs)
Risk: read
await corsair.twittrapi.api.trends.getLocations({});
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | No | — |
previousCursor | string | null | No | — |
hasNextPage | boolean | No | — |
data full type
data full type
{
woeid: number,
name: string,
country: string,
countryCode: string | null,
placeType: string,
parentId: number | null
}[]
Tweets
getById
tweets.getById
Get a single tweet by ID
Risk: read
await corsair.twittrapi.api.tweets.getById({ tweetId: '2019881223666233717' });
| Name | Type | Required | Description |
|---|---|---|---|
tweetId | string | Yes | Numeric tweet ID at the end of the tweet URL |
| Name | Type | Required | Description |
|---|---|---|---|
data | object | null | Yes | — |
data full type
data full type
{
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null
getQuotes
tweets.getQuotes
Get quote tweets for a tweet
Risk: read
await corsair.twittrapi.api.tweets.getQuotes({});
| Name | Type | Required | Description |
|---|---|---|---|
tweetId | string | Yes | — |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
(
{
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
}
)[]
getReplies
tweets.getReplies
Get a tweet with its replies in display order
Risk: read
await corsair.twittrapi.api.tweets.getReplies({});
| Name | Type | Required | Description |
|---|---|---|---|
tweetId | string | Yes | — |
rankingMode | Relevance | Recency | Likes | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
(
{
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
}
)[]
getRetweeters
tweets.getRetweeters
Get users who retweeted a tweet
Risk: read
await corsair.twittrapi.api.tweets.getRetweeters({});
| Name | Type | Required | Description |
|---|---|---|---|
tweetId | string | Yes | — |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
{
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
}[]
search
tweets.search
Search X tweets (Top, Latest, Photos, Videos tabs)
Risk: read
await corsair.twittrapi.api.tweets.search({ searchItem: 'from:XDevelopers', category: 'Latest', count: 20 });
| Name | Type | Required | Description |
|---|---|---|---|
searchItem | string | Yes | Search query, e.g. “from:jack lang:en” |
category | Top | Latest | Photos | Videos | No | Search tab. Defaults to Top |
count | number | No | — |
cursor | string | No | nextCursor from the previous page |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
(
{
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
}
)[]
Users
batchGetByIds
users.batchGetByIds
Batch fetch up to 500 user profiles by IDs
Risk: read
await corsair.twittrapi.api.users.batchGetByIds({});
| Name | Type | Required | Description |
|---|---|---|---|
ids | string | Yes | Comma-separated numeric user IDs, at most 500 |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
{
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
}[]
getById
users.getById
Get a user profile by numeric ID (or handle via username)
Risk: read
await corsair.twittrapi.api.users.getById({});
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Numeric user ID, or “-1” with username to resolve by handle |
username | string | No | Handle with or without @. Used instead of userId when set |
| Name | Type | Required | Description |
|---|---|---|---|
data | object | null | Yes | — |
data full type
data full type
{
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null
getByUsername
users.getByUsername
Get a user profile by handle
Risk: read
await corsair.twittrapi.api.users.getByUsername({ username: 'XDevelopers' });
| Name | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Handle with or without @ |
| Name | Type | Required | Description |
|---|---|---|---|
data | object | null | Yes | — |
data full type
data full type
{
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null
getFollowers
users.getFollowers
Get a user’s followers
Risk: read
await corsair.twittrapi.api.users.getFollowers({});
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Numeric user ID, or “-1” with username to resolve by handle |
username | string | No | Handle with or without @. Used instead of userId when set |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
{
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
}[]
getFollowings
users.getFollowings
Get users that a user is following
Risk: read
await corsair.twittrapi.api.users.getFollowings({});
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Numeric user ID, or “-1” with username to resolve by handle |
username | string | No | Handle with or without @. Used instead of userId when set |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
{
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
}[]
getFriendship
users.getFriendship
Show the relationship between two accounts
Risk: read
await corsair.twittrapi.api.users.getFriendship({});
| Name | Type | Required | Description |
|---|---|---|---|
sourceScreenName | string | Yes | First handle, with or without @ |
targetScreenName | string | Yes | Second handle, with or without @ |
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
source: {
id: string,
username: string
},
target: {
id: string,
username: string
},
following: boolean,
followedBy: boolean,
canDm: boolean | null,
blocking: boolean | null,
blockedBy: boolean | null,
muting: boolean | null
}
getLikes
users.getLikes
Get a user’s liked tweets
Risk: read
await corsair.twittrapi.api.users.getLikes({});
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Numeric user ID, or “-1” with username to resolve by handle |
username | string | No | Handle with or without @. Used instead of userId when set |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
(
{
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
}
)[]
getMedia
users.getMedia
Get media tweets from a user’s timeline
Risk: read
await corsair.twittrapi.api.users.getMedia({});
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Numeric user ID, or “-1” with username to resolve by handle |
username | string | No | Handle with or without @. Used instead of userId when set |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
(
{
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
}
)[]
getTweets
users.getTweets
Get a user’s tweets
Risk: read
await corsair.twittrapi.api.users.getTweets({ userId: '2244994945', count: 20 });
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Numeric user ID, or “-1” with username to resolve by handle |
username | string | No | Handle with or without @. Used instead of userId when set |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
(
{
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
}
)[]
getTweetsAndReplies
users.getTweetsAndReplies
Get a user’s tweets and replies
Risk: read
await corsair.twittrapi.api.users.getTweetsAndReplies({});
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Numeric user ID, or “-1” with username to resolve by handle |
username | string | No | Handle with or without @. Used instead of userId when set |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
(
{
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: {
id: string,
url: string,
text: string,
createdAt: string | null,
lang: string | null,
author: {
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
} | null,
counts: {
likes: number,
retweets: number,
replies: number,
quotes: number,
bookmarks: number,
views: number | null
},
media: {
type: string,
url: string,
previewUrl: string,
width: number,
height: number,
altText: string | null,
durationMs: number | null
}[],
urls: string[],
hashtags: string[],
mentions: {
id: string,
username: string
}[],
replyTo: {
tweetId: string,
userId: string,
username: string
} | null,
conversationId: string | null,
isPinned: boolean,
source: string | null,
quoted?: (recursive) | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | {
id: string,
unavailable: true
} | null,
retweetOf?: (recursive) | null
} | null
} | {
id: string,
unavailable: true
}
)[]
getVerifiedFollowers
users.getVerifiedFollowers
Get a user’s verified followers
Risk: read
await corsair.twittrapi.api.users.getVerifiedFollowers({});
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Numeric user ID, or “-1” with username to resolve by handle |
username | string | No | Handle with or without @. Used instead of userId when set |
count | number | No | — |
cursor | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | Yes | — |
nextCursor | string | null | Yes | — |
previousCursor | string | null | Yes | — |
hasNextPage | boolean | Yes | — |
data full type
data full type
{
id: string,
username: string,
name: string,
description: string,
location: string,
url: string | null,
createdAt: string | null,
avatarUrl: string | null,
bannerUrl: string | null,
verified: boolean,
verifiedType: string | null,
protected: boolean,
counts: {
followers: number,
following: number,
tweets: number,
likes: number,
media: number,
listed: number
},
pinnedTweetIds: string[],
isAutomated: boolean
}[]
resolveIds
users.resolveIds
Resolve up to 100 handles to user IDs
Risk: read
await corsair.twittrapi.api.users.resolveIds({ usernames: 'XDevelopers,jack' });
| Name | Type | Required | Description |
|---|---|---|---|
usernames | string | Yes | Handles separated by commas, with or without @, at most 100 |
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | — |
data full type
data full type
{
userIds: Record<string, string>,
errors?: {
username: string,
error: string,
message?: string
}[]
}