The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get total on search API for issues using JQL

Cedric Moncade
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 22, 2025

According to the Atlassian documentation (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-group-issue-search),
the "/rest/api/3/search" endpoint is now deprecated. I’m migrating to the JQL-based version "/rest/api/3/search/jql", but I noticed that the total field is no longer included in the response.

I came across a suggestion to set maxResults=0 (see https://confluence.atlassian.com/jirakb/find-the-total-number-of-work-items-in-jira-cloud-using-jql-or-issue-search-1319567658.html), but when I try that I get an error saying maxResults must be between 1 and 5000.

So how can I retrieve the total number of items for a search?

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

5 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
September 22, 2025

Hi @Cedric Moncade -- Welcome to the Atlassian Community!

Please try the endpoint for Count Issues Using JQL:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-approximate-count-post

 

Kind regards,
Bill

0 votes
Cedric Moncade
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 23, 2025

I am feeling so stupid, I was on this page all the afternoon and I didn't see it.
Thank you both of you @Bill Sheboy @Aaron Pavez _ServiceRocket_ 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
September 23, 2025

No worries, @Cedric Moncade -- We are all learning and the endpoint docs do not always make it simple to search for things we want.

0 votes
Aaron Pavez _ServiceRocket_
Community Champion
September 22, 2025

Hi @Cedric Moncade 

To save a bit of time. You need a POST and send that body. Put the JQL in between the "".

Screenshot_20250922_155346.png

and thanks @Bill Sheboy !!

Regards

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events