Skip to content
Scrappa Get API key
X (Twitter) API 1 credit/request

X (Twitter) Tweet Media

GET https://scrappa.co/api/x-twitter/tweet/media

Every photo and video attached to a tweet, including focus rects and crop candidates. Media URLs are only ever reported when they arrive in an upstream payload; no CDN path is ever synthesised.

X (Twitter) Tweet Media 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/x-twitter/tweet/media
Auth header
x-api-key
Cost
1 credit/request
id = 1234567890
Response preview
200 OK
{
    "id": "1234567890123456789",
    "media": [
        {
            "url": "https://pbs.twimg.com/media/example.jpg",
            "type": "photo",
            "cropped_url": "https://pbs.twimg.com/media/cropped_example.jpg",
            "focus_rects": [
                {
                    "h": 100,
                    "w": 100,
                    "x": 0,
                    "y": 0
                }
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

id string Required

Tweet id, or any public x.com status URL. A full status URL is accepted and the id is extracted from it.

Example value 1234567890

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

id media

Common media fields

url type cropped_url focus_rects
JSON Response
200 OK
{
    "id": "1234567890123456789",
    "media": [
        {
            "url": "https://pbs.twimg.com/media/example.jpg",
            "type": "photo",
            "cropped_url": "https://pbs.twimg.com/media/cropped_example.jpg",
            "focus_rects": [
                {
                    "h": 100,
                    "w": 100,
                    "x": 0,
                    "y": 0
                }
            ]
        }
    ]
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.