# giftCardsCount - admin-graphql - QUERY
Version: 2024-10
## Description
The total number of gift cards issued for the shop. Limited to a maximum of 10000.
### Access Scopes
`read_gift_cards` access scope.
## Arguments
* [query](/docs/api/admin-graphql/2024-10/scalars/String): String - A filter made up of terms, connectives, modifiers, and comparators.
| name | type | description | acceptable_values | default_value | example_use |
| ---- | ---- | ---- | ---- | ---- | ---- |
| default | string | Searched fields: code. | | | - `query=Bob Norman`
- `query=title:green hoodie` |
| balance_status | string | | - `full`
- `partial`
- `empty`
- `full_or_partial` | | - `balance_status:full` |
| created_at | time | | | | - `created_at:>=2020-01-01T12:00:00Z` |
| expires_on | date | | | | - `expires_on:>=2020-01-01` |
| id | id | Filter by `id` range. | | | - `id:1234`
- `id:>=1234`
- `id:<=1234` |
| initial_value | string | | | | - `initial_value:>=100` |
| source | string | | - `manual`
- `purchased`
- `api_client` | | - `source:manual` |
| status | string | | - `disabled`
- `enabled`
- `expired`
- `expiring` | | - `status:disabled OR status:expired` |
You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).
* [savedSearchId](/docs/api/admin-graphql/2024-10/scalars/ID): ID - The ID of an existing saved search.
The search’s query string is used as the query argument.
Refer to the [`SavedSearch`](https://shopify.dev/api/admin-graphql/latest/objects/savedsearch) object.
## Returns
* [count](/docs/api/admin-graphql/2024-10/scalars/Int): Int! The count of elements.
* [precision](/docs/api/admin-graphql/2024-10/enums/CountPrecision): CountPrecision! The count's precision, or the exactness of the value.
## Examples
### Get the total number of enabled gift cards that are issued for the shop
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { giftCardsCount(query: \\\"status:enabled\\\") { count } }\"\n}'\n"
Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n giftCardsCount(query: \"status:enabled\") {\n count\n }\n }`,\n});\n"
Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n giftCardsCount(query: \"status:enabled\") {\n count\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n"
Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n giftCardsCount(query: \"status:enabled\") {\n count\n }\n }`,\n);\n\nconst data = await response.json();\n"
Graphql query: "query {\n giftCardsCount(query: \"status:enabled\") {\n count\n }\n}"
#### Graphql Input
null
#### Graphql Response
{
"data": {
"giftCardsCount": {
"count": 10
}
}
}
### Retrieves a count of gift cards
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { giftCardsCount { count } }\"\n}'\n"
Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n giftCardsCount {\n count\n }\n }`,\n});\n"
Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query {\n giftCardsCount {\n count\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n"
Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n giftCardsCount {\n count\n }\n }`,\n);\n\nconst data = await response.json();\n"
Graphql query: "query {\n giftCardsCount {\n count\n }\n}"
#### Graphql Input
null
#### Graphql Response
{
"data": {
"giftCardsCount": {
"count": 11
}
}
}