Fix the author before refining the words

If you remember an author discussing an exhibition but not the date, confirm uid and put the remembered words in q. This search is scoped to that user’s posts rather than the entire platform. The same phrase can appear in original posts and reposts, so decide whether you need the author’s own statement or something they shared.

Combine time and content choices deliberately

Use page for later results and starttime with endtime for the time window. hasori, hasret, and the text, image, video, and music options determine included content types. Follow their documented values. A narrow window can hide useful leads; widen it in a recorded sequence rather than changing every condition without a trace of how the eventual source was found.

Verify who actually said the quoted words

For a hypothetical exhibition repost, record the source, matching phrase, and reason it appears relevant, then inspect the original context. Keep the user’s added comment separate from the reposted body so another person’s opinion is not attributed to the target author. Interaction counts do not verify the statement. Preserve a precise link and review notes. If nothing is found, report the search scope instead of concluding that the author never discussed the subject.

Request URL and parameters

GET https://api.trmesh.com/openapi/api/v1/weibo/web_v2/search_user_posts

Parameter Type Required Meaning
uid string Yes User ID
q string No Search keyword
page integer No Page number
starttime integer / null No Start timestamp
endtime integer / null No End timestamp
hasori integer No Include original posts, 1=include, 0=exclude
hasret integer No Include retweets, 1=include, 0=exclude
hastext integer No Include text posts, 1=include, 0=exclude
haspic integer No Include image posts, 1=include, 0=exclude
hasvideo integer No Include video posts, 1=include, 0=exclude
hasmusic integer No Include music posts, 1=include, 0=exclude

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/weibo/web_v2/search_user_posts"
params = {
    "uid": "7277477906",
    "page": "1",
    "starttime": "1772294400",
    "endtime": "1772294400",
    "hasori": "1",
    "hasret": "1",
    "hastext": "1",
    "haspic": "1",
    "hasvideo": "1",
    "hasmusic": "1"
}
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.