# X user profiles by usernames

Needs usernames.

X (Twitter) user profiles by usernames. Get Users by Usernames Price: $0.01 per user, $0.005 per pinned post hydrated (expansions). Up to 100 usernames. Billed on the resources actually returned (posts and users), the quote is the upper bound; X's 24-hour deduplication is not passed through.

- Tool ID: `x/users-by-usernames`
- Name in the catalog: X (Twitter) user profiles by usernames
- Provider: [X](/providers/x.md)
- Capability: [X profiles](/tools/x/profiles.md)
- Price: usage based, the maximum is shown before a run
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

Billed at the cost the provider reports for the call, never above $2. Your agent sees the maximum before running.


```json
{
  "model": "reported",
  "costPath": "",
  "costTerms": [
    {
      "path": "data",
      "usd": 0.01
    },
    {
      "path": "includes.tweets",
      "usd": 0.005
    }
  ],
  "maxUsdDefault": 0,
  "maxUsdCap": 2,
  "multipliers": [
    {
      "addUsdPer": {
        "field": "usernames",
        "usd": 0.01,
        "max": 100
      }
    },
    {
      "when": {
        "field": "expansions",
        "truthy": true
      },
      "addUsdPer": {
        "field": "usernames",
        "usd": 0.005,
        "max": 100
      }
    }
  ]
}
```

Pricing source: [https://docs.x.com/x-api/getting-started/pricing](https://docs.x.com/x-api/getting-started/pricing). $0.01 per user, $0.005 per pinned post hydrated (expansions). Up to 100 usernames..

Price verification date: 2026-10-08.

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "usernames": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z0-9_]{1,15}$"
      }
    },
    "user.fields": {
      "type": "array",
      "description": "The fields available for a User object.",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "confirmed_email",
          "connection_status",
          "created_at",
          "description",
          "entities",
          "id",
          "is_identity_verified",
          "location",
          "name",
          "parody",
          "profile_banner_url",
          "profile_image_url",
          "protected",
          "public_metrics",
          "receives_your_dm",
          "subscriber_count",
          "subscribes_to_you",
          "subscription",
          "subscription_type",
          "url",
          "username",
          "verified",
          "verified_followers_count",
          "verified_type",
          "withheld"
        ]
      }
    },
    "expansions": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "affiliation",
          "most_recent_post_id",
          "pinned_post_id"
        ]
      },
      "description": "A comma separated list of fields to expand."
    },
    "post.fields": {
      "type": "array",
      "description": "The fields available for a Post object.",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "article",
          "article_title",
          "attachments",
          "card_uri",
          "community_id",
          "context_annotations",
          "conversation_id",
          "created_at",
          "display_text_range",
          "edit_controls",
          "entities",
          "geo",
          "id",
          "lang",
          "matched_media_notes",
          "media_metadata",
          "non_public_metrics",
          "note_post",
          "note_request_suggestions",
          "organic_metrics",
          "paid_partnership",
          "possibly_sensitive",
          "promoted_metrics",
          "public_metrics",
          "reply_settings",
          "scopes",
          "source",
          "suggested_source_links",
          "suggested_source_links_with_counts",
          "text",
          "withheld"
        ]
      }
    }
  },
  "required": [
    "usernames"
  ],
  "additionalProperties": false
}
```

## Published example

This is the provider tool’s published example. Replace example values with the user’s requested inputs, respecting the schema; do not execute an example merely to test a connection.


```json
{
  "tool_id": "x/users-by-usernames",
  "input": {
    "usernames": [
      "x"
    ],
    "user.fields": [
      "public_metrics",
      "verified",
      "description"
    ]
  }
}
```

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

[Provider documentation](https://docs.x.com/x-api/users/lookup/introduction)

[REST inspection](https://api.agentik.cc/v1/tools/x/users-by-usernames) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/x/users-by-usernames) · [Agent index](/llms.txt)
