GET/twitter/urls

    Fetch Posts by URLs

    Retrieve detailed information for multiple posts by providing their respective URLs. This endpoint extracts metadata, content, and relevant engagement metrics associated with each specified URL. Billed per post returned: a post asked for twice is read and billed once, and URLs whose post cannot be read are left out of the list and not charged. When no post can be read, the request returns 200 with an empty list and is not charged. Billing metadata: successful billable responses include the `X-Desearch-Cost-Usd`, `X-Desearch-Usage-Count`, `X-Desearch-Service`, and `X-Desearch-Currency` headers. JSON object responses also include optional `cost_usd`, `usage_count`, `service`, and `currency` fields. Current prices are at https://desearch.ai/pricing. JSON arrays, text, and streaming responses keep their body shape and expose billing metadata only through headers.

    Base URL

    https://api.desearch.ai

    Implementation guidance

    Use Fetch Posts by URLs when your application needs fresh X data without maintaining its own crawler, social-data pipeline, or retrieval infrastructure. The endpoint returns structured data that can be consumed by agents, research tools, dashboards, and retrieval-augmented generation workflows. Keep the request focused on the minimum fields your workflow needs so responses remain fast and easy to validate.

    Send requests to GET /twitter/urls with your Desearch API key in the authorization header. Treat the key as a server-side secret, validate all required parameters before sending the request, and handle non-2xx responses explicitly. Production integrations should use sensible timeouts, retry only transient failures with backoff, and record the response status and request identifier for troubleshooting.

    Test the example request below before integrating it into a larger workflow. Confirm that the returned fields, links, and timestamps meet your freshness requirements, then add schema validation at the application boundary. For agentic systems, preserve source URLs with the generated answer so users can inspect evidence and your application can avoid presenting unsupported claims.

    Query Parameters

    urlsarray of stringsrequired

    List of urls that is to be retrieved.

    One item per line, or a JSON array. Sent as an array.

    Responses

    200A JSON object mapping tweet URLs to their details.
    301Moved Permanently
    304Not Modified
    401Unauthorized
    422Validation Error
    429Too Many Requests
    500Internal Server Error
    503X search is temporarily unavailable (the X crawler failed or timed out). The request is not charged.
    Authorization

    Your API key is sent in the Authorization header.

    Request
    curl -X GET "https://api.desearch.ai/twitter/urls?urls=https%3A%2F%2Fx.com%2FRacingTriple%2Fstatus%2F1892527552029499853" \
      -H "Authorization: YOUR_API_KEY" \
      -H "Content-Type: application/json"
    GET /twitter/urls
    ResponseSchema
    [
      {
        "user": {
          "id": "123456789",
          "url": "https://twitter.com/example_user",
          "name": "John Doe",
          "username": "johndoe",
          "created_at": "2023-01-01T00:00:00Z",
          "description": "This is an example user description.",
          "favourites_count": 100,
          "followers_count": 1500,
          "followings_count": 100,
          "listed_count": 10,
          "media_count": 50,
          "profile_image_url": "https://example.com/profile.jpg",
          "profile_banner_url": "https://example.com/banner.jpg",
          "statuses_count": 500,
          "verified": true,
          "is_blue_verified": true,
          "entities": {},
          "can_dm": true,
          "can_media_tag": true,
          "location": "Jamaica",
          "pinned_tweet_ids": [
            "123456789",
            "987654321"
          ],
          "professional": {
            "professional_type": "Business",
            "category": []
          },
          "affiliates_highlighted_label": {},
          "website": "https://t.co/4sVzS0XYIW"
        },
        "id": "987654321",
        "text": "This is an example tweet.",
        "reply_count": 10,
        "view_count": 1000,
        "retweet_count": 5,
        "like_count": 100,
        "quote_count": 2,
        "bookmark_count": 3,
        "url": "https://twitter.com/example_tweet",
        "created_at": "2023-01-01T00:00:00Z",
        "media": [],
        "is_quote_tweet": false,
        "is_retweet": false,
        "lang": "en",
        "conversation_id": "987654321",
        "in_reply_to_screen_name": "someuser",
        "in_reply_to_status_id": "987654320",
        "in_reply_to_user_id": "123456789",
        "quoted_status_id": "987654319",
        "quote": {
          "user": {
            "id": "123456789",
            "url": "https://twitter.com/example_user",
            "name": "John Doe",
            "username": "johndoe",
            "created_at": "2023-01-01T00:00:00Z",
            "description": "This is an example user description.",
            "favourites_count": 100,
            "followers_count": 1500,
            "followings_count": 100,
            "listed_count": 10,
            "media_count": 50,
            "profile_image_url": "https://example.com/profile.jpg",
            "profile_banner_url": "https://example.com/banner.jpg",
            "statuses_count": 500,
            "verified": true,
            "is_blue_verified": true,
            "can_dm": true,
            "can_media_tag": true,
            "location": "Jamaica",
            "pinned_tweet_ids": [
              "123456789",
              "987654321"
            ],
            "website": "https://t.co/4sVzS0XYIW"
          },
          "id": "987654321",
          "text": "This is an example tweet.",
          "reply_count": 10,
          "view_count": 1000,
          "retweet_count": 5,
          "like_count": 100,
          "quote_count": 2,
          "bookmark_count": 3,
          "url": "https://twitter.com/example_tweet",
          "created_at": "2023-01-01T00:00:00Z",
          "media": [],
          "is_quote_tweet": false,
          "is_retweet": false,
          "lang": "en",
          "conversation_id": "987654321",
          "in_reply_to_screen_name": "someuser",
          "in_reply_to_status_id": "987654320",
          "in_reply_to_user_id": "123456789",
          "quoted_status_id": "987654319",
          "quote": {
            "id": "987654321",
            "text": "This is an example tweet.",
            "reply_count": 10,
            "view_count": 1000,
            "retweet_count": 5,
            "like_count": 100,
            "quote_count": 2,
            "bookmark_count": 3,
            "url": "https://twitter.com/example_tweet",
            "created_at": "2023-01-01T00:00:00Z",
            "media": [],
            "is_quote_tweet": false,
            "is_retweet": false,
            "lang": "en",
            "conversation_id": "987654321",
            "in_reply_to_screen_name": "someuser",
            "in_reply_to_status_id": "987654320",
            "in_reply_to_user_id": "123456789",
            "quoted_status_id": "987654319",
            "replies": [],
            "display_text_range": [
              0,
              280
            ],
            "possibly_sensitive": false
          },
          "replies": [
            {
              "id": "987654321",
              "text": "This is an example tweet.",
              "reply_count": 10,
              "view_count": 1000,
              "retweet_count": 5,
              "like_count": 100,
              "quote_count": 2,
              "bookmark_count": 3,
              "url": "https://twitter.com/example_tweet",
              "created_at": "2023-01-01T00:00:00Z",
              "media": [],
              "is_quote_tweet": false,
              "is_retweet": false,
              "lang": "en",
              "conversation_id": "987654321",
              "in_reply_to_screen_name": "someuser",
              "in_reply_to_status_id": "987654320",
              "in_reply_to_user_id": "123456789",
              "quoted_status_id": "987654319",
              "display_text_range": [
                0,
                280
              ],
              "possibly_sensitive": false
            }
          ],
          "display_text_range": [
            0,
            280
          ],
          "entities": {
            "hashtags": [],
            "media": [],
            "symbols": [],
            "timestamps": [],
            "urls": [],
            "user_mentions": []
          },
          "extended_entities": {
            "media": []
          },
          "retweet": {
            "id": "987654321",
            "text": "This is an example tweet.",
            "reply_count": 10,
            "view_count": 1000,
            "retweet_count": 5,
            "like_count": 100,
            "quote_count": 2,
            "bookmark_count": 3,
            "url": "https://twitter.com/example_tweet",
            "created_at": "2023-01-01T00:00:00Z",
            "media": [],
            "is_quote_tweet": false,
            "is_retweet": false,
            "lang": "en",
            "conversation_id": "987654321",
            "in_reply_to_screen_name": "someuser",
            "in_reply_to_status_id": "987654320",
            "in_reply_to_user_id": "123456789",
            "quoted_status_id": "987654319",
            "replies": [],
            "display_text_range": [
              0,
              280
            ],
            "possibly_sensitive": false
          },
          "article": {
            "id": "2036821104418029568",
            "title": "How to become so creative it feels illegal",
            "preview_text": "string",
            "plain_text": "string",
            "first_published_at": 0
          },
          "content_disclosure": {},
          "edit_control": {
            "edit_tweet_ids": [
              "987654321"
            ],
            "editable_until_msecs": "1784103100000",
            "edits_remaining": "5",
            "is_edit_eligible": false
          },
          "possibly_sensitive": false,
          "card": {
            "type": "summary_large_image",
            "url": "https://t.co/hVHgyxtOZ9",
            "title": "Starship | Starlink Group 31-1 (Starship Flight 14)",
            "description": "14th test flight of the two-stage Starship launch vehicle.",
            "domain": "www.missionstatus.com",
            "image": "https://pbs.twimg.com/card_img/2104931127370690560/nssO7aWi?format=jpg&name=800x419",
            "image_alt": "string",
            "player_url": "https://www.youtube.com/embed/abc123",
            "broadcast_url": "https://x.com/i/broadcasts/1YGNrbPLejQGw",
            "state": "ENDED"
          }
        },
        "replies": [
          {
            "user": {
              "id": "123456789",
              "url": "https://twitter.com/example_user",
              "name": "John Doe",
              "username": "johndoe",
              "created_at": "2023-01-01T00:00:00Z",
              "description": "This is an example user description.",
              "favourites_count": 100,
              "followers_count": 1500,
              "followings_count": 100,
              "listed_count": 10,
              "media_count": 50,
              "profile_image_url": "https://example.com/profile.jpg",
              "profile_banner_url": "https://example.com/banner.jpg",
              "statuses_count": 500,
              "verified": true,
              "is_blue_verified": true,
              "can_dm": true,
              "can_media_tag": true,
              "location": "Jamaica",
              "pinned_tweet_ids": [
                "123456789",
                "987654321"
              ],
              "website": "https://t.co/4sVzS0XYIW"
            },
            "id": "987654321",
            "text": "This is an example tweet.",
            "reply_count": 10,
            "view_count": 1000,
            "retweet_count": 5,
            "like_count": 100,
            "quote_count": 2,
            "bookmark_count": 3,
            "url": "https://twitter.com/example_tweet",
            "created_at": "2023-01-01T00:00:00Z",
            "media": [],
            "is_quote_tweet": false,
            "is_retweet": false,
            "lang": "en",
            "conversation_id": "987654321",
            "in_reply_to_screen_name": "someuser",
            "in_reply_to_status_id": "987654320",
            "in_reply_to_user_id": "123456789",
            "quoted_status_id": "987654319",
            "quote": {
              "id": "987654321",
              "text": "This is an example tweet.",
              "reply_count": 10,
              "view_count": 1000,
              "retweet_count": 5,
              "like_count": 100,
              "quote_count": 2,
              "bookmark_count": 3,
              "url": "https://twitter.com/example_tweet",
              "created_at": "2023-01-01T00:00:00Z",
              "media": [],
              "is_quote_tweet": false,
              "is_retweet": false,
              "lang": "en",
              "conversation_id": "987654321",
              "in_reply_to_screen_name": "someuser",
              "in_reply_to_status_id": "987654320",
              "in_reply_to_user_id": "123456789",
              "quoted_status_id": "987654319",
              "display_text_range": [
                0,
                280
              ],
              "possibly_sensitive": false
            },
            "replies": [
              {}
            ],
            "display_text_range": [
              0,
              280
            ],
            "entities": {},
            "extended_entities": {},
            "retweet": {
              "id": "987654321",
              "text": "This is an example tweet.",
              "reply_count": 10,
              "view_count": 1000,
              "retweet_count": 5,
              "like_count": 100,
              "quote_count": 2,
              "bookmark_count": 3,
              "url": "https://twitter.com/example_tweet",
              "created_at": "2023-01-01T00:00:00Z",
              "media": [],
              "is_quote_tweet": false,
              "is_retweet": false,
              "lang": "en",
              "conversation_id": "987654321",
              "in_reply_to_screen_name": "someuser",
              "in_reply_to_status_id": "987654320",
              "in_reply_to_user_id": "123456789",
              "quoted_status_id": "987654319",
              "display_text_range": [
                0,
                280
              ],
              "possibly_sensitive": false
            },
            "article": {
              "id": "2036821104418029568",
              "title": "How to become so creative it feels illegal"
            },
            "content_disclosure": {},
            "edit_control": {
              "edit_tweet_ids": [
                "987654321"
              ],
              "editable_until_msecs": "1784103100000",
              "edits_remaining": "5",
              "is_edit_eligible": false
            },
            "possibly_sensitive": false,
            "card": {
              "type": "summary_large_image",
              "url": "https://t.co/hVHgyxtOZ9",
              "title": "Starship | Starlink Group 31-1 (Starship Flight 14)",
              "description": "14th test flight of the two-stage Starship launch vehicle.",
              "domain": "www.missionstatus.com",
              "image": "https://pbs.twimg.com/card_img/2104931127370690560/nssO7aWi?format=jpg&name=800x419",
              "player_url": "https://www.youtube.com/embed/abc123",
              "broadcast_url": "https://x.com/i/broadcasts/1YGNrbPLejQGw",
              "state": "ENDED"
            }
          }
        ],
        "display_text_range": [
          0,
          280
        ],
        "entities": {
          "hashtags": [
            {
              "indices": [
                0,
                5
              ],
              "text": "AAPL"
            }
          ],
          "media": [
            {
              "display_url": "pic.twitter.com/example",
              "expanded_url": "https://twitter.com/user/status/123/photo/1",
              "id_str": "1234567890123456789",
              "indices": [
                100,
                123
              ],
              "media_key": "3_1234567890123456789",
              "media_url_https": "https://pbs.twimg.com/media/example.jpg",
              "type": "photo",
              "url": "https://t.co/example"
            }
          ],
          "symbols": [
            {
              "indices": [
                0,
                5
              ],
              "text": "AAPL"
            }
          ],
          "timestamps": [],
          "urls": [
            {
              "display_url": "example.com",
              "expanded_url": "https://example.com/full-url",
              "url": "https://t.co/short",
              "indices": [
                50,
                73
              ]
            }
          ],
          "user_mentions": [
            {
              "id_str": "123456789",
              "name": "John Doe",
              "screen_name": "johndoe",
              "indices": [
                0,
                10
              ]
            }
          ]
        },
        "extended_entities": {
          "media": [
            {
              "display_url": "pic.twitter.com/example",
              "expanded_url": "https://twitter.com/user/status/123/photo/1",
              "id_str": "1234567890123456789",
              "indices": [
                100,
                123
              ],
              "media_key": "3_1234567890123456789",
              "media_url_https": "https://pbs.twimg.com/media/example.jpg",
              "type": "photo",
              "url": "https://t.co/example"
            }
          ]
        },
        "retweet": {
          "user": {
            "id": "123456789",
            "url": "https://twitter.com/example_user",
            "name": "John Doe",
            "username": "johndoe",
            "created_at": "2023-01-01T00:00:00Z",
            "description": "This is an example user description.",
            "favourites_count": 100,
            "followers_count": 1500,
            "followings_count": 100,
            "listed_count": 10,
            "media_count": 50,
            "profile_image_url": "https://example.com/profile.jpg",
            "profile_banner_url": "https://example.com/banner.jpg",
            "statuses_count": 500,
            "verified": true,
            "is_blue_verified": true,
            "can_dm": true,
            "can_media_tag": true,
            "location": "Jamaica",
            "pinned_tweet_ids": [
              "123456789",
              "987654321"
            ],
            "website": "https://t.co/4sVzS0XYIW"
          },
          "id": "987654321",
          "text": "This is an example tweet.",
          "reply_count": 10,
          "view_count": 1000,
          "retweet_count": 5,
          "like_count": 100,
          "quote_count": 2,
          "bookmark_count": 3,
          "url": "https://twitter.com/example_tweet",
          "created_at": "2023-01-01T00:00:00Z",
          "media": [],
          "is_quote_tweet": false,
          "is_retweet": false,
          "lang": "en",
          "conversation_id": "987654321",
          "in_reply_to_screen_name": "someuser",
          "in_reply_to_status_id": "987654320",
          "in_reply_to_user_id": "123456789",
          "quoted_status_id": "987654319",
          "quote": {
            "id": "987654321",
            "text": "This is an example tweet.",
            "reply_count": 10,
            "view_count": 1000,
            "retweet_count": 5,
            "like_count": 100,
            "quote_count": 2,
            "bookmark_count": 3,
            "url": "https://twitter.com/example_tweet",
            "created_at": "2023-01-01T00:00:00Z",
            "media": [],
            "is_quote_tweet": false,
            "is_retweet": false,
            "lang": "en",
            "conversation_id": "987654321",
            "in_reply_to_screen_name": "someuser",
            "in_reply_to_status_id": "987654320",
            "in_reply_to_user_id": "123456789",
            "quoted_status_id": "987654319",
            "replies": [],
            "display_text_range": [
              0,
              280
            ],
            "possibly_sensitive": false
          },
          "replies": [
            {
              "id": "987654321",
              "text": "This is an example tweet.",
              "reply_count": 10,
              "view_count": 1000,
              "retweet_count": 5,
              "like_count": 100,
              "quote_count": 2,
              "bookmark_count": 3,
              "url": "https://twitter.com/example_tweet",
              "created_at": "2023-01-01T00:00:00Z",
              "media": [],
              "is_quote_tweet": false,
              "is_retweet": false,
              "lang": "en",
              "conversation_id": "987654321",
              "in_reply_to_screen_name": "someuser",
              "in_reply_to_status_id": "987654320",
              "in_reply_to_user_id": "123456789",
              "quoted_status_id": "987654319",
              "display_text_range": [
                0,
                280
              ],
              "possibly_sensitive": false
            }
          ],
          "display_text_range": [
            0,
            280
          ],
          "entities": {
            "hashtags": [],
            "media": [],
            "symbols": [],
            "timestamps": [],
            "urls": [],
            "user_mentions": []
          },
          "extended_entities": {
            "media": []
          },
          "retweet": {
            "id": "987654321",
            "text": "This is an example tweet.",
            "reply_count": 10,
            "view_count": 1000,
            "retweet_count": 5,
            "like_count": 100,
            "quote_count": 2,
            "bookmark_count": 3,
            "url": "https://twitter.com/example_tweet",
            "created_at": "2023-01-01T00:00:00Z",
            "media": [],
            "is_quote_tweet": false,
            "is_retweet": false,
            "lang": "en",
            "conversation_id": "987654321",
            "in_reply_to_screen_name": "someuser",
            "in_reply_to_status_id": "987654320",
            "in_reply_to_user_id": "123456789",
            "quoted_status_id": "987654319",
            "replies": [],
            "display_text_range": [
              0,
              280
            ],
            "possibly_sensitive": false
          },
          "article": {
            "id": "2036821104418029568",
            "title": "How to become so creative it feels illegal",
            "preview_text": "string",
            "plain_text": "string",
            "first_published_at": 0
          },
          "content_disclosure": {},
          "edit_control": {
            "edit_tweet_ids": [
              "987654321"
            ],
            "editable_until_msecs": "1784103100000",
            "edits_remaining": "5",
            "is_edit_eligible": false
          },
          "possibly_sensitive": false,
          "card": {
            "type": "summary_large_image",
            "url": "https://t.co/hVHgyxtOZ9",
            "title": "Starship | Starlink Group 31-1 (Starship Flight 14)",
            "description": "14th test flight of the two-stage Starship launch vehicle.",
            "domain": "www.missionstatus.com",
            "image": "https://pbs.twimg.com/card_img/2104931127370690560/nssO7aWi?format=jpg&name=800x419",
            "image_alt": "string",
            "player_url": "https://www.youtube.com/embed/abc123",
            "broadcast_url": "https://x.com/i/broadcasts/1YGNrbPLejQGw",
            "state": "ENDED"
          }
        },
        "article": {
          "id": "2036821104418029568",
          "title": "How to become so creative it feels illegal",
          "preview_text": "string",
          "plain_text": "string",
          "cover_media": {
            "url": "https://pbs.twimg.com/media/example.jpg",
            "width": 1920,
            "height": 768
          },
          "first_published_at": 0
        },
        "content_disclosure": {
          "advertising_disclosure": {
            "is_paid_promotion": true
          }
        },
        "edit_control": {
          "edit_tweet_ids": [
            "987654321"
          ],
          "editable_until_msecs": "1784103100000",
          "edits_remaining": "5",
          "is_edit_eligible": false
        },
        "possibly_sensitive": false,
        "card": {
          "type": "summary_large_image",
          "url": "https://t.co/hVHgyxtOZ9",
          "title": "Starship | Starlink Group 31-1 (Starship Flight 14)",
          "description": "14th test flight of the two-stage Starship launch vehicle.",
          "domain": "www.missionstatus.com",
          "image": "https://pbs.twimg.com/card_img/2104931127370690560/nssO7aWi?format=jpg&name=800x419",
          "image_alt": "string",
          "player_url": "https://www.youtube.com/embed/abc123",
          "broadcast_url": "https://x.com/i/broadcasts/1YGNrbPLejQGw",
          "state": "ENDED"
        }
      }
    ]
    Status codes200301304401422429500503