Skip to main content
Look up an X user by username to retrieve their user ID and profile information.

Overview

The Lookup User endpoint resolves an X username to a user ID and profile details. This is useful for getting the user_id required by other endpoints like Send DM and Follow.

Authentication

Requires a valid API key with a connected X account.
curl -X POST https://api.trigify.io/v1/x/lookup-user \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "elonmusk"
  }'

Response Fields

FieldTypeDescription
successbooleanWhether the lookup succeeded
user_idstringThe X user’s numeric ID
usernamestringThe X username (handle)
namestringThe user’s display name
biostringThe user’s profile bio (optional)
follower_countnumberNumber of followers (optional)
following_countnumberNumber of accounts followed (optional)
credits_usednumberCredits charged for this request
credits_remainingnumberRemaining credits on your plan
daily_actions_remainingnumberRemaining daily actions

Credit Usage

This endpoint charges 1 credit per lookup.

Use Cases

  • Resolve user IDs: Get the user_id needed for Send DM or Follow
  • Profile enrichment: Retrieve follower counts and bio information
  • Workflow chaining: Use in workflows to look up a user, then follow or DM them