(back to ao3-ing)

advanced ao3 filtering: lesson i

filter_ids: the old-fashioned filtering method on ao3

okay, so. *deep breath*

a screenshot of the ao3 filter bar from around 2017. it has pretty much everything the modern ao3 filter bar has, with the ability to choose how we sort our search, as well as drop-downs for ratings, warnings, categories, fandoms, characters, relationships, and additional tags. it also has an input box for 'other tags' and 'search within results', a language drop-down selector, and finally the ability to search for complete only. however, each of these things are on an include-only basis.

ao3 has tags that we use to filter stuff in and out of our searches. but we didn't always have the privilege of simply having a sidebar which allowed us to just hit a button or to exclude our shit.

this method actually still works and is how i get my sticky filters to actually filter tags, rather than keywords, from my every search. but, like, even in the Archaic Times (the dark ages…), this was rarely-understood knowledge, and people often relied on the filter-me-ao3 tumblr blog to assist them.

anyway, so there are basically two key parts to this method. first is that we use the "search within results" box; the second requires knowledge of the cryptic filter_ids .

see, as many of us are aware, part of the reason ao3 tags are so useful despite being entirely user-defined is that we have tag wranglers who will make sure that every tag, even when worded in a chatty or non-standard fashion, will be made a synonym of a canonical version of said tag's meaning.

that's kind of confusingly worded. basically, wranglers make it so that "chatfic", "chat fic", "group chat", and "yes i wrote a chatfic. it's 2009 what about it?" (among pretty much every other variant you can imagine) will all show up when searching through the "chatting & messaging" tag on the site.

