Social Fetch
Twitter

Search Twitter posts

Search for posts on X.

GET/v1/twitter/search
2credits
x-api-key*stringheader

API key (`sfk_...`)

Parameters
10
query*stringquery

Search query text to run against public posts on X.

min 1 chars · max 512 chars

sectionstringoptionalquery

Optional search section filter. Omit to use the default `top` section.

one of: top, latest, people, photos, videos

minRetweetsintegeroptionalquery

Optional minimum retweet count filter.

≥ 0

minLikesintegeroptionalquery

Optional minimum like count filter.

≥ 0

minRepliesintegeroptionalquery

Optional minimum reply count filter.

≥ 0

limitintegeroptionalquery

Optional page size. Maximum supported value is 20.

≥ 1 · ≤ 20

startDatestringoptionalquery

Optional start date filter in YYYY-MM-DD format.

pattern: ^\d{4}-\d{2}-\d{2}$

endDatestringoptionalquery

Optional end date filter in YYYY-MM-DD format.

pattern: ^\d{4}-\d{2}-\d{2}$

languagestringoptionalquery

Optional language filter.

one of: en, es, fr, de, it, pt, ru, zh, ja, ko, ar, bg, hr, cs, da, nl, et, fi, el, hu, id, ga, lv, lt, no, pl, ro, sk, sl, sv, tr, uk, vi, cy, zu

cursorstringoptionalquery

Opaque pagination cursor returned by a previous response.

min 1 chars

Response fields
67

Endpoint-specific response payload.

Tweets returned for the requested search query.

datatweets[]id
string

Tweet id.

min 1 chars

datatweets[]url
stringnullable

Canonical public URL for the tweet when available.

datatweets[]text
string

Full tweet text when available.

datatweets[]createdAt
integer

Creation time as Unix epoch seconds.

≥ 0

datatweets[]createdAtLabel
stringnullable

Human-readable creation timestamp string when available.

datatweets[]language
stringnullable

Language code for the tweet when available.

datatweets[]conversationId
stringnullable

Conversation identifier when supplied.

min 1 chars

datatweets[]inReplyToStatusId
stringnullable

Parent post identifier when this post is a reply.

min 1 chars

datatweets[]quotedStatusId
stringnullable

Quoted post identifier when this post quotes another.

min 1 chars

datatweets[]retweetTweetId
stringnullable

Original post identifier when this post is an engagement repost.

min 1 chars

Author metadata for the tweet when available.

datatweets[]authorhandle
string

Author handle without the leading @.

min 1 chars

datatweets[]authordisplayName
stringnullable

Display name shown for the author.

datatweets[]authoravatarUrl
stringnullable

Profile image URL for the author when available.

datatweets[]authorprofileUrl
stringnullable

Canonical public profile URL for the author when available.

datatweets[]authorverified
boolean

Whether the author has legacy verification on X.

datatweets[]authorblueVerified
boolean

Whether the author has paid blue verification on X.

datatweets[]authorplatformUserId
stringoptional

Numeric X user id for the author as a string.

Engagement metrics for a tweet.

datatweets[]metricslikes
integer

Like count.

≥ 0

datatweets[]metricsretweets
integer

Retweet count.

≥ 0

datatweets[]metricsreplies
integer

Reply count.

≥ 0

datatweets[]metricsquotes
integer

Quote count.

≥ 0

datatweets[]metricsviews
integernullable

View count when available.

≥ 0

datatweets[]metricsbookmarkCount
integernullable

Bookmark count when available.

≥ 0

Media attachments returned for the tweet.

datatweets[]media[]url
string

Direct media URL when available.

min 1 chars

datatweets[]media[]type
string

Media type when Social Fetch can classify it confidently.

one of: photo, video

datatweets[]media[]thumbnailUrl
stringoptional

Poster or thumbnail URL for video media when distinguishable.

min 1 chars

datatweets[]media[]contentType
stringoptional

MIME type reported for streamed media.

min 1 chars

datatweets[]media[]bitrate
integeroptional

Bitrate in bits per second when supplied for streamed media.

≥ 0

datatweets[]media[]width
integeroptional

Width in pixels when available.

≥ 0

datatweets[]media[]height
integeroptional

Height in pixels when available.

≥ 0

datatweets[]expandedUrl
stringnullable

Expanded URL attached to the tweet when available.

datatweets[]isRetweet
boolean

Whether the tweet is marked as a retweet.

datatweets[]source
stringnullable

Source label such as `Twitter Web App` when available.

Profiles returned for the requested search query.

datapeople[]platformUserId
string

Numeric X user id as a string.

min 1 chars

datapeople[]handle
stringnullable

X screen name (handle) without the leading @.

datapeople[]displayName
stringnullable

Display name shown on the profile.

datapeople[]bio
stringnullable

Profile biography text.

datapeople[]avatarUrl
stringnullable

Best available square avatar image URL.

datapeople[]bannerUrl
stringnullableoptional

Profile banner image URL when available.

datapeople[]verified
boolean

Whether X marks the profile with legacy verification (not necessarily paid blue).

datapeople[]blueVerified
boolean

Whether the account has X blue (paid) verification.

datapeople[]privateAccount
boolean

Whether the account is protected (private).

datapeople[]profileUrl
string

Canonical public profile URL on x.com.

min 1 chars

datapeople[]website
stringnullableoptional

Primary outbound link from the profile when provided.

datapeople[]location
stringnullableoptional

Location string from the profile when provided.

datapeople[]accountCreatedAt
integeroptional

Account creation time as Unix epoch seconds when derivable.

≥ 0

Aggregate profile metrics from X.

datapeople[]metricsfollowers
integer

Follower count from X.

≥ 0

datapeople[]metricsfollowing
integer

Following (friends) count from X.

≥ 0

datapeople[]metricstweets
integer

Total post (status) count from X.

≥ 0

datapeople[]metricsfavourites
integer

Total favourites (likes) count from X.

≥ 0

datapeople[]metricslistedCount
integeroptional

Listed count when X provides it.

≥ 0

datapeople[]metricsmediaCount
integeroptional

Media item count when X provides it.

≥ 0

datapeople[]metricsfastFollowersCount
integeroptional

Fast-followers count when X provides it.

≥ 0

Pagination information for the current response.

datapagenextCursor
stringnullable

Cursor to pass as `cursor` in the next request when another page exists.

datapagehasMore
boolean

Whether another page can be requested.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/twitter/search?query=what to watch this weekend" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Search results for the requested query.

On this page

No Headings