When a <10k user browses to a deleted question, they are told whether the question was deleted voluntarily by its author, or by others moderating the site (i.e. "for reasons of moderation"). This information is considered public and is visible to all users.

The only way to check this, though, is to actually load the question. This information isn't made available through the API or SEDE. Can we please make this info available through those means?

One use case for having it available through the API is that I've noticed some cases of spam in which a spammer posts their spam question and deletes it shortly afterwards, and then undeletes it at some point in the future, when it's old enough to be off the home page that no one sees it. The programs written by Charcoal can't tell if a question was deleted voluntarily as they use the API, so when a post is deleted they just stop watching it. If the bots knew that a certain caught question was deleted by its author, they could keep an eye on it and alert if it gets undeleted.

Can we please make the information as to whether or not a deleted question was deleted voluntarily by its author available in the API? I'm aware that in certain cases it may misidentify posts, such as posts that were voluntarily deleted by deleted users, but this isn't an issue for the use case I've pointed out (deleted accounts can't restore their own posts for obvious reasons).

  • 1
    You can't know how it is deleted but for your typical usecase you can already get that data: data.stackexchange.com/stackoverflow/query/1274425 as it is recorded who deleted and who were the voters. A difference either tells you it was for moderation or by reviewers. That data is kept so after it gets undeleted the data shows up in SEDE. Whether you fancy that being 7 days stale at some point is up for discussion
    – rene
    Commented Aug 11, 2020 at 12:58
  • 5
    I am not familiar with how SEDE data is obtained, I imagine it could work there. But this is currently impossible for the API. The API works off a model that completely ignores deleted content altogether. Trying to get information about a deleted post would require the API being able to see deleted posts, which would require a pretty major overhaul of the API first. When looking up a post in the API, there is logically no difference between "deleted for reasons of moderation", "deleted by owner", and "never existed at all" unless you happen to know it existed before.
    – animuson StaffMod
    Commented Aug 11, 2020 at 20:23
  • @animuson Just FYI: While I agree with most of what you've said (and much I just accept, as you're the knowledgeable expert), for some endpoints there is a difference in the SE API response between the post never existing vs deleted. The endpoints which come to mind are /questions/{id}/flags/options, /answers/{id}/flags/options, etc. Example response for never existed and deleted.
    – Makyen
    Commented Jul 13, 2022 at 22:25
  • For anyone else trying the above links, you'll need to get an access token by clicking "Get Token". IIRC, there are a variety of other endpoints which have response differences between the post never existing vs. being deleted. Note that I don't disagree with animuson that making a change to the SE API to generally provide post information about deleted posts would be a substantial effort. Depending on how it's done, if the API revision isn't rolled, it would likely break a lot of 3rd party code which use the SE API, as it's very common to rely on getting no data for deleted posts.
    – Makyen
    Commented Jul 13, 2022 at 22:31


You must log in to answer this question.

Browse other questions tagged .