Get user posts
curl --request GET \
--url https://api.konbiniapi.com/v1/x/users/{username}/posts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.konbiniapi.com/v1/x/users/{username}/posts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.konbiniapi.com/v1/x/users/{username}/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.konbiniapi.com/v1/x/users/{username}/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.konbiniapi.com/v1/x/users/{username}/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.konbiniapi.com/v1/x/users/{username}/posts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.konbiniapi.com/v1/x/users/{username}/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"@context": [
"https://www.w3.org/ns/activitystreams#",
"https://konbiniapi.com/ns/social#"
],
"type": "OrderedCollectionPage",
"partOf": "https://api.konbiniapi.com/v1/x/users/KhabyLame/posts",
"totalItems": 1309,
"cursor": "0",
"nextCursor": "1772217402000",
"next": "https://api.konbiniapi.com/v1/x/users/KhabyLame/posts",
"itemCount": 30,
"orderedItems": [
{
"type": "Note",
"id": "https://x.com/KhabyLame/status/2024515585569083437",
"url": "https://x.com/KhabyLame/status/2024515585569083437",
"entityId": "2024515585569083437",
"content": "This man hasn't been in my fyp for so long",
"likeCount": 93210,
"published": "2026-02-27T20:37:38.000Z",
"replyCount": 96,
"viewCount": 10195,
"repostCount": 3,
"quoteCount": 0,
"saveCount": 3,
"contentFormat": "longform",
"isEdited": false,
"attributedTo": {
"type": "Person",
"id": "https://x.com/KhabyLame",
"url": "https://x.com/KhabyLame",
"entityId": "221838349",
"preferredUsername": "KhabyLame",
"name": "Khabane Lame",
"icon": {
"type": "Image",
"url": "https://pbs.twimg.com/amplify_video_thumb/2024515147692195840/img/t8ePmit3Wst1hxAM.jpg",
"width": 1536,
"height": 2048
},
"isPrivate": false,
"isVerified": false,
"isPaidVerified": true,
"summary": "Let's Go",
"attachment": [
{
"type": "Link",
"href": "https://t.co/examplelink",
"rel": "preferred"
}
],
"followerCount": 372131,
"followingCount": 8,
"likeCount": 60,
"postCount": 267,
"mediaCount": 242,
"listedCount": 215,
"location": "Milan, Italy"
},
"inReplyTo": "<string>",
"quote": {
"type": "Note",
"id": "https://x.com/NISMO/status/2024100000000000000",
"url": "https://x.com/NISMO/status/2024100000000000000",
"entityId": "2024100000000000000",
"content": "Ready for race week.",
"likeCount": 93210,
"published": "2026-02-18T12:00:00.000Z",
"replyCount": 96,
"contentFormat": "longform",
"attributedTo": {
"type": "Person",
"id": "https://x.com/KhabyLame",
"url": "https://x.com/KhabyLame",
"entityId": "221838349",
"preferredUsername": "KhabyLame",
"name": "Khabane Lame",
"icon": {
"type": "Image",
"url": "https://pbs.twimg.com/amplify_video_thumb/2024515147692195840/img/t8ePmit3Wst1hxAM.jpg",
"width": 1536,
"height": 2048
},
"isPrivate": false,
"isVerified": false,
"isPaidVerified": true,
"summary": "Let's Go",
"attachment": [
{
"type": "Link",
"href": "https://t.co/examplelink",
"rel": "preferred"
}
],
"followerCount": 372131,
"followingCount": 8,
"likeCount": 60,
"postCount": 267,
"mediaCount": 242,
"listedCount": 215,
"location": "Milan, Italy"
},
"image": [
{
"type": "Image",
"url": "https://pbs.twimg.com/amplify_video_thumb/2024515147692195840/img/t8ePmit3Wst1hxAM.jpg",
"width": 1536,
"height": 2048
}
],
"attachment": [
{
"type": "Video",
"url": [
"https://video.twimg.com/ext_tw_video/123/pu/vid/avc1/example.mp4"
],
"mediaType": "video/mp4",
"width": 1280,
"height": 720,
"bitrate": 950000,
"duration": 16.266
}
]
},
"image": [
{
"type": "Image",
"url": "https://pbs.twimg.com/amplify_video_thumb/2024515147692195840/img/t8ePmit3Wst1hxAM.jpg",
"width": 1536,
"height": 2048
}
],
"attachment": [
{
"type": "Video",
"url": [
"https://video.twimg.com/ext_tw_video/123/pu/vid/avc1/example.mp4"
],
"mediaType": "video/mp4",
"width": 1280,
"height": 720,
"bitrate": 950000,
"duration": 16.266
}
],
"tag": [
{
"type": "Tag",
"name": "learnfromkhaby",
"href": "https://x.com/Windows"
}
]
}
]
}
}{
"errors": [
{
"code": "validation_error",
"message": "Validation error"
}
],
"data": null
}{
"errors": [
{
"message": "Invalid API key"
}
],
"data": null
}{
"errors": [
{
"code": "credits_exhausted",
"message": "Credits exhausted. Upgrade your plan at konbiniapi.com"
}
],
"data": null
}{
"errors": [
{
"message": "API key is disabled"
}
],
"data": null
}{
"errors": [
{
"message": "Not found"
}
],
"data": null
}{
"errors": [
{
"code": "validation_error",
"message": "Request body too large"
}
],
"data": null
}{
"errors": [
{
"code": "internal_error",
"message": "Internal error"
}
],
"data": null
}{
"errors": [
{
"code": "platform_error",
"message": "Platform error"
}
],
"data": null
}{
"errors": [
{
"code": "service_unavailable",
"message": "Service unavailable"
}
],
"data": null
}{
"errors": [
{
"code": "platform_error",
"message": "Platform error"
}
],
"data": null
}Users
Get user posts
Returns public posts from a user’s profile as visible to not logged in users. This feed is not guaranteed to be chronological and is often a ranked public selection.
GET
/
v1
/
x
/
users
/
{username}
/
posts
Get user posts
curl --request GET \
--url https://api.konbiniapi.com/v1/x/users/{username}/posts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.konbiniapi.com/v1/x/users/{username}/posts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.konbiniapi.com/v1/x/users/{username}/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.konbiniapi.com/v1/x/users/{username}/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.konbiniapi.com/v1/x/users/{username}/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.konbiniapi.com/v1/x/users/{username}/posts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.konbiniapi.com/v1/x/users/{username}/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"@context": [
"https://www.w3.org/ns/activitystreams#",
"https://konbiniapi.com/ns/social#"
],
"type": "OrderedCollectionPage",
"partOf": "https://api.konbiniapi.com/v1/x/users/KhabyLame/posts",
"totalItems": 1309,
"cursor": "0",
"nextCursor": "1772217402000",
"next": "https://api.konbiniapi.com/v1/x/users/KhabyLame/posts",
"itemCount": 30,
"orderedItems": [
{
"type": "Note",
"id": "https://x.com/KhabyLame/status/2024515585569083437",
"url": "https://x.com/KhabyLame/status/2024515585569083437",
"entityId": "2024515585569083437",
"content": "This man hasn't been in my fyp for so long",
"likeCount": 93210,
"published": "2026-02-27T20:37:38.000Z",
"replyCount": 96,
"viewCount": 10195,
"repostCount": 3,
"quoteCount": 0,
"saveCount": 3,
"contentFormat": "longform",
"isEdited": false,
"attributedTo": {
"type": "Person",
"id": "https://x.com/KhabyLame",
"url": "https://x.com/KhabyLame",
"entityId": "221838349",
"preferredUsername": "KhabyLame",
"name": "Khabane Lame",
"icon": {
"type": "Image",
"url": "https://pbs.twimg.com/amplify_video_thumb/2024515147692195840/img/t8ePmit3Wst1hxAM.jpg",
"width": 1536,
"height": 2048
},
"isPrivate": false,
"isVerified": false,
"isPaidVerified": true,
"summary": "Let's Go",
"attachment": [
{
"type": "Link",
"href": "https://t.co/examplelink",
"rel": "preferred"
}
],
"followerCount": 372131,
"followingCount": 8,
"likeCount": 60,
"postCount": 267,
"mediaCount": 242,
"listedCount": 215,
"location": "Milan, Italy"
},
"inReplyTo": "<string>",
"quote": {
"type": "Note",
"id": "https://x.com/NISMO/status/2024100000000000000",
"url": "https://x.com/NISMO/status/2024100000000000000",
"entityId": "2024100000000000000",
"content": "Ready for race week.",
"likeCount": 93210,
"published": "2026-02-18T12:00:00.000Z",
"replyCount": 96,
"contentFormat": "longform",
"attributedTo": {
"type": "Person",
"id": "https://x.com/KhabyLame",
"url": "https://x.com/KhabyLame",
"entityId": "221838349",
"preferredUsername": "KhabyLame",
"name": "Khabane Lame",
"icon": {
"type": "Image",
"url": "https://pbs.twimg.com/amplify_video_thumb/2024515147692195840/img/t8ePmit3Wst1hxAM.jpg",
"width": 1536,
"height": 2048
},
"isPrivate": false,
"isVerified": false,
"isPaidVerified": true,
"summary": "Let's Go",
"attachment": [
{
"type": "Link",
"href": "https://t.co/examplelink",
"rel": "preferred"
}
],
"followerCount": 372131,
"followingCount": 8,
"likeCount": 60,
"postCount": 267,
"mediaCount": 242,
"listedCount": 215,
"location": "Milan, Italy"
},
"image": [
{
"type": "Image",
"url": "https://pbs.twimg.com/amplify_video_thumb/2024515147692195840/img/t8ePmit3Wst1hxAM.jpg",
"width": 1536,
"height": 2048
}
],
"attachment": [
{
"type": "Video",
"url": [
"https://video.twimg.com/ext_tw_video/123/pu/vid/avc1/example.mp4"
],
"mediaType": "video/mp4",
"width": 1280,
"height": 720,
"bitrate": 950000,
"duration": 16.266
}
]
},
"image": [
{
"type": "Image",
"url": "https://pbs.twimg.com/amplify_video_thumb/2024515147692195840/img/t8ePmit3Wst1hxAM.jpg",
"width": 1536,
"height": 2048
}
],
"attachment": [
{
"type": "Video",
"url": [
"https://video.twimg.com/ext_tw_video/123/pu/vid/avc1/example.mp4"
],
"mediaType": "video/mp4",
"width": 1280,
"height": 720,
"bitrate": 950000,
"duration": 16.266
}
],
"tag": [
{
"type": "Tag",
"name": "learnfromkhaby",
"href": "https://x.com/Windows"
}
]
}
]
}
}{
"errors": [
{
"code": "validation_error",
"message": "Validation error"
}
],
"data": null
}{
"errors": [
{
"message": "Invalid API key"
}
],
"data": null
}{
"errors": [
{
"code": "credits_exhausted",
"message": "Credits exhausted. Upgrade your plan at konbiniapi.com"
}
],
"data": null
}{
"errors": [
{
"message": "API key is disabled"
}
],
"data": null
}{
"errors": [
{
"message": "Not found"
}
],
"data": null
}{
"errors": [
{
"code": "validation_error",
"message": "Request body too large"
}
],
"data": null
}{
"errors": [
{
"code": "internal_error",
"message": "Internal error"
}
],
"data": null
}{
"errors": [
{
"code": "platform_error",
"message": "Platform error"
}
],
"data": null
}{
"errors": [
{
"code": "service_unavailable",
"message": "Service unavailable"
}
],
"data": null
}{
"errors": [
{
"code": "platform_error",
"message": "Platform error"
}
],
"data": null
}Authorizations
Send your API key in the Authorization header as a Bearer token.
Example: Authorization: Bearer <your-api-key>
Path Parameters
X username (with or without @ symbol)
Example:
"Austen"
Query Parameters
Maximum number of posts to return from the public profile selection (maximum: 100)
Required range:
1 <= x <= 100Example:
20
Response
Returns public posts from an X user profile
Show child attributes
Show child attributes
⌘I