An account on your industry watchlist now displays a different name. One colleague wants to add a new author; another thinks the existing account was renamed. A profile lookup can clarify the current record, but it does not automatically reconstruct every past name change.
Choose the question before the lookup
The contract supports a screen name or a user ID. When the ID is supplied, the screen name is ignored. Asking who currently uses a particular name is therefore different from asking what a known account currently displays. Do not provide both and assume the service checks that they match.
Maintain your own observed aliases
Compare the returned profile with previously confirmed records. Retain the old name, the lookup basis, the current available details, and the observation time. Do not assume the response includes a naming history. If the evidence conflicts, revisit known sources before overwriting a record.
Attach research to the confirmed account
Once the identity relationship is established, connect existing research to that account and maintain the display name separately. This prevents two names from becoming two supposedly independent voices in a report. The profile endpoint does not retrieve historical posts or prove the real-world identity behind an account. Leave unresolved cases marked for review rather than merging them merely to tidy the sheet.
Request URL and parameters
GET https://api.trmesh.com/openapi/api/v1/twitter/web/fetch_user_profile
| Parameter | Type | Required | Meaning |
|---|---|---|---|
screen_name |
string | No | Screen Name |
rest_id |
integer | No | User ID (If the user ID is used, the user name will be ignored) |
Run the Python example
Install requests and set TRMESH_API_TOKEN in your environment. Replace the sample identifiers with the public object you intend to inspect. Example IDs may no longer be available.
import os
import requests
# Read your own developer key from the server environment.
url = "https://api.trmesh.com/openapi/api/v1/twitter/web/fetch_user_profile"
params = {
"screen_name": "elonmusk",
"rest_id": "44196397"
}
response = requests.get(
url, params=params, timeout=30,
headers={"Authorization": f"Bearer {os.environ['TRMESH_API_TOKEN']}"},
)
response.raise_for_status()
payload = response.json()
print(payload) # Inspect the actual response before mapping fields
Endpoint documentation · Free profile tool
API calls use your TRMesh account allowance. Check the endpoint price before running a script.