Social API

A high-performance, minimalist API for fetching Twitter/X tweet data, HTML renders, and SVG snapshots.

Endpoints

GET/api/tweet

Returns complete tweet data in JSON format.

curl "https://social-api.anishroy.com/api/tweet?url={TWEET_URL}"

query url The full Twitter/X status URL.

GET/api/tweet-html

Returns a clean HTML render of the tweet with CSS.

https://social-api.anishroy.com/api/tweet-html?url={TWEET_URL}&theme=dim

query url The full Twitter/X status URL (Required).

query theme Optional: light, dark, dim, or black (Default: light).

query accent_color Optional: Hero and badge color (e.g., #1d9bf0).

query hide_media Optional: Set to true to hide images and videos.

query hide_metrics Optional: Set to true to hide engagement counts.

query hide_footer Optional: Set to true to hide the entire footer.

query hide_border Optional: Set to true to remove card border.

query hide_timestamp Optional: Set to true to hide the date line.

query bg_transparent Optional: Set to true for transparency.

query font_size Optional: small, medium, or large.

query width Optional: Custom width, e.g., 550px.

GET/api/tweet-svg

Returns a vector SVG capture of the tweet.

https://social-api.anishroy.com/api/tweet-svg?url={TWEET_URL}

Example

Try it out with a real tweet:

/api/tweet?url=https://x.com/iamanishroy/status/1595377607071121410