I am looking at the Data Explorer and attempting to get a listing of tags flagged as spam (I'd like to use them to help build a spam identifier eventually, but that is not relevant to this question).

This query shows that 12 is the VoteType associated with spam

select * from votetypes 

This shows the most recent spam flags

select creationdate, count(*) 
from votes where votetypeid = 12 
group by creationdate order by creationdate desc

But, it is showing a very low number of spam flags (at least what I'd expect). Is this not an accurate way to detect which posts are flagged and removed as spam? Or are these particular questions not included in the data on the Data Explorer?

I am the original poster. This doesn't seem to have been associated with my account when I registered for Meta Stack Overflow. If that could be done, that would be helpful.

To answer the question below about why I'd like the spam posts - I am attempting to train a spam filter using a few different corupuses (corpii?). I had been hoping that the data dump provided by Stack Overflow would contain some such data.


2 Answers 2


Spam posts are eventually (...obviously) deleted. And, since there are no deleted posts kept in the SEDE, you won't be able to filter on or find these.


The situation has changed since this was posted - there is a table PostWithDeleted which contains some data about deleted posts. This includes the info about tags. See here: Can some metadata about deleted posts be included in Data.SE?

So, for example, you can get list of posts flagged as spam.

However, the body of those posts isn't available in the database.

The OP asked about the tags. The tags are among the things which are available for deleted question. So, for example, you can find the list of spam posts in a specific tag.

If you want the list of all tags, there is an issue that the PostTags table doesn't contain the data about deleted questions. But there are some possible workarounds: Number of spam questions per tag and a similar query only for tags which no longer exist. (For example, one can see that a tag called was created at some point - although it appeared only on two questions.)

You must log in to answer this question.