FetchPI
Log in

X profile API

X profile data in one REST call — normalized to the stable JSON schema shared across every FetchPI platform.

  • 1 documented endpoints
  • GET /v1/x/users/{username}

Contract summary (English): Get a normalized X profile (capability x.profile)

Normalized response entity
x/profile
capability
x.profile

Every response also carries freshness (cache / default / live) and billing metadata.

Use cases

  • Enrich CRM and outreach tooling with up-to-date {{platform}} profile data — follower counts, verification status and bios as structured JSON.
  • Screen creator and partner accounts before a campaign with consistent, queryable profile metrics.
  • Re-query the same handle and diff the normalized fields to track profile changes over time.

Response fields

X Profile (normalized)

Normalized X profile entity. This is the ONLY upper-layer format. Provider-private fields MUST NOT appear here; unknown provider fields are dropped by the Normalizer, never passed through.

FieldTypeRequiredDescription
idstringRequiredPlatform-stable user id (numeric string on X).
platform"x"Required—
type"profile"Required—
usernamestringRequiredHandle without leading @.
display_namestring | nullOptional—
descriptionstring | nullOptional—
urlstring | nullOptional—
profile_image_urlstring | nullOptional—
banner_image_urlstring | nullOptional—
locationstring | nullOptional—
verifiedbooleanRequiredLegacy verified flag. Subscription badges are NOT surfaced (provider-specific).
created_atstring | nullOptionalAccount creation time, UTC RFC3339; null when the provider does not expose it.
metrics.followersintegerRequired—
metrics.followingintegerRequired—
metrics.postsintegerRequired—
metrics.likesintegerOptionalLifetime likes received; omitted when unknown.
fetched_atstringRequiredWhen the platform data was actually collected (UTC RFC3339).

Field notes are shown in the contract's original English.

Response meta

FieldTypeRequiredDescription
modecache | default | liveRequiredEffective mode after merging param > max_age > source policy (D-004).
age_secondsinteger | nullOptionalAge of served data; null when unknown.
source_layercache | db | upstreamRequiredWhich layer served the response (PRD §10).
stalebooleanOptionalTrue when stale data was served under stale_if_error / SWR (D-004).
billing.amount_creditsintegerRequiredMicro-USD (1e-6 USD) actually charged for this request.
billing.cache_hitbooleanRequired—

Field notes are shown in the contract's original English.

Example request & response

GET/v1/x/users/{username}
curl -H "Authorization: Bearer $MESHDATA_API_KEY" \
  "https://api.fetchpi.com/v1/x/users/newdev"
{
  "data": {
    "id": "2244994945",
    "platform": "x",
    "type": "profile",
    "username": "newdev",
    "display_name": "New Dev",
    "description": "Building data APIs.",
    "url": "https://x.com/newdev",
    "profile_image_url": "https://cdn.example.com/avatar/newdev.jpg",
    "banner_image_url": null,
    "location": "Berlin",
    "verified": false,
    "created_at": "2019-04-01T10:15:00Z",
    "metrics": {
      "followers": 1204,
      "following": 312,
      "posts": 870,
      "likes": 15200
    },
    "fetched_at": "2026-09-18T09:00:00Z"
  },
  "meta": {
    "request_id": "req_01HTXQ8Z9HTQ",
    "freshness": {
      "mode": "default",
      "age_seconds": 120,
      "source_layer": "db",
      "stale": false
    },
    "billing": {
      "amount_credits": 100,
      "cache_hit": false
    }
  }
}

Free demo

Create a free account, grab an API key and call this endpoint from the browser-based Playground.

Try it in the Playground

Parameter tables, error codes and response semantics for this endpoint live in the API documentation.

Open the endpoint reference

Frequently asked questions

What does the X profile API return?

A normalized profile object — identity, bio and audience fields as defined in the field table below — plus freshness and billing metadata.

Can I try this endpoint for free?

Yes — register an account, grab an API key and call it from the Playground in the console.

How is the profile capability billed?

Data API calls are billed per request in credits, with different cache/live freshness multipliers. Current per-capability prices live on the pricing page.

Pricing

Per-request credit billing with cache/live freshness options — current prices live on the pricing page.