Empty response

Twitter returned JSON with no user or community data.

The error#

Empty response

ScraperException. Raised when the user-by-screen-name or user-by-id payload has no data, or no result under the user, and again for an empty community payload. It is raised before User unavailable.

These are nearby, and they are not the same string:

Could not resolve user ID {id!r} to username
Could not resolve username {username!r} to ID

What triggers it#

The GraphQL call returned, and the object the scraper expected is missing or empty. A transport failure never gets here. That ends in failed, giving up.

How to confirm#

The text is exactly Empty response. If the typename is UserUnavailable, you get User unavailable instead. If the log says blocked, the guest token was dropped before a parse.

Fixes#

Retry once in case the empty payload was a partial GraphQL error (the checker can return success with a warning when errors and instructions are both present). A second empty payload for the same id is not a pause-and-retry problem. Confirm the id in a browser. snscrape does not fill an empty user from another endpoint in this function.

SocialScrape#

Profile is GET /v1/twitter/profile. One post is GET /v1/twitter/tweet. A profile's posts are GET /v1/twitter/profile/tweets. These read what X shows logged out.

Failed requests cost 0 credits. New accounts get 100 credits on signup, no card. Suspended accounts come back as removed, unknown ones as not_found.

Questions

Is Empty response a network error?

No. The HTTP call returned JSON, and the user or community object was empty.

What does SocialScrape return?

not_found when X says the account does not exist. The failure is free.