- General
- Tweets
- Tweet lookup by Tweet IDsGET
- Full archive search countsGET
- Recent search countsGET
- Sample streamGET
- Full-archive searchGET
- Recent searchGET
- Filtered streamGET
- Rules lookupGET
- Add/Delete rulesPOST
- Tweet lookup by Tweet IDGET
- Hide repliesPUT
- Returns Tweet objects liked by the provided User IDGET
- Causes the user (in the path) to like the specified tweetPOST
- Causes the user (in the path) to unlike the specified tweetDELETE
- User mention timeline by User IDGET
- Causes the user (in the path) to retweet the specified tweetPOST
- Causes the user (in the path) to unretweet the specified tweetDELETE
- User Tweets timeline by User IDGET
- Users
- Returns user objects that have liked the provided Tweet IDGET
- Returns user objects that have retweeted the provided Tweet IDGET
- User lookup by IDsGET
- User lookup by usernamesGET
- User lookup by usernameGET
- User lookup by IDGET
- Returns user objects that are blocked by provided user IDGET
- Block User by User IDPOST
- Returns user objects that follow the provided user IDGET
- Following by User IDGET
- Follow UserPOST
- Mute User by User IDPOST
- Unblock User by User IDDELETE
- Unfollow UserDELETE
- Unmute User by User IDDELETE
Tweet lookup by Tweet IDs
GET
/2/tweets
Tweets
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.twitter.com/2/tweets?ids=&expansions=&tweet.fields=&user.fields=&media.fields=&place.fields=&poll.fields='
响应示例响应示例
200 - 示例 1
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Query 参数
ids
必需
expansions
可选
tweet.fields
可选
user.fields
可选
media.fields
可选
place.fields
可选
poll.fields
可选
返回响应
🟢200The request was successful
application/json
Body
data
array[object (Tweet) {20}]
可选
>= 1 items
attachments
object
可选
author_id
string
可选
示例值:
2244994945
正则匹配:
^[0-9]{1,19}$
context_annotations
array[object (ContextAnnotation) {2}]
可选
>= 1 items
conversation_id
string
可选
示例值:
1346889436626259968
正则匹配:
^[0-9]{1,19}$
created_at
string <date-time>
可选
示例值:
2021-01-06T18:40:40.000Z
entities
object (FullTextEntities)
可选
geo
object
可选
id
string
必需
示例值:
1346889436626259968
正则匹配:
^[0-9]{1,19}$
in_reply_to_user_id
string
可选
示例值:
2244994945
正则匹配:
^[0-9]{1,19}$
lang
string
可选
示例值:
en
non_public_metrics
object
可选
organic_metrics
object
可选
possibly_sensitive
boolean
可选
示例值:
false
promoted_metrics
object
可选
public_metrics
object
可选
referenced_tweets
array [object {2}]
可选
>= 1 items
reply_settings
enum<string>
可选
枚举值:
everyonementionedUsersfollowingother
正则匹配:
^[A-Za-z]{1,12}$
source
string
可选
text
string
必需
示例值:
Learn how to use the user Tweet timeline and user mention timeline endpoints in the Twitter API v2 to explore Tweet\u2026 https:\/\/t.co\/56a0vZUx7i
withheld
object (TweetWithheld)
可选
errors
array[null (Problem) {16}]
可选
>= 1 items
object
GenericProblem
object
InvalidRequestProblem
object
ClientForbiddenProblem
object
ResourceNotFoundProblem
object
ResourceUnavailableProblem
object
ResourceUnauthorizedProblem
object
FieldUnauthorizedProblem
object
DisallowedResourceProblem
object
UnsupportedAuthenticationProblem
object
UsageCapExceededProblem
object
ConnectionExceptionProblem
object
ClientDisconnectedProblem
object
OperationalDisconnectProblem
object
RulesCapProblem
object
InvalidRuleProblem
object
DuplicateRuleProblem
includes
object (Expansions)
可选
media
array[object (Media) {4}]
可选
>= 1 items
places
array[object (Place) {8}]
可选
>= 1 items
polls
array[object (Poll) {5}]
可选
>= 1 items
tweets
array[object (Tweet) {20}]
可选
>= 1 items
users
array[object (User) {14}]
可选
>= 1 items
🔴500500
修改于 2023-10-12 05:55:15