What changed on a peer’s X account, and which newly observed posts deserve follow-up?
What changed on a peer’s X account, and which newly observed posts deserve follow-up?
To follow a public X account, save page one of the account’s timeline from twitter.web.fetch_user_post_tweet as the baseline. In each later check, fetch page one again and run watch_account.py to match post IDs against the saved state. Record publication time and discovery time separately, then select the product updates, events or discussions worth following up.
For example, if an older pinned post first appears today, label the post “Older post discovered today.” For a newly published release notice, share the original post and the effective date with the team.
Establish a baseline before treating a whole page as news
Verify that the handle belongs to the intended public account, and save the account’s homepage response and the actual observation time. The first new-posts.csv contains only headers because the first run establishes the starting point; empty rows do not mean the account has no content. Each later run continues from the latest accepted state, and every earlier export stays in place.
If a handle changes, is reused or becomes uncertain, verify the account identity and start a new baseline; watch_account.py does not prove ownership continuity on its own. To reorganize data, compare saved responses locally instead of buying another homepage request.
Which newly observed items deserve a teammate’s attention?
Use the table as a review guide for common changes:
A person decides relevance. High engagement is not automatically a business opportunity, and one account’s activity does not show industry growth.
Hand over a change brief that supports further research
Keep the account, the observation times, the newly observed IDs, the source posts, the specific change, the business relevance, and the next check. new-posts.csv is a candidate list. Add editorial reasons, owner, and processing status in a separate working copy; watch_account.py does not populate editorial reasons, owner, or status columns.
Read the round’s coverage.json, inspect the original evidence, and only then accept the round’s new state.json. Checking only the homepage can miss posts published between observations. A historical backfill needs a separately approved scope and must not become the next routine checkpoint. State the homepage-only limit in the brief, so that “not observed” is not mistaken for “did not happen”.
For a watch list of 20 accounts, keep a separate baseline and last successful time for each account. If one account’s lookup fails, report the other accounts’ changes and mark the failed account for follow-up. When the failed account’s lookup works again, compare the account with the account’s own last valid state.
Choose an observation cadence and estimate scope
Request another account observation only when you need one. Budget the cost as account count × rounds × current action price; extra pages, retries, model analysis and message delivery are separate costs. Do not raise the frequency automatically because a page is short; choose an approved cadence from the research question and the omissions you can accept.
Steps 1–6 below implement collection and comparison. watch_account.py never buys queries on its own; collecting new pages and sending a digest are separate actions you decide on.
1. Choose the account and cap the cost
Checking page one for 20 accounts daily for 30 days takes 600 list requests. Count additional pages and model usage separately. See BeatAPI pricing.
Pass the account name as screen_name, without @ and without a full profile URL. twitter.web.fetch_user_post_tweet also accepts integer rest_id, and rest_id takes precedence when both are sent, so the workflow sends only screen_name. twitter.web.fetch_user_post_tweet has no tab parameter. Replies, media-only feeds and keyword mentions are not interchangeable with an account’s post timeline.
2. Save one homepage observation
Save request.json with the intended handle:
After approving the query, save the original response and the headers in a new directory:
Record the real HTTP status and a collection time with a timezone. An error leaves the previous monitoring state unchanged; keep the failed raw file and do not retry automatically. Use the complete direct response, not the first few items of an AI preview.
Save observation.json next to the response directory. Replace all illustrative values with your actual request and observation:
3. Establish a baseline, then compare the next saved page
Save the script below as watch_account.py, then run the script in two stages:
- For the first saved page, run
python3 watch_account.py observation.json - x-baseline. The hyphen means no previous state: every returned timeline item becomes the baseline, andnew-posts.csvcontains headers only. - For each later observation, run
python3 watch_account.py observation-next.json x-baseline/state.json x-next. Pass the latest acceptedstate.jsonpath on the next run, and never overwrite the previous output folder.
watch_account.py runs offline. Before creating outputs, the script validates the account scope, time ordering, request replay, string IDs, reported counters and response structure. A changed counter on the same ID is not a new post. Every unique item on the current page goes into observed-posts.csv; for an ID repeated within the page, the script keeps the first row, and raw-response.json keeps every occurrence.
4. Read the result correctly
new-posts.csv: newly observed IDs relative to your stored state, not proof of publication since yesterday. An old post newly surfaced by the platform can appear here.observed-posts.csv: the current page with baseline/seen_before/newly_observed labels, text, reported publication time, metrics and query provenance. Missing counters stay blank and reported zero stays zero.profile.jsonandpinned.json: separate copies of the originaldata.useranddata.pinnedobjects. The timeline author’s name andscreen_namewere null in the observed contract, so the script does not fill the author columns with the requested account’s name. A repost can refer to someone else’s content;has_retweeted_objectmarks that the repost’s original object is present, and the original object stays in the raw JSON.coverage.json: the current page’s counts, the raw-source hash and the continuation cursor. Previously seen IDs that are absent now are not labeled deleted. The hash detects changes to the saved source; the hash does not authenticate the account identity and is not a tamper-proof history.state.json: the cumulative seen IDs and accepted request IDs for the handle. A renamed or reassigned handle needs a new reviewed baseline;watch_account.pydoes not validate account ownership continuity on its own.
A pinned post is not added to the new-post list only because the post is pinned. If the same ID also appears in the timeline, normal deduplication applies. Do not replace missing author fields, views or text with guesses.
5. Make gaps and continuation explicit
Each new monitoring run starts at the account homepage without a cursor. Do not reuse yesterday’s cursor as today’s starting point, and do not stop processing the page at the first known ID: pinning or mixed ordering can put older IDs before new ones.
One first page per day can miss posts from a busy account. watch_account.py records next_cursor and, for a nonempty page, writes backfill-request.json. backfill-request.json proposes a request for an older page with its own budget; the script never sends the request. Keep backfilled historical responses as a separate collection. watch_account.py rejects requests with a cursor, so a backfilled page cannot silently become the next daily checkpoint. When missed posts would matter, use a higher approved frequency or a separately specified backfill workflow. Neither a missing cursor nor an empty page proves that all history was covered.
6. Hand off an actionable digest
- Review
new-posts.csvfor relevant changes, and add why each item matters. - Link each item as
https://x.com/i/status/<tweet_id>with the preserved ID. - Summarize the selected public business activity; leave out personal whereabouts and inferred private attributes.
- Record the sampled account, the query time, the unique IDs and the coverage limit in the digest.
watch_account.py does not send the digest to a team or schedule recurring paid requests; configure either action separately.
Before adopting the next state, compare two rows with raw-response.json and inspect coverage.json. Rerunning exports on saved data adds no API charges. Contract basis: the documented output shape of twitter.web.fetch_user_post_tweet; replace the illustrative account handle in the examples with your target public screen_name.

