Actions

Work Header

Rating:
Archive Warning:
Fandom:
Additional Tags:
Language:
English
Series:
Part 2 of Site Skins and CSS Quackery
Stats:
Published:
2024-02-17
Completed:
2024-02-18
Words:
4,610
Chapters:
3/3
Comments:
16
Kudos:
54
Bookmarks:
44
Hits:
1,671

How to Use Hidden Search Operators (And Get Real Specific About It)

Chapter 3: Filtering (Tags & Ratings & Categories Oh My)

Chapter Text

Alright so, you might expect that filtering tags works with text. And you can do it that way, like so:

tag: Character

tag: "Character A/Character B"

Some caveats: from my experimenting, the * from before doesn't seem to work here? Doing this:

tag: "Trans Charactername"

Showed both fics with the tag "Trans Charactername" and also "Transmasculine Charactername", so it basically acted like I'd put the * in, and doing this:

tag: "Trans* Charactername"

Seems to have given me the exact same results. Can't enlighten anyone to the why here, only to the what, so I'd encourage people to try experimenting a bit and see what works and what doesn't!

 

However. You can also filter tags a lot more precisely using tag IDs, which are numbers. They're a bit like the ID of a user or a specific fic. To use the "Angst" tag as an example, its tag ID is 176, so we can do this:

filter_ids: 176

And filter for only fics tagged "Angst." Note that this, unlike the search by text, uses the parent tags—so this filter will also show fics with tags like "Light Angst" or "Angst and Hurt/Comfort"

This also lets you filter for a ship tag, say "Character A/Character B", without having to separately search for "Character B/Character A" or getting a false positive from "Character A/Character B/Character C".

Now, obviously it's kind of hard to have a giant masterlist of every single possible tag. So how do we find out what a random tag ID is?

One method is to use the link to the RSS feed, which will have the tag ID in it. If you go to the search page for the tag, you'll see something like "1-20 of ??? Works in [Tag you're looking for]" at the top. Then you right click on the button labeled "RSS Feed" in the top-right of the page, copy the link, and paste it somewhere so you can look at it. It should look something like this:

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

Grab the number, in this case 12345 (made-up example, i have no idea what tag this is), and pop that into the filter_ids like so:

filter_ids: 12345

This is I think a bit simpler than my method, but it only works for certain tags—fandoms, relationships, and characters. Freeforms like Angst don't have an RSS Feed button. I've also found that very small tags, like <20, sometimes have an RSS Feed that links to the fandom tag instead, despite having their own tag IDs.

The method I've been using should work for any tag that is canonical, so tags that you can filter by. You start the same way, by opening up the tag search like so:

The main search page for the "Angst" tag

From there, we just need to right click somewhere on the background of the page, and it should bring up this menu:

A dropdown menu with "View Page Source" highlighted

Click on "View Page Source", and it should open a new tab full of html code. Don't panic—you can ignore 99.9% of what's in there.

This next step will be slightly different depending on whether you're looking for a relationship tag, a character tag, or a freeform tag. Either way, you just need to copy a bit of text:

  • For relationship tags: include_work_search[relationship_ids]
  • For character tags: include_work_search[character_ids]
  • For freeform tags: include_work_search[freeform_ids]

Then hit Ctrl + F to open your browser's search bar, and paste that bit of text into it. You should get to a block of text that looks like this:

<label for="include_work_search_freeform_ids_176">
<input type="checkbox" name="include_work_search[freeform_ids][]" id="include_work_search_freeform_ids_176" value="176" />
<span class="indicator" aria-hidden="true"></span><span>Angst (1263223)</span>
</label> </li>

It's a good idea to double-check that you're looking at the right tag here—note on the last line, it says "Angst (1263223)", which is our indicator that this is the right tag.

