Does a successful empty timeline mean the API is broken?
No. A successful twitter.web.fetch_search_timeline response with data.timeline: [] means that search page returned zero posts, not that the API failed. Check the HTTP status and status field first, then verify data.timeline. If data.timeline is missing or the request failed, inspect the full response and request_id. When a brand or product-model query returns an empty timeline, check spelling and filters first and run any simpler query as a separate search.
Diagnose the response you already saved
- Use the complete direct response from
/v1/social-data/call, not a shortened AI preview. - Read the actual HTTP status code from the saved response headers.
- Save the script below as
diagnose_x_search.py. - Run
python3 diagnose_x_search.py x-search-page-1.json 200 diagnosis.json, replacing200with the actual HTTP status.
diagnose_x_search.py sends no requests, leaves the original response file unchanged, and writes only the new diagnosis.json. The state printed by diagnose_x_search.py classifies the saved response rather than confirming a successful collection.
What should I do with the diagnosis?
diagnose_x_search.py validates the response envelope, the data.timeline array, and usable tweet_id strings. diagnose_x_search.py does not evaluate post accuracy or every metric field; field-level export checks belong to the CSV exporter in the search guide. source_sha256 in diagnosis.json links the report to the local response bytes and is not a signed server receipt.
Should I simplify the query or switch to Latest?
Check the exact saved request before changing any parameter. The search phrase goes in keyword, and search_type defaults to Top. Latest requests recent ordering rather than guaranteeing complete results or coverage of a specific date range. Modify the query only when you can identify a concrete fix such as a misspelling, an incorrect brand name, or an unintended extra filter. Record the original zero-row observation separately from the revised query, keeping each run’s settings and collection time distinct.
Every changed phrase, changed search_type, or next page is a separate paid request. Check the current price of data:twitter.web.fetch_search_timeline at /v1/capabilities/inspect before approving another call, and avoid automatically trying multiple query variants just to obtain a nonempty page. If an empty page still returns a cursor, diagnosis.json records has_nonblank_cursor; diagnose_x_search.py does not follow that cursor, and the next page may also return zero matches.
Saved-page CSV export · Latest versus Top · X questions
Contract reference: data:twitter.web.fetch_search_timeline.

