What's the minimum filter and simplest way to detect if a question (by its ID) was asked by a user whose account has been deleted?
1 Answer
I've finally found one such question.
From the \question\{id}\
route you need the !YwUIfd5b6 filter:
items
from.wrapper
owner
fromquestion
user_type
fromshallow_user
If you get {"items":[{"owner":{"user_type":"does_not_exist"}}]}
as a response, the owner has been deleted. Sample query.
(If you instead get {"items":[]}
then the ID is not a question's or the question has been deleted.)
-
2A question that was migrated to site where the asker doesn't have an account will show as "does_not_exist" as well (because they don't, on that site); you should check
migrated_from
if you want true "deletions". Commented Feb 17, 2012 at 17:46