---
schema: rendered-html/v1
title: "Issue Count | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/resource-api-issuesGetter-count.html
generated_at: 2026-06-11T15:13:34.047064+00:00
---

Feedback

Thanks for your feedback!

Was this page helpful?

YesNo

Developer Portal for YouTrack and Hub

- Developer Portal
- Apps
- MCP Tools
- YouTrack Workflows
- YouTrack Import Scripts
- YouTrack Form API
- YouTrack REST API
- Get Started with REST API
- REST API Reference
- Entities
- Resources
- Activity Items
- Issue Activities Page
- Build Bundles
- Enum Bundles
- Owned Bundles
- State Bundles
- User Bundles
- Version Bundles
- Custom Fields
- Field Types
- Backup Files
- Database Backup Settings
- Global Settings
- Organizations
- Projects
- Telemetry data
- Global Time Tracking Settings
- Agiles
- Articles
- Assigned Roles
- Commands
- Command Suggestions
- User Groups
- Issue Link Types
- Issue Tag
- [Issues](jetbrains__com__help__youtrack__devportal__resource-api-issues.md)
- [Issue Count](resource-api-issuesGetter-count.html)
- [Permissions](jetbrains__com__help__youtrack__devportal__resource-api-permissions.md)
- [Roles](jetbrains__com__help__youtrack__devportal__resource-api-roles.md)
- [Saved Queries](jetbrains__com__help__youtrack__devportal__resource-api-savedqueries.md)
- [Search Suggestions](jetbrains__com__help__youtrack__devportal__resource-api-search-assist.md)
- [Tags](jetbrains__com__help__youtrack__devportal__resource-api-tags.md)
- Users
- [My User Profile](jetbrains__com__help__youtrack__devportal__resource-api-users-me.md)
- Issue Work Items
- REST API Use Cases
- REST API Troubleshooting
- Color Indices List
- Hub REST API

1. YouTrack REST API
2. REST API Reference
3. Resources
4. [Issue Count](#0)

# Issue Count﻿

Last modified: 24 March 2026

This resource lets you get the number of issues returned by a search.

| Resource | ``` /api/issuesGetter/count ``` |
| --- | --- |
| Returned entity | IssueCountResponse. For the description of the entity attributes, see [Supported Fields](/help/youtrack/devportal/resource-api-issuesGetter-count.html#IssueCountResponse-supported-fields) section. |
| Supported methods | - `POST`: [Issue Count](/help/youtrack/devportal/resource-api-issuesGetter-count.html#create-IssueCountResponse-method). |

## IssueCountResponse attributes﻿

Represents the number of issues in a search result.

### Related Resources﻿

Below you can find the list of resources that let you work with this entity.

- Issue Count

### Attributes﻿

This table describes attributes of the `IssueCountResponse` entity.

- To receive an attribute in the response from the server, specify it explicitly in the `fields` request parameter.
- To update an attribute, provide it in the body of a POST request.

| Field | Type | Description |
| --- | --- | --- |
| id | String | The ID of the IssueCountResponse. `Read-only`. |
| count | Long | The number of issues found by the search.  If this number equals -1, it means that YouTrack hasn't finished counting the issues yet. Wait for a bit and repeat the request.  `Can be null`. |
| unresolvedOnly | Boolean | `true` when the **Hide resolved issues** control is enabled. `Can be null`. |
| query | String | The search query. `Can be null`. |
| folder | IssueFolder | The currently selected search context. `Can be null`. |

## Get Issue Count﻿

Get the number of issues found by a search.

Required fields: `query`.

Although the goal of this request is to get data, you need to pass the search query that you want to get the number of issues for. GET requests don't take request body, so you need to send a POST request in this case.

In the request body, specify the search that you want to get the number of issues for. When you need to get the count of all issues without filtering them with a query, pass an empty object in the request body: `{}`. YouTrack REST API doesn't support POST requests without a request body.

If the response returns `"count": -1`, it means that YouTrack hasn't finished counting the issues yet. Wait for a bit and repeat the request.

### Request syntax﻿

```
POST /api/issuesGetter/count?{fields}
```

| null | The database ID of IssueCountResponse |
| --- | --- |

### Request parameters﻿

| Parameter | Type | Description |
| --- | --- | --- |
| fields | String | A list of IssueCountResponse attributes that should be returned in the response. If no field is specified, only the `entityID` is returned. |

### Sample 1﻿

In this sample, we send a POST request to get the number of issues returned by the search with `for: john.smith project: NP #Unresolved` set as the search query.

In the response, we get the number of issues that this search returns.

#### Sample request﻿

```
https://example.youtrack.cloud/api/issuesGetter/count?fields=count
```

#### Sample request body﻿

```
{
  "query":"for: john.smith project: NP #Unresolved"
}
```

#### Sample response body﻿

```
{
  "count":29,
  "$type":"IssueCountResponse"
}
```

### Sample 2﻿

If the response returns `"count": -1`, it means that YouTrack hasn't finished counting the issues yet. Wait for a bit and repeat the request.

In this sample, we send a POST request to get the number of issues returned by the search with `for: john.smith project: NP #Unresolved` set as the search query.

In the response, we get `"count": -1`, so we'll need to repeat the request after a while to get the actual number.

#### Sample request﻿

```
https://example.youtrack.cloud/api/issuesGetter/count?fields=count
```

#### Sample request body﻿

```
{
  "query":"for: john.smith project: NP #Unresolved"
}
```

#### Sample response body﻿

```
{
  "count": -1,
  "$type": "IssueCountResponse"
}
```

- [Issue Count](/help/youtrack/devportal/resource-api-issuesGetter-count.html)
- [IssueCountResponse attributes](/help/youtrack/devportal/resource-api-issuesGetter-count.html#IssueCountResponse-supported-fields)
- [Get Issue Count](/help/youtrack/devportal/resource-api-issuesGetter-count.html#create-IssueCountResponse-method)

Operations with Specific Issue VCS Changes and Pull Requests[Permissions](jetbrains__com__help__youtrack__devportal__resource-api-permissions.md)

- Privacy & Security
- Terms Of Use
- Trademarks
- Legal

Copyright © 2000–2026 JetBrains s.r.o.