(granted, the "chatting & messaging" canonical tag on ao3 also covers, like, a lot of stuff outside of my despised chat­fics— for example, it also covers regular intermittent texting, or sexting, if that's your thing, but in my social sphere, chatfics are usually the most complained about for how difficult they are to filter out from incredibly inconsistent tagging otherwise, so, like, yeah.)

anyway, so the reason all these tags that have just completely different words in them are able to all be caught by the machine for filtering is because the aforementioned canonical tags have an id number, and in making tag variants synonyms of their canonical versions ('synning' a tag) (i love how this is worded like i used to be a tag wrangler. i have never volunteered for ao3, just to be clear.), those tag variants are also given that same id number, allowing the filters to catch them.

what this ancient method therefore does is take that tag id number, and in the "search within results" box, input -filter_ids:[tag id number] to tell the search engine to EXCLUDE (that's what the - in front is for) every work that contains a tag that corresponds to that number.

(you can actually use any boolean operator within the "search within results" box— AND or NOT, yes, as we have natively now, but also OR, which is also may be shorthanded to ||. try going to the genshin tag and inputting (filter_ids:77847063 || filter_ids:55891266) otp:true into the search within results box ;D)

now, there are technically multiple types of these id numbers— character, relationship, and fandom come to mind, so you can actually have character_ids, relationship_ids, or fandom_ids— but it's not like these id numbers are going to, like, overlap with each other.

that's why in most cases, just using filter_ids in the advanced search box works just fine for your sticky filter needs. (i almost said "filtering needs" but fortunately, we live in a timeline where native exclusion now exists on ao3.) however, there are some situations where picking one in particular might be useful.

for example, for whatever fucking reason, the jjk manga and jjk anime are considered to be two completely separate fandoms on ao3, meaning that if you go into either one's fandom tag and hit exclude crossovers, you will end up filtering out works where people tagged both jjk (manga) and jjk (anime).

which fucking sucks, right!!!! because that's how most jjk fics are tagged!!!! how else are we supposed to clean out those nasty ""oneshot collections"" that are just walls and walls of tags because the author decided to tag every single little fandom, pairing, and trope that so much as thought of breathing in the fic's direction???

this is where the distinction btwn tag types comes in handy. now, for context, ao3 uses apache lucene for, like, its search queries or something (i don't know how it works and therefore don't know how to phrase it. just know that the syntax used in the "search within results" box on ao3 is the same as the syntax rules described on the page i just linked to), which means that we can use number ranges in our filtering.

the tag id for jjk (anime) is 49281637, while the tag id for jjk (manga) is 28410929. with this knowledge, we can therefore exclude every fandom with a tag id above 49281637 with -fandom_ids:>49281637, below 28410929 with -fandom_ids:<28410929, and between those two numbers with -fandom_ids:{28410929 TO 49281637}. (the curly brackets indicate that the range is exclusive, while using square brackets, [], would be inclusive, to the ranges described.) altogether, this is -fandom_ids:>49281637 -fandom_ids:<28410929 -fandom_ids:{28410929 TO 49281637} in the "search within results" box. see for yourself!

so, this is all well and good and all, but how does one get a tag's id number??

well, there's an old-fashioned/manual way to this, and a cheap and easy "newer" way to do this. the old-fashioned/manual way was originally described in this ao3 admin post waaaaaaaay back in 2013, but i'll describe it here anyway.

basically, the old-fashioned way only works for fandom, character, and relationship tags, because those are the only ones for which you can subscribe to an rss feed:

the part of an ao3 tag page that says 'works', 'bookmarks', 'filters', 'favorite tag', and 'rss feed'. due to userscripts, this screenshot also has a button for 'random work'.

(please ignore the button that says "random work" that's a userscript i have installed lol)

anyway, so you basically just copy the rss feed link and paste it somewhere. the rss link itself doesn't matter bc it'll just look something like this:

https://archiveofourown.org/tags/28410929/feed.atom

see how there's a number in that link. that number is your tag id, and it is the only thing you need from this rss feed link. EXTRACT IT!!!! and you can just toss the rest away idk not a lot of people use rss these days to my knowledge. you just take your tag id, chuck it in front of a good ol filter_ids: (NO SPACES between the colon and the number!!!!!!!!!), plug that shit into "search within results" and you're aaaaalllll good, man.

now, you may have noticed that this leaves the freeform tags out to dry. well for that we have the cheap and easy "newer" way (i say "newer" in parentheses bc it was made waaaaay back in 2015), which is this bookmarklet by flamebyrd, which basically allows you to save some javascript as a bookmark so that every time you click it, it'll run the javascript— in this case, feed you the tag's id number!

now, while this bookmarklet might allow you to add freeform tags and major archive warnings to one's arsenal of filterable-by-filter_ids-tags, it too fails to account for ratings and categories. well, never fear, my dear readers, for ao3 has provided the people those numbers personally.


so, like, how is this relevant to the issue of overtagging on ao3?

well, now that you understand that the different categories of tags not only exist on ao3, but are also handled differently by the search engine, you can fully understand that the relationships category only concerns itself with whether the characters in the tag are involved with each other romantically or platonically, with zero care paid towards the nuances of their bond strength or current relationship status. meanwhile, the freeform category was designed to handle those nuances, and therefore have canonical tags equipped to like, filter for them (with their id numbers that are different from the ones specified by the pure relationships category)!

(you can honestly just read about it more here, assuming you didn't just come from there)

other applications of this knowledge include just, like, incredibly fine-grained control over the tags one's using in an ao3 search. like, have you ever been in the mood for a fic with one trope or another, or are trying to search for a fic you read like some months or years ago and think it had x tag, or y tag, but you can't be certain?

ao3 lacks a native filter for "OR" queries, but like i said earlier, the "search within results" box can handle them. as a result, you could, for example, find an eimiko fic with either angst OR hurt/comfort (or possibly even both! the OR operator is not exclusive to my knowledge!) with filter_ids:64163854 (filter_ids:176 || filter_ids:2379)! you can even toss in an otp:true in there if you wanted!!

the world is your oyster, lads; i have now passed on what i consider to be my most significant ao3 knowledge.

(back to ao3-ing)