Profile tweets
An account's latest posts, without its replies and reposts: the 5 its profile shows logged out, its pinned post first. There is no next page. A protected account answers LOGIN_REQUIRED.
GET/v1/twitter/profiles/tweets1 creditHeaders
Get your API keyx-api-key*stringrequiredheaderYour API key, made in the dashboard.
Parameters
3handlestringoptionalqueryAn X handle, with or without the @. Give handle, user_id or url.
example: NASA
user_idstringoptionalqueryAn account's id, such as a post's author_id. Give handle, user_id or url.
urlstringoptionalqueryA profile's link: x.com/<handle> or twitter.com/<handle>, with anything after it. Give handle, user_id or url.
max 300 chars
Response fields
43dataarrayThe result: one object, or a list for the endpoints that return several.
data[].idstringX's id for the post: digits, written as text.
data[].urlstringThe post's link.
data[].textstringnullableWhat it says, all of it for a long post; its links are t.co links, as X writes them.
data[].created_atstringnullableWhen it was posted.
format: date-time
data[].languagestringnullableIts language, as X detects it: en, es and so on; zxx for none, such as only a link or an image.
data[].author_idstringnullableIts author's id.
data[].author_handlestringnullableIts author's handle.
data[].author_namestringnullableIts author's display name.
data[].author_picturestringnullableIts author's profile picture, 400x400.
data[].author_verifiedbooleannullableWhether its author has a checkmark.
data[].likesintegernullableLikes.
data[].reply_countintegernullableReplies.
data[].retweet_countintegernullableReposts.
data[].quote_countintegernullableQuotes.
data[].bookmark_countintegernullableBookmarks.
data[].viewsintegernullableViews, where X shows them.
data[].mediaarraynullableIts images, videos and GIFs, in order.
data[].media[].typestringnullablephoto, video or animated_gif.
data[].media[].urlstringThe image's link; a video's thumbnail.
data[].media[].video_urlstringnullableA video's or GIF's file (MP4), in its best quality.
data[].media[].widthintegernullableIts width, in pixels.
data[].media[].heightintegernullableIts height, in pixels.
data[].media[].duration_secondsnumbernullableA video's length.
data[].linksstring[]nullableThe links in it, in full.
data[].mentionsstring[]nullableThe handles it mentions.
data[].hashtagsstring[]nullableIts hashtags, without the #.
data[].quoted_idstringnullableThe id of the post it quotes.
data[].reply_to_idstringnullableThe id of the post it replies to.
data[].reply_to_handlestringnullableThe handle of the author it replies to.
data[].sensitivebooleannullableWhether X marks its media as possibly sensitive.
data[].pinnedbooleannullableWhether it is pinned to its author's profile. Only the profile tweets endpoint says; null elsewhere.
pageobjectnullablePaging, for the endpoints that page; null for the others.
page.next_cursorstringnullableSend it as the cursor parameter, with the same other parameters, for the next page. Null on the last page.
page.has_morebooleanoptionalWhether another page follows.
default: false
metaobjectAbout this call.
meta.platformstringThe platform: reddit, threads, tiktok or youtube.
meta.endpointstringThe endpoint's name, such as channel_videos.
meta.paramsobjectThe call's parameters, defaults included. Parameters without a value, and the cursor, are left out.
meta.request_idstringThis call's id. Quote it when you report a problem.
meta.api_versionstringThe API version that answered.
meta.fetched_atstringWhen the data was fetched from the platform (UTC).
format: date-time
meta.cachedbooleanoptionalWhether it came from our cache; fetched_at says how old it is.
default: false
Code example
curl -X GET 'https://api.socialparse.dev/v1/twitter/profiles/tweets?handle=NASA' \ -H 'x-api-key: YOUR_API_KEY'Responses
Successful Response
{ "data": [ { "id": "string", "url": "string", "text": "string", "created_at": "2019-08-24T14:15:22Z", "language": "string", "author_id": "string", "author_handle": "string", "author_name": "string", "author_picture": "string", "author_verified": true, "likes": 0, "reply_count": 0, "retweet_count": 0, "quote_count": 0, "bookmark_count": 0, "views": 0, "media": [ { "type": "string", "url": "string", "video_url": "string", "width": 0, "height": 0, "duration_seconds": 0 } ], "links": [ "string" ], "mentions": [ "string" ], "hashtags": [ "string" ], "quoted_id": "string", "reply_to_id": "string", "reply_to_handle": "string", "sensitive": true, "pinned": true } ], "page": { "next_cursor": "string", "has_more": false }, "meta": { "platform": "string", "endpoint": "string", "params": { "property1": "string", "property2": "string" }, "request_id": "string", "api_version": "string", "fetched_at": "2019-08-24T14:15:22Z", "cached": false }}Profile
An account's profile: name, bio, link, location, followers, following, post count and when it joined. A protected account's profile too, with private true.
Tweet
A post: its text, author, counts and views, images and videos, links, mentions and hashtags, and the ids of the posts it quotes or replies to.