The error#
User unavailable
Community unavailableBoth are EntityUnavailable. The class docstring says: the target entity of the scrape is unavailable, possibly because it does not exist or was suspended.
User unavailable is raised when the GraphQL user result's __typename is UserUnavailable, for a screen name and for a rest id. Community unavailable is raised for a community that comes back empty or unavailable.
An empty data object before that check is a different exception, ScraperException with Empty response.
What triggers it#
The guest token worked well enough to return JSON, and the user or community object says it is unavailable. A suspended account and a deleted one share this class. The docstring does not split them.
How to confirm#
type(e).__name__ is EntityUnavailable and the text is one of the two lines. Empty response is ScraperException, not this class. blocked (404) never reached this parser.
Fixes#
Check the handle in a browser while signed out. If X shows the account as suspended or missing, this exception is the match. Retrying the same handle does not unsuspend it. There is no cookie path 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.