Twitter 高度検索・スクレイピング API (カーソルページネーション)
Cookie やログイン不要で利用できる Twitter/X 高度検索・リアルタイムツイート取得 API。キーワード、ハッシュタグ、除外ワード、投稿日時などの高度検索演算子に対応し、カーソル(Cursor)ページネーションにより数千件以上のツイートを高速スクレイピング可能。公式 X API の高額な月額料金($100〜$5,000)を回避したい開発者や、センチメント分析、ボット作成、市場調査に最適です。料金: 1,000 ツイートあたり $0.05。
APIリファレンスに戻る
/Search Endpoints
POST
/twitter/advanced_search/pageAPI 認証
AuthorizationBearer token · header必須TwexAPIのグローバル認証トークン (Bearer Token)。ヘッダーに含める必要があります:Authorization: Bearer <YOUR_TWEXAPI_KEY>。
リクエストボディ
必須application/jsonsearchTermsstring[]必須Twitter検索クエリ構文の配列。[Advance Search TwitterXAPI](https://advance-search.pages.dev) でオンライン生成可能。
sortBystring必須検索結果の並び順('Latest' または 'Top')
default: "Latest"
許可値:
LatestTopnext_cursorstring | any次ページ取得用のカーソル(Cursor)。has_next_page が true の場合に指定
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyレスポンス
200Current page data (up to 20 tweets) and pagination metadata (has_next_page, next_cursor).
codeintegerHTTP ステータスコード(200 は成功)
default: 200
msgstringレスポンスメッセージ(例: 'success')
default: "success"
dataTweetModel | any[]必須返却されるコアデータオブジェクトまたは配列
プロパティを表示プロパティを非表示
Array of
TweetModel | anyAny of:
TweetModel
tweet_idstring必須ツイートの一意のID
is_paid_promotionboolean | anyIndicates whether the content or user is associated with a paid promotion
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anytextstring必須メッセージ本文
created_atstring | any作成日時(UTC標準時)
プロパティを表示プロパティを非表示
Any of:
string
stringany
anycreated_at_datetimestring | anyThe ISO 8601 format of the creation date
プロパティを表示プロパティを非表示
Any of:
string
stringany
anybookmark_countinteger | anyブックマーク追加数
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anybookmarkedboolean | anyIndicates if the authenticating user has bookmarked this Tweet
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anycommunity_notestring | anyCommunity note associated with the Tweet
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyedit_tweet_idsstring[]A list of Tweet IDs for each edit of the Tweet
default: []
editable_until_msecsstring | anyTimestamp for when the Tweet is no longer editable
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyedits_remainingstring | anyNumber of edits remaining for the Tweet
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyfavorite_countinteger | anyいいね(Favorite)数
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anyfavoritedboolean | anyIndicates if the authenticating user has liked this Tweet
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anyfull_textstring | anyツイートの完全な本文テキスト
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyhas_cardboolean | anyIndicates if the Tweet has a card attached
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anyhas_community_notesboolean | anyIndicates if the Tweet has community notes
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anyhashtagsstring[]A list of hashtags mentioned in the Tweet
default: []
cashtagsstring[]A list of cashtags (stock symbols) mentioned in the Tweet
default: []
idstring | anyThe unique identifier for the Tweet (same as tweet_id)
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyin_reply_tostring | anyID of the Tweet this is a reply to
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyin_reply_to_user_idstring | anyID of the user this is a reply to
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyin_reply_to_screen_namestring | anyScreen name of the user this is a reply to
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyis_edit_eligibleboolean | anyIndicates if the Tweet is eligible for editing
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anyis_quote_statusboolean | anyIndicates if this Tweet is a quote of another Tweet
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anyquoted_status_id_strstring | anyThe unique identifier for the Tweet that this is a quote of
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyis_translatableboolean | anyIndicates if the Tweet is translatable
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anylangstring | anyツイートの言語コード(例: 'ja', 'en')
プロパティを表示プロパティを非表示
Any of:
string
stringany
anymediaMediaModel[]A list of media objects (photos, videos) attached to the Tweet
default: []
プロパティを表示プロパティを非表示
Array of
MediaModelidstring必須Media ID
typestring必須Type of media (e.g., photo, video)
display_urlstring | anyURL of the media to display
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyexpanded_urlstring | anyExpanded URL for the media
プロパティを表示プロパティを非表示
Any of:
string
stringany
anymedia_urlstring | any添付するメディアファイルの公開URL
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyurlstring | anyt.co URL for the media
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyheightinteger | anyHeight of the media in pixels
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anywidthinteger | anyWidth of the media in pixels
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anyfeaturesobject | anyFeatures of the media
プロパティを表示プロパティを非表示
Any of:
object
objectany
anyoriginal_infoobject | anyOriginal information about the media
プロパティを表示プロパティを非表示
Any of:
object
objectany
anysizesobject | anyAvailable sizes of the media
プロパティを表示プロパティを非表示
Any of:
object
objectany
anysource_status_idstring | anySource tweet ID if the media is a retweet
プロパティを表示プロパティを非表示
Any of:
string
stringany
anysource_user_idstring | anySource user ID if the media is a retweet
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyduration_millisinteger | anyDuration of the video in milliseconds
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anyaspect_ratiointeger[] | anyAspect ratio of the video
プロパティを表示プロパティを非表示
Any of:
integer[]
Array of
integerintegerany
anyvideo_infoobject | anyDetailed video information
プロパティを表示プロパティを非表示
Any of:
object
objectany
anystreamsStreamModel[]List of available video streams
default: []
プロパティを表示プロパティを非表示
Array of
StreamModelurlstring | anyURL of the video stream
プロパティを表示プロパティを非表示
Any of:
string
stringany
anybitrateinteger | anyBitrate of the video stream in bps
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anycontent_typestring | anyContent type of the stream
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyplacestring | anyThe location associated with the Tweet
プロパティを表示プロパティを非表示
Any of:
string
stringany
anypollstring | anyA poll attached to the Tweet
プロパティを表示プロパティを非表示
Any of:
string
stringany
anypossibly_sensitiveboolean | anyIndicates if the Tweet may contain sensitive content
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anypossibly_sensitive_editableboolean | anyIndicates if the sensitive content flag is editable
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anyquoteTweetModel | anyThe Tweet object being quoted
プロパティを表示プロパティを非表示
Any of:
TweetModel
Circular reference to
TweetModel.any
anyquote_countinteger | any引用リツイート数
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anyrelated_tweetsTweetModel[]A list of related Tweets
default: []
プロパティを表示プロパティを非表示
Array of
TweetModelCircular reference to
TweetModel.repliesTweetModel[]A list of replies to this Tweet
default: []
プロパティを表示プロパティを非表示
Array of
TweetModelCircular reference to
TweetModel.reply_countinteger | anyリプライ返信数
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anyreply_toTweetModel | anyThe Tweet object this is a reply to
プロパティを表示プロパティを非表示
Any of:
TweetModel
Circular reference to
TweetModel.any
anyretweet_countinteger | anyリツイート数
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anyretweeted_tweetTweetModel | anyThe original Tweet object if this is a retweet
プロパティを表示プロパティを非表示
Any of:
TweetModel
Circular reference to
TweetModel.any
anythreadTweetModel[] | anyThe conversation thread ID
プロパティを表示プロパティを非表示
Any of:
TweetModel[]
Array of
TweetModelCircular reference to
TweetModel.any
anythumbnail_titlestring | anyTitle for the thumbnail in a card
プロパティを表示プロパティを非表示
Any of:
string
stringany
anythumbnail_urlstring | anyURL for the thumbnail in a card
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyurlsstring[]A list of URLs included in the Tweet
default: []
userUserModel | anyThe user who posted the Tweet
プロパティを表示プロパティを非表示
Any of:
UserModel
idstring必須User ID
namestring必須ユーザー表示名
screen_namestring必須Twitterユーザー名(Handle、@なし)
created_atstring | any作成日時(UTC標準時)
プロパティを表示プロパティを非表示
Any of:
string
stringany
anycreated_at_datetimestring | anyAccount creation datetime in ISO format
プロパティを表示プロパティを非表示
Any of:
string
stringany
anycan_dmboolean | anyWhether the user can be direct messaged
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anycan_media_tagboolean | anyWhether the user can be tagged in media
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anydefault_profileboolean | anyWhether the user has a default profile
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anydefault_profile_imageboolean | anyWhether the user has a default profile image
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anydescriptionstring | anyプロフィール自己紹介文(Bio)
default: ""
プロパティを表示プロパティを非表示
Any of:
string
stringany
anydescription_urlsstring[]List of URLs found in the user's description
default: []
urlsurlModel[] | anyList of URLs found in the user's profile
プロパティを表示プロパティを非表示
Any of:
urlModel[]
Array of
urlModelurlstring必須URL
expanded_urlstring | anyExpanded URL
プロパティを表示プロパティを非表示
Any of:
string
stringany
anydisplay_urlstring | anyDisplay URL
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyany
anyfast_followers_countinteger | anyCount of fast followers
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anyfavourites_countinteger | anyNumber of tweets the user has liked
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anyfollowers_countinteger | anyフォロワー総数
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anyfollowing_countinteger | anyフォロー中の総数
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anyhas_custom_timelinesboolean | anyWhether the user has custom timelines
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anyis_blue_verifiedboolean | anyBlue verification status
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anyverified_typestring | anyVerification badge type when not blue-only: blue, business, government, etc.
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyis_verifiedboolean | anyTrue if the account has any verification badge (blue, business, government, or legacy verified)
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anyprofile_image_shapestring | anyProfile image shape (Circle or Square; Square often indicates business/government)
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyis_translatorboolean | anyWhether the user is a translator
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anylisted_countinteger | anyNumber of public lists the user is a member of
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anylocationstring | anyUser's location
default: ""
プロパティを表示プロパティを非表示
Any of:
string
stringany
anymedia_countinteger | anyNumber of media tweets posted by the user
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anynormal_followers_countinteger | anyCount of normal followers
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anypinned_tweet_idsstring[]List of pinned tweet IDs
default: []
possibly_sensitiveboolean | anyWhether the user's profile may contain sensitive content
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anyprofile_banner_urlstring | anyURL of the user's profile banner
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyprofile_image_urlstring | anyURL of the user's profile image
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyprotectedboolean | anyWhether the user's tweets are protected
default: false
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anystatuses_countinteger | anyNumber of tweets posted by the user
default: 0
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anyany
anyview_countstring | anyインプレッション・閲覧数
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyview_count_statestring | anyState of the view count
プロパティを表示プロパティを非表示
Any of:
string
stringany
anystatusobject | anyRaw status dictionary
プロパティを表示プロパティを非表示
Any of:
object
objectany
anytarget_countinteger | anyThe target count of items requested, for context
プロパティを表示プロパティを非表示
Any of:
integer
integerany
anyany
anyhas_next_pageboolean必須次ページが存在するかどうか(true の場合さらにデータあり)
next_cursorstring | any次ページ取得用のカーソル(Cursor)。has_next_page が true の場合に指定
プロパティを表示プロパティを非表示
Any of:
string
stringany
any422パラメータバリデーションエラー
detailValidationError[]プロパティを表示プロパティを非表示
Array of
ValidationErrorlocstring | integer[]必須プロパティを表示プロパティを非表示
Array of
string | integerAny of:
string
stringinteger
integermsgstring必須レスポンスメッセージ(例: 'success')
typestring必須inputanyctxobject⚡インタラクティブテストPOST
⚡インタラクティブテスト / Try APIPOSTLive Console
🌐対象サーバー:
https://api.twexapi.io● 本番環境レディ
🔍
公開データ取得(TwexAPIキーのみ、Twitter Cookie不要)
本エンドポイントは公開Twitterデータの検索・取得用です。TwitterアカウントやCookieは一切不要です!下記の「API認証」に TwexAPIプラットフォームキー (Bearer Token) を入力するだけで即座にテストできます。
🔑API 認証
📝リクエストボディapplication/json
📡
暂无响应数据
请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。
リクエスト例
curl -X POST "https://api.twexapi.io/twitter/advanced_search/page" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"searchTerms": [
"python programming",
"AI technology"
],
"sortBy": "Latest",
"next_cursor": ""
}'const response = await fetch("https://api.twexapi.io/twitter/advanced_search/page", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"searchTerms": [
"python programming",
"AI technology"
],
"sortBy": "Latest",
"next_cursor": ""
})
});import requests
response = requests.post(
"https://api.twexapi.io/twitter/advanced_search/page",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"searchTerms": [
"python programming",
"AI technology"
],
"sortBy": "Latest",
"next_cursor": ""
},
)レスポンス例
{
"code": 200,
"msg": "success",
"data": [
{
"tweet_id": "1803006263529541838",
"is_paid_promotion": true,
"text": "string",
"created_at": "Mon Jun 17 03:51:48 +0000 2024",
"created_at_datetime": "2024-06-17T03:51:48.000Z",
"bookmark_count": 0,
"bookmarked": false,
"community_note": "string",
"edit_tweet_ids": [],
"editable_until_msecs": "string",
"edits_remaining": "string",
"favorite_count": 0,
"favorited": false,
"full_text": "string",
"has_card": false,
"has_community_notes": false,
"hashtags": [
"AI",
"Python"
],
"cashtags": [
"$TSLA"
],
"id": "string",
"in_reply_to": "string",
"in_reply_to_user_id": "string",
"in_reply_to_screen_name": "string",
"is_edit_eligible": false,
"is_quote_status": false,
"quoted_status_id_str": "string",
"is_translatable": false,
"lang": "en",
"media": [],
"place": "string",
"poll": "string",
"possibly_sensitive": true,
"possibly_sensitive_editable": true,
"quote": {},
"quote_count": 0,
"related_tweets": [],
"replies": [],
"reply_count": 0,
"reply_to": {},
"retweet_count": 0,
"retweeted_tweet": {},
"thread": [
{}
],
"thumbnail_title": "string",
"thumbnail_url": "string",
"urls": [],
"user": {
"id": "1717001045992251392",
"name": "Cryptoklepto",
"screen_name": "CK_Cryptoklepto",
"created_at": "Mon Oct 28 02:32:47 +0000 2024",
"created_at_datetime": "2024-10-28T02:32:47.000Z",
"can_dm": false,
"can_media_tag": false,
"default_profile": false,
"default_profile_image": false,
"description": "",
"description_urls": [],
"urls": [
{
"url": "https://www.google.com",
"expanded_url": "https://www.google.com",
"display_url": "www.google.com"
}
],
"fast_followers_count": 0,
"favourites_count": 0,
"followers_count": 0,
"following_count": 0,
"has_custom_timelines": false,
"is_blue_verified": false,
"verified_type": "government",
"is_verified": false,
"profile_image_shape": "Circle",
"is_translator": false,
"listed_count": 0,
"location": "New York, USA",
"media_count": 0,
"normal_followers_count": 0,
"pinned_tweet_ids": [],
"possibly_sensitive": false,
"profile_banner_url": "string",
"profile_image_url": "string",
"protected": false,
"statuses_count": 0
},
"view_count": "string",
"view_count_state": "string",
"status": {},
"target_count": 0
}
],
"has_next_page": true,
"next_cursor": ""
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}