curl --request POST \
--url https://app.sideshift.app/api/v1/scrape/twitter/posts \
--header 'Content-Type: application/json' \
--data '
{
"username": "elonmusk",
"include_replies": true
}
'import requests
url = "https://app.sideshift.app/api/v1/scrape/twitter/posts"
payload = {
"username": "elonmusk",
"include_replies": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({username: 'elonmusk', include_replies: true})
};
fetch('https://app.sideshift.app/api/v1/scrape/twitter/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://app.sideshift.app/api/v1/scrape/twitter/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'username' => 'elonmusk',
'include_replies' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sideshift.app/api/v1/scrape/twitter/posts"
payload := strings.NewReader("{\n \"username\": \"elonmusk\",\n \"include_replies\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sideshift.app/api/v1/scrape/twitter/posts")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"elonmusk\",\n \"include_replies\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/v1/scrape/twitter/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"elonmusk\",\n \"include_replies\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"posts": [
{
"id": "2086128419369042103",
"title": "ELON MUSK: “In order to ascend the Kardashev scale, in order to get to any meaningful percentage of the sun's energy harness, you have to go to space. If you want to get to, say…",
"views": 533041,
"likes": 2239,
"comments": 293,
"shares": 354,
"bookmarks": 149,
"uploadedAt": 1786206748,
"uploadedAtFormatted": "2026-08-08T16:32:28.000Z",
"postPage": "https://x.com/elonmusk/status/2086128419369042103",
"creator": "elonmusk",
"thumbnail": "https://pbs.twimg.com/…",
"videoUrl": "https://video.twimg.com/…",
"platform": "twitter",
"hashtags": [],
"region": null
},
{
"id": "2086127247077843282",
"title": "Major upgrade to Grok Imagine image editing",
"views": 1855114,
"likes": 3899,
"comments": 909,
"shares": 570,
"bookmarks": 191,
"uploadedAt": 1786206468,
"uploadedAtFormatted": "2026-08-08T16:27:48.000Z",
"postPage": "https://x.com/elonmusk/status/2086127247077843282",
"creator": "elonmusk",
"thumbnail": "",
"videoUrl": "",
"platform": "twitter",
"hashtags": [],
"region": null
}
],
"profile_pictures": {
"elonmusk": "https://pbs.twimg.com/…"
},
"next_cursor": "s:DAADDAABCgABHPNqvqBWwLcKAAIc81LNZVcBzwAIAAIAAAACCAADAAAAAAgABAAAAAAKAAUc85q-MwAnEAoABhzzmr4y_9jwCwAHAAAA8EVtUEM2d0FBQWZRL2dHSk4wdkdwL0FBQUFCUWM4MTdxcjFhZ2ZoenphYTJ1VnFGU0hQTlN…"
},
"request_id": "req_8f3c9a2b1d4e6f70",
"upstream_calls": 1,
"meta": {
"credits_charged": 1,
"credits_remaining": 9998
}
}{
"error": "INVALID_INPUT",
"message": "Invalid username: must match @?[a-zA-Z0-9._-]{1,100}",
"field": "username",
"reason": "must match @?[a-zA-Z0-9._-]{1,100}",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UNAUTHORIZED",
"message": "Scraper routes require an independent scraper key from the Scraper API dashboard.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "INSUFFICIENT_SCRAPER_CREDITS",
"message": "Insufficient scraper credits",
"platform": "tiktok",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "PROFILE_NOT_FOUND",
"message": "Profile not found or unavailable.",
"platform": "instagram",
"identifier": "someuser",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "PAYLOAD_TOO_LARGE",
"message": "Request body must be 32KB or smaller",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "SCRAPER_RATE_LIMITED",
"message": "Scraper API rate limit exceeded",
"platform": "tiktok",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "SCRAPER_USAGE_FINALIZE_FAILED",
"message": "Request could not be finalized. Your credits were refunded.",
"platform": "tiktok",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UPSTREAM_ERROR",
"message": "Data source failed. Your credits were refunded.",
"platform": "youtube",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UPSTREAM_TIMEOUT",
"message": "Data source timed out. Your credits were refunded.",
"platform": "facebook",
"request_id": "req_8f3c9a2b1d4e6f70"
}Returns one page of recent original posts from an X account. Set include_replies: true to include reply posts. The account’s pinned post leads every page, out of chronological order, so de-duplicate by id. 1 credit per page.
curl --request POST \
--url https://app.sideshift.app/api/v1/scrape/twitter/posts \
--header 'Content-Type: application/json' \
--data '
{
"username": "elonmusk",
"include_replies": true
}
'import requests
url = "https://app.sideshift.app/api/v1/scrape/twitter/posts"
payload = {
"username": "elonmusk",
"include_replies": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({username: 'elonmusk', include_replies: true})
};
fetch('https://app.sideshift.app/api/v1/scrape/twitter/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://app.sideshift.app/api/v1/scrape/twitter/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'username' => 'elonmusk',
'include_replies' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sideshift.app/api/v1/scrape/twitter/posts"
payload := strings.NewReader("{\n \"username\": \"elonmusk\",\n \"include_replies\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.sideshift.app/api/v1/scrape/twitter/posts")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"elonmusk\",\n \"include_replies\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/v1/scrape/twitter/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"elonmusk\",\n \"include_replies\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"posts": [
{
"id": "2086128419369042103",
"title": "ELON MUSK: “In order to ascend the Kardashev scale, in order to get to any meaningful percentage of the sun's energy harness, you have to go to space. If you want to get to, say…",
"views": 533041,
"likes": 2239,
"comments": 293,
"shares": 354,
"bookmarks": 149,
"uploadedAt": 1786206748,
"uploadedAtFormatted": "2026-08-08T16:32:28.000Z",
"postPage": "https://x.com/elonmusk/status/2086128419369042103",
"creator": "elonmusk",
"thumbnail": "https://pbs.twimg.com/…",
"videoUrl": "https://video.twimg.com/…",
"platform": "twitter",
"hashtags": [],
"region": null
},
{
"id": "2086127247077843282",
"title": "Major upgrade to Grok Imagine image editing",
"views": 1855114,
"likes": 3899,
"comments": 909,
"shares": 570,
"bookmarks": 191,
"uploadedAt": 1786206468,
"uploadedAtFormatted": "2026-08-08T16:27:48.000Z",
"postPage": "https://x.com/elonmusk/status/2086127247077843282",
"creator": "elonmusk",
"thumbnail": "",
"videoUrl": "",
"platform": "twitter",
"hashtags": [],
"region": null
}
],
"profile_pictures": {
"elonmusk": "https://pbs.twimg.com/…"
},
"next_cursor": "s:DAADDAABCgABHPNqvqBWwLcKAAIc81LNZVcBzwAIAAIAAAACCAADAAAAAAgABAAAAAAKAAUc85q-MwAnEAoABhzzmr4y_9jwCwAHAAAA8EVtUEM2d0FBQWZRL2dHSk4wdkdwL0FBQUFCUWM4MTdxcjFhZ2ZoenphYTJ1VnFGU0hQTlN…"
},
"request_id": "req_8f3c9a2b1d4e6f70",
"upstream_calls": 1,
"meta": {
"credits_charged": 1,
"credits_remaining": 9998
}
}{
"error": "INVALID_INPUT",
"message": "Invalid username: must match @?[a-zA-Z0-9._-]{1,100}",
"field": "username",
"reason": "must match @?[a-zA-Z0-9._-]{1,100}",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UNAUTHORIZED",
"message": "Scraper routes require an independent scraper key from the Scraper API dashboard.",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "INSUFFICIENT_SCRAPER_CREDITS",
"message": "Insufficient scraper credits",
"platform": "tiktok",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "PROFILE_NOT_FOUND",
"message": "Profile not found or unavailable.",
"platform": "instagram",
"identifier": "someuser",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "PAYLOAD_TOO_LARGE",
"message": "Request body must be 32KB or smaller",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "SCRAPER_RATE_LIMITED",
"message": "Scraper API rate limit exceeded",
"platform": "tiktok",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "SCRAPER_USAGE_FINALIZE_FAILED",
"message": "Request could not be finalized. Your credits were refunded.",
"platform": "tiktok",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UPSTREAM_ERROR",
"message": "Data source failed. Your credits were refunded.",
"platform": "youtube",
"request_id": "req_8f3c9a2b1d4e6f70"
}{
"error": "UPSTREAM_TIMEOUT",
"message": "Data source timed out. Your credits were refunded.",
"platform": "facebook",
"request_id": "req_8f3c9a2b1d4e6f70"
}Body
Creator handle (with or without a leading @), matching @?[a-zA-Z0-9._-]{1,100}. Facebook also accepts a numeric profile_id; YouTube accepts a @handle or UC… channel id; LinkedIn accepts a person slug or a company/<slug> identifier. A full profile URL is not accepted on any platform.
"mrbeast"
Pagination cursor from a previous response's next_cursor — send it back verbatim and never construct one. Omit for the first page. Snapchat and LinkedIn return a single page and never issue one. A cursor the platform does not recognise is not an error; on Instagram it silently returns page 1 again, and you are billed for it.
Set true to include reply posts. Omit or set false for original posts only.
Response
A page of posts.
Show child attributes
Show child attributes
Number of upstream data-source calls this request generated (always 1 — one page per call on every platform).
Per-request credit accounting (also surfaced in the X-Scraper-Credits-* response headers).
Show child attributes
Show child attributes