GET /2/users/by
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/x_unified_api/2/users/byCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeLook up up to 100 profiles by username
Parameters
| name | in | type | description | |
|---|---|---|---|---|
expansions | query | str | optional | example: author_id |
user_fields | query | str | optional | example: name,username |
usernames | query | str | required | example: jack |
Response
type: object
pagination: none
sample: {
"data": "array[1]",
"meta": "object"
}
Safe request
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/x_unified_api/2/users/by?expansions=author_id&user_fields=name%2Cusername&usernames=jack"