X user profile by username — followers, bio, verified
x.x.user.profile.by_usernameGet any public X user's profile by handle
- Price
- $0.01/resultPelo preço do provedor
- Success rate
- 100%Last 30 days · 78 calls
- Latency p50
- 146 msp95 369 ms
- Last verified
- 28 de jul. de 2026Verified working
GEThttps://toolswitch.dev/v1/tools/x.x.user.profile.by_username?user.fields=id%2Cname%2Cusername%2Cdescription%2Cpublic_metrics%2Cverified%2Ccreated_atPreview- Uses platform quota
- Synchronous response
- Reads public data
Parâmetros
for several handles at once use GET /2/users/by?usernames=a,b,c (up to 100) — one request against the cap instead of 100
| Parâmetro | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|
| Parâmetros de caminho | ||||
username | string | Obrigatório | handle without the '@' | elonmusk |
| Parâmetros de consulta | ||||
user.fields | string | Opcional | id,name,username,description,public_metrics,verified,created_at | |
- Parâmetros de caminho
usernamestringObrigatóriohandle without the '@'
Exemplo:
elonmusk- Parâmetros de consulta
user.fieldsstringOpcionalExemplo:
id,name,username,description,public_metrics,verified,created_at
Exemplos de código
Substitua $TOOLSWITCH_KEY pela chave criada no console.
Preview
curl -X GET 'https://toolswitch.dev/v1/tools/x.x.user.profile.by_username?user.fields=id%2Cname%2Cusername%2Cdescription%2Cpublic_metrics%2Cverified%2Ccreated_at' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/x.x.user.profile.by_username?user.fields=id%2Cname%2Cusername%2Cdescription%2Cpublic_metrics%2Cverified%2Ccreated_at",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/x.x.user.profile.by_username?user.fields=id%2Cname%2Cusername%2Cdescription%2Cpublic_metrics%2Cverified%2Ccreated_at", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Esta API de gateway está em prévia; a URL e a autenticação podem mudar. Os parâmetros do exemplo são dados de amostra. As chamadas são cobradas a $0.01/result, incluindo a taxa de serviço.