# Public API - Tags should be OR not AND

**URL:** <https://community.n8n.io/t/public-api-tags-should-be-or-not-and/51701>\
**Category:** Feature Requests\
**Created:** [August 13, 2024, 6:11am UTC](https://community.n8n.io/t/public-api-tags-should-be-or-not-and/51701 "2024-08-13T06:11:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [August 13, 2024, 6:11am UTC](https://community.n8n.io/t/public-api-tags-should-be-or-not-and/51701/1 "2024-08-13T06:11:37Z")

</div>

## The idea is:

The n8n public API should use tags as an `OR` instead of an `AND` so setting `?tags=tag1,tag2` would return workflows that contain either `tag1` or `tag2` not worklfows that contain both `tag1` and `tag2`

## My use case:

I would like to filter workflows based on groups of tags using the API

## Any resources to support this?

Closed GitHub issue around some of this: [Workflows Public API Tags Parameter Does Not Support Multiple, Comma Separated, Tags · Issue #10348 · n8n-io/n8n · GitHub](https://github.com/n8n-io/n8n/issues/10348)

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [August 13, 2024, 7:08am UTC](https://community.n8n.io/t/public-api-tags-should-be-or-not-and/51701/2 "2024-08-13T07:08:56Z")

</div>

Hi @Jon

What a good idea, would be nice to have both options though.

Please don’t forget to vote yourself 😉

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [August 13, 2024, 7:40am UTC](https://community.n8n.io/t/public-api-tags-should-be-or-not-and/51701/3 "2024-08-13T07:40:24Z")

</div>

@BramKn Both is probably the best option, I think I popped that on the GH issue 😉

---

<div class="post-metadata">

**Author:** ![bartv](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bartv/32/156374_2.png) [@bartv](https://community.n8n.io/u/bartv)\
**Post date:** [August 13, 2024, 8:09am UTC](https://community.n8n.io/t/public-api-tags-should-be-or-not-and/51701/4 "2024-08-13T08:09:49Z")

</div>

Based on this post?

> [@Processing CSV Items One by One](http://community.n8n.io/t/processing-csv-items-one-by-one/51665):
>
> Is there any more concise or efficient way, than the following, of splitting out CSV items, processing each of them individually, and combining/de-duping the results? This sequence is meant to overcome the behavior of the /api/v1/workflows tags filter (which matches only workflows having all of the tags in a CSV list), and instead collect all workflows matching any of the tags in the CSV list. Information on your n8n setup n8n version: 1.50.1 Database: postgres n8n EXECUTIONS\_PROCESS setting: …

---

<div class="post-metadata">

**Author:** ![hubschrauber](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/hubschrauber/32/46788_2.png) [@hubschrauber](https://community.n8n.io/u/hubschrauber)\
**Post date:** [August 13, 2024, 6:05pm UTC](https://community.n8n.io/t/public-api-tags-should-be-or-not-and/51701/5 "2024-08-13T18:05:31Z")

</div>

Expanding on the notion of doing “both”, it would also be useful to consider argument parsing support for:

- sub-grouping - so logical AND/OR/NOT combinations wouldn’t be limited to just first-to-last precedence
- quoted values - so that special characters like commas or logical operator terms could be distinguished from characters/keywords that happen to be embedded in the actual tag-value text.

Examples: (not URL encoded for easier reading)

- tags= ((‘project1’ OR ‘project2’) AND ‘Q2-release’)
- tags=‘Question AND Answer Automation’ OR ‘Errors,Omissions’

Maybe part of what I’m expressing here is that opening this can-of-worms probably asks for a common mini-DSL logical-expression-parser library to deal with the same issue on more than just the workflow tags argument. I could imagine the same library sitting underneath a “Complex Filter” node in n8n (similar to the flat/linear “Filter” node that currently exists, but with logical sub-groups).

---

<div class="post-metadata">

**Author:** ![hubschrauber](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/hubschrauber/32/46788_2.png) [@hubschrauber](https://community.n8n.io/u/hubschrauber)\
**Post date:** [August 13, 2024, 6:13pm UTC](https://community.n8n.io/t/public-api-tags-should-be-or-not-and/51701/6 "2024-08-13T18:13:17Z")

</div>

Yes… it’s related to this. Wishing for a more straightforward way to reach the same end.