(What we're actually looking at is the html that makes the filter bar on the side of the screen, where it shows the most common tags within a search. Since we've searched for the Angst tag, everything in our search is tagged with Angst, so the tag we're looking for will almost* always come up first in this list.)

Now, all we have to do is grab the number on that second line labeled "value", like so:

<input type="checkbox" name="include_work_search[freeform_ids][]" id="include_work_search_freeform_ids_176" value="176" />

value="176"

filter_ids: 176

One issue with this approach is that I have absolutely no clue whatsoever how to do it on mobile. But on the plus side the tag IDs stay the same, so it's always an option to grab a giant list whenever you happen to have access to a computer and then save it somewhere for future reference. And there will be a handy list of some common filter IDs at the end of this section as well!

*The exception to the tag we're looking for coming up in the tag search is for some parent tags. For example, "Bisexual Character" will show both the tags "Bisexual Female Character" and "Bisexual Male Character", and those tags are a lot bigger than "Bisexual Character" by itself. You may sometimes need to filter out some of those child tags before going to "view page source", but most tags shouldn't have that problem.

 

Now, on to Ratings, Categories, and Warnings! These all work very similarly to the tag IDs, in fact you could do this:

filter_ids: 13

to filter for Explicit ratings. But we can also use:

rating_ids: 13

Which seems like a silly distinction, but it will actually be pretty useful in a sec!

So, I'm just going to go ahead and list all of these, since they're all very helpful to have. For Ratings, we have:

  • Not Rated: 9
  • General Audiences: 10
  • Teen And Up Audiences: 11
  • Mature: 12
  • Explicit: 13

And they use "rating_ids: " in searches.

Then, for Categories:

  • Gen: 21
  • F/M: 22
  • M/M: 23
  • Other: 24
  • F/F: 116
  • Multi: 2246

And they use "category_ids: " in searches.

And finally, for Warnings:

  • Chose Not To Warn: 14
  • No Archive Warnings Apply: 16
  • Graphic Depictions of Violence: 17
  • Major Character Death: 18
  • Rape/Non-Con: 19
  • Underage: 20

And they use "archive_warning_ids: " in searches.

Now, to showcase the usefulness of these more specific search terms, say for the sake of argument that you want to exclude anything rated M or E. You can't do this:

-filter_ids: >11

Because that would catch every single archive warning and your search would return absolutely nothing. You could just double up on search terms like this:

-filter_ids: 12 -filter_ids: 13

Which does work, but if we use the rating_ids, we can just do this:

-rating_ids: >11

Or we could limit our search to G through M by doing this:

rating_ids: [10 TO 12]

And exclude only explicit or not rated works.

This also gives us a bit more room to deal with an issue that can come up with categories and archive warnings, namely that  you can add more than one of them, and sometimes when you're searching for F/F you don't actually want your search to include anything except F/F, especially in a fandom where it might get a bit overwhelmed by primarily M/M works that have an F/F side pairing. And I think it's probably pretty obvious why someone searching for "No Archive Warnings Apply" might not want to see works also tagged with "Major Character Death" lol

Unfortunately, you kinda have to just exclude everything else. Fortunately, you can usually do this in only two search terms. For our F/F example:

category_ids: 116 -category_ids: <116 -category_ids: >116

We have to specify that we're searching for F/F, since only excluding will leave in fics that have no category attached to them at all. Anyways, this is a bit clunky, but trust me when I say that it's better than excluding every single other category lmao

Now for our "No Archive Warnings Apply" example, we can do this:

-archive_warning_ids: <16 -archive_warning_ids: >16

This time we don't need to add "category_ids: 16", since every fic must choose at least one archive warning tag, so if we exclude everything else we're left with only lucky number 16 by default.

 

There are also a few other extra-specific ways to look for tag IDs:

  • For relationships (relationship_ids: )
  • For characters (character_ids: )
  • For freeforms (freeform_ids: )
  • For fandoms (fandom_ids: )

Since as far as I'm aware the order of the numbers on these are pretty much "which tag got there first", I don't think those number ranges are usually super useful, but it can be good for doing stuff like this:

-relationship_ids: *

To look at only fics with no relationships tagged, or this:

character_ids: *

To look at only fics with at least one character tagged. And it's also possible that within your fandom there happen to be a few relationships or characters bunched together in a way that makes it easy to get them all in a range! Who knows!

 

Now to close this out, I'm just going to leave some useful or common freeform tag IDs here:

  • Romance: 60
  • Humor: 62
  • Fluff: 110
  • Angst: 176
  • Alternate Universe: 968
  • BDSM: 1508
  • Comedy: 1660
  • Smut: 2026
  • Hurt/Comfort: 2379
  • Crack: 3236
  • Alternate Universe - Modern Setting: 11175
  • Bisexual Character: 18418
  • Trans Character: 39225
  • Lesbian Character: 65642
  • Gay Male Character: 68457
  • Female Character of Color: 79500
  • Emotional Hurt/Comfort: 98700
  • Slow Burn: 103132
  • Asexual Character: 105139
  • Character(s) of Color: 236522
  • Alpha/Beta/Omega Dynamics: 272593
  • Fluff and Angst: 418427
  • Dead Dove: Do Not Eat: 4861774
  • Plot What Plot/Porn Without Plot: 579599

This is obviously not an exhaustive list, and if there's a really big or important tag that I missed, please feel free to point it out to me lol! (I won't be adding any fandom-specific tags though, that way lies madness)

Series this work belongs to:

Works inspired by this one: