GETX (Twitter)Preview (Coming Soon)

/v1/twitter/user/profile

X user profile lookup — Fetch normalized X (Twitter) user profile

Current Unit Price (Live Catalog)
$0.0020 USD
Required Scope
twitter:read
Run in Playground

Parameters

NameLocationTypeDescription & Constraints
Idempotency-Keyheaderstring
Optional idempotency key (max 128 characters, scoped to organization + endpoint for 24h). Reusing with different canonical parameters returns 409 IDEMPOTENCY_CONFLICT.
maxLength=128
username*querystring
minLength=1 · maxLength=64 · ex: sample_dev

Code Examples

curl 'https://api.socialapi.tr/v1/twitter/user/profile?username=sample_dev' \
  -H 'Authorization: Bearer sapi_live_REPLACE_ME'
Replace sapi_live_REPLACE_ME with a server-side key. Never expose API keys in browser code.

Response Data Fields

FieldTypeRequired
syntheticbooleanOptional
idstringYes
usernamestringYes
display_namestringYes
descriptionstringOptional
followers_countinteger (int64)Yes
following_countinteger (int64)Yes
tweet_countinteger (int64)Yes
verifiedbooleanYes
created_atstring (date-time)Yes

Example Response

Sample
{
  "success": true,
  "data": {
    "synthetic": true,
    "id": "x_user_0123456789",
    "username": "sample_dev",
    "display_name": "Sample sample_dev",
    "description": "Synthetic X profile for deterministic mock mode.",
    "followers_count": 8400,
    "following_count": 215,
    "tweet_count": 412,
    "verified": true,
    "created_at": "2022-05-01T00:00:00Z"
  },
  "meta": {
    "request_id": "req_01syntheticexample",
    "platform": "twitter",
    "cached": false,
    "replayed": false,
    "billing": {
      "request_id": "2c91b99a-4d7c-4f21-b8b0-1234567890af",
      "amount": "0.0020",
      "currency": "USD",
      "status": "charged"
    }
  }
}

HTTP Responses

StatusMeaning
200Profile fetched (or idempotent replay; `data` omitted when replay payload retention is disabled)
400Validation error (not charged)
401Missing or invalid API key (not charged)
402Wallet available balance is below endpoint unit price (not charged)
403Missing scope, IP allowlist mismatch, suspended organization, disabled endpoint, or CORS denied (not charged)
404Social media resource or route not found (not charged)
409Idempotency-Key reused with different parameters or request still in progress (not charged)
429Key, organization, or platform rate limit exceeded (not charged)
502Upstream failure or billing finalization failure (`BILLING_FINALIZATION_FAILED`; data withheld, not charged)
503Provider not configured, circuit open, or rate limiter unavailable (fail-closed, not charged)
504Upstream provider exceeded deadline before lease expiry (reservation released, not charged)