X (Twitter)

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 credit
x-api-key*stringrequiredheader

Your API key, made in the dashboard.

Parameters

3
handlestringoptionalquery

An X handle, with or without the @. Give handle, user_id or url.

example: NASA

user_idstringoptionalquery

An account's id, such as a post's author_id. Give handle, user_id or url.

urlstringoptionalquery

A 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

43
dataarray

The result: one object, or a list for the endpoints that return several.

data[].idstring

X's id for the post: digits, written as text.

data[].urlstring

The post's link.

data[].textstringnullable

What it says, all of it for a long post; its links are t.co links, as X writes them.

data[].created_atstringnullable

When it was posted.

format: date-time

data[].languagestringnullable

Its language, as X detects it: en, es and so on; zxx for none, such as only a link or an image.

data[].author_idstringnullable

Its author's id.

data[].author_handlestringnullable

Its author's handle.

data[].author_namestringnullable

Its author's display name.

data[].author_picturestringnullable

Its author's profile picture, 400x400.

data[].author_verifiedbooleannullable

Whether its author has a checkmark.

data[].likesintegernullable

Likes.

data[].reply_countintegernullable

Replies.

data[].retweet_countintegernullable

Reposts.

data[].quote_countintegernullable

Quotes.

data[].bookmark_countintegernullable

Bookmarks.

data[].viewsintegernullable

Views, where X shows them.

data[].mediaarraynullable

Its images, videos and GIFs, in order.

data[].media[].typestringnullable

photo, video or animated_gif.

data[].media[].urlstring

The image's link; a video's thumbnail.

data[].media[].video_urlstringnullable

A video's or GIF's file (MP4), in its best quality.

data[].media[].widthintegernullable

Its width, in pixels.

data[].media[].heightintegernullable

Its height, in pixels.

data[].media[].duration_secondsnumbernullable

A video's length.

data[].linksstring[]nullable

The links in it, in full.

data[].mentionsstring[]nullable

The handles it mentions.

data[].hashtagsstring[]nullable

Its hashtags, without the #.

data[].quoted_idstringnullable

The id of the post it quotes.

data[].reply_to_idstringnullable

The id of the post it replies to.

data[].reply_to_handlestringnullable

The handle of the author it replies to.

data[].sensitivebooleannullable

Whether X marks its media as possibly sensitive.

data[].pinnedbooleannullable

Whether it is pinned to its author's profile. Only the profile tweets endpoint says; null elsewhere.

pageobjectnullable

Paging, for the endpoints that page; null for the others.

page.next_cursorstringnullable

Send it as the cursor parameter, with the same other parameters, for the next page. Null on the last page.

page.has_morebooleanoptional

Whether another page follows.

default: false

metaobject

About this call.

meta.platformstring

The platform: reddit, threads, tiktok or youtube.

meta.endpointstring

The endpoint's name, such as channel_videos.

meta.paramsobject

The call's parameters, defaults included. Parameters without a value, and the cursor, are left out.

meta.request_idstring

This call's id. Quote it when you report a problem.

meta.api_versionstring

The API version that answered.

meta.fetched_atstring

When the data was fetched from the platform (UTC).

format: date-time

meta.cachedbooleanoptional

Whether 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  }}