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?

2 answers

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

0 votes
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 Leaders.
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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events