List Latest Tweets
API for getting latest tweets from Twitter public List channel
List Latest Tweets
Get the latest tweets from a public List channel on Twitter.
Request
URL: /api/twitter/list-latest-tweets
Method: GET or POST
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| listId | string | Yes | Unique ID of the List channel |
Response
A successful response will return the latest tweet list from the List channel, including tweet content, creation time, author information, etc.
Examples
Request Example
# GET request
curl --request GET \
--url 'https://www.aidir.fun/api/twitter/list-latest-tweets?listId=1234567890' \
--header 'X-API-Key: <api-key>'
# POST request
curl --request POST \
--url 'https://www.aidir.fun/api/twitter/list-latest-tweets' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"listId": "1234567890"
}'Response Example
{
"data": {
"list": {
"id": "1234567890",
"name": "Tech News",
"description": "Latest tech news and updates"
},
"tweets": {
"entries": [
{
"content": {
"tweet": {
"id": "1512345678901234567",
"text": "This is a tweet in the list",
"created_at": "2023-04-15T14:34:12.000Z",
"author": {
"id": "9876543210",
"name": "Tech Reporter",
"screen_name": "techreporter"
},
"favorite_count": 123,
"retweet_count": 45,
"reply_count": 6,
"quote_count": 2
}
}
}
]
}
}
}Error Responses
| Status Code | Description |
|---|---|
| 400 | Request parameter error, e.g., missing required listId parameter |
| 401 | Authentication failed, API key invalid or missing |
| 404 | List channel does not exist or is not public |
| 500 | Internal server error |
Finding List ID
To use this API, you need to know the List's ID. You can obtain it through the following methods:
- On the Twitter web version, the List's URL usually contains its ID, such as
https://twitter.com/i/lists/1234567890 - Use Twitter developer tools or third-party Twitter analytics tools to find the List ID
Aidir Docs