Use the Community API to query tags Edited

Screen Shot 2017-08-01 at 4.50.03 PM.png

Let's talk about Tags

There are over 16k tags on the Community. You can view the most popular tags here.

To query posts by tags we can use the public Community API v2. The examples below only work for public posts, not posts in private boards. These are anonymous requests and can access data available to users who are not signed into the Community.

Using the API

Here is the foundation of our API request:

Next, we're going to use a special query language to find our content.

LiQL, a SQL-like query language. Use a LiQL statement to define search criteria for any complex query.

Okay, then.. let's make a LiQL query! SELECT * FROM messages

> View this response

This gets us a pile of JSON that is a list of unsorted messages and it is capped at 25 (more on that later).

More complex queries

Let's add some more parameters here to search by tags

WHERE tags.text = 'jira service desk'

WHERE tags.text IN ('jira service desk', 'jsd', 'jira-service-desk')

Let's limit these messages to Questions:


Maybe we want only topic messages that have no replies

AND depth = 0 AND replies.count(*) = 0

Here we go: * FROM messages WHERE tags.text IN ('sourcetree') AND'qanda' AND replies.count(*) = 0 AND depth = 0

> View this response

Can I sort by date? Sounds useful to me.

ORDER BY post_time DESC

Getting closer.. why are there are 25 messages? That's the default query limit. Let's increase it.

LIMIT 1000

Looking good. Let's put that all together... * FROM messages WHERE tags.text IN ('sourcetree') AND'qanda' AND replies.count(*) = 0 AND depth = 0 ORDER BY post_time DESC LIMIT 1000

> View this response

It looks a bit ugly. Your computer shouldn't care! Okay, you're right. You can use a browser extension or another tool.. but we can make it look better in the browser without all that. Add this to the URL.


Nice work!

Bringing it all together

That query we just created is the same one that powers this page:

But, hopefully you will find the JSON data useful. Remember, unlike the link above, you can combine multiple tags into a single query. That's all for now folks.

Add your comments below with specific questions or concerns.


>> Updates based on comments

Query large sets of messages

To query over large sets of results you add the following to the very end of your query:


The OFFSET value must be divisible by the LIMIT value

Limit the query response

Select only the parts of the message you need instead of the wildcard *

SELECT view_href, subject, body FROM ...


Keep the questions coming!



Handy stuff, thanks.

Is there a way to page a large set of results. Guessing at a limit of 1000 seems a bit arbitrary. And can we get a link to the LiQL docs please.

@Steven Behnke I wanted to make sure you saw this also!

Tyler Tadej Atlassian Team Aug 01, 2017

@Matt Doar [ServiceRocket], great questions. For large sets of results you could use this:


 That would get the 2nd page of results.

The docs are here and you'll need to register for an account:

In the meantime, if you have specific questions I can try and answer them in another post or in this reply thread.


Steven Behnke Community Champion Aug 01, 2017


My mind is blown. I have no idea what to do with this yet... But thanks! My mind is a spinning!

Thanks Tyler, we've been using this for a little while now, pulling related posts into our JIRA instance so we can work like regular support requests.


Greatly appreciated.

@Daniel Wester [Wittified] is doing some amazing stuff with this too -- hopefully we can talk him into writing an article about it. :) 

Wanted to drop this out there in case there are people that aren't on the Atlassian Developer Community.


Log in or Join to comment
Community showcase
Monique van den Berg
Published Feb 15, 2018 in Feedback & Announcements

How to earn badges on Atlassian Community

You may have visited your profile and seen a tab called badges. (If not, click on your avatar and View profile > Badges will get you there.)  But what do the happy little circles mean,...

7,305 views 18 26
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot