RequestBeam

Documentation

RequestBeam Docs

Twitter API

Use a unified Twitter API to query user profiles and timelines with X API v2-style response shapes.

This service provides a unified Twitter REST API. Callers receive consistent X API v2-style response structures.

text
/v1/twitter

Authentication

All Twitter API endpoints require Bearer Token authentication.

http
Authorization: Bearer YOUR_API_KEY

Base Path

Call these relative paths under your API Base URL.

text
GET https://api.requestbeam.com/v1/twitter/users
GET https://api.requestbeam.com/v1/twitter/users/{id}
GET https://api.requestbeam.com/v1/twitter/users/{id}/tweets

Response Shape

Successful Twitter API responses are not wrapped in success/data; they directly return normalized data, includes, and meta fields.

Supported Capabilities

  1. If you only have a username, call Get User By Username first and read data.id.
  2. Use data.id to call Get User Timeline.
  3. If you need author profile data in timeline responses, pass expansions=author_id.

Normalization Rules

  • User endpoints return one user object: { "data": { ... } }
  • Timeline endpoints return a tweet array: { "data": [ ... ], "meta": { ... } }
  • When expansions=author_id is requested, timeline responses include includes.users
  • user.fields and tweet.fields control optional field projection
  • User objects always keep id, name, and username
  • Tweet objects always keep id and text

Optional Fields

user.fields

Supported normalized user fields:

  • created_at
  • description
  • entities
  • location
  • pinned_tweet_id
  • profile_banner_url
  • profile_image_url
  • protected
  • public_metrics
  • url
  • verified
  • verified_type

tweet.fields

Supported normalized tweet fields:

  • attachments
  • author_id
  • conversation_id
  • created_at
  • edit_history_tweet_ids
  • entities
  • in_reply_to_user_id
  • lang
  • possibly_sensitive
  • public_metrics
  • referenced_tweets
  • source

Debugging

  • Every response includes X-Request-Id
  • Record it when calls fail, results look abnormal, or the service returns rate limits
  • For billing questions, keep X-Request-Id and the request time

Endpoints