---
title: "GET /v4/opportunities/count"
method: GET
path: "/v4/opportunities/count"
tags: ["Opportunities"]
---

# GET /v4/opportunities/count

`GET /v4/opportunities/count`

Get the count of opportunities corresponding to the query.

## Query parameters

- `page` union — 0-indexed page number
  - string, numeric
  - number — 0-indexed page number
- `items` union — Number of items returned by page
  - string, numeric
  - number — Number of items returned by page
- `name` string — Filter by name
- `search` string — Search amongst multiple values (token, protocols, tags, campaigns)
- `campaignId` string — Filter opportunities linked to a given **on-chain campaign ID** (32-byte hex hash, e.g. `0x93cf385c2a446a7596820601caf25e63bfc4939efa9a89a6f21563b58ee54eb1`). This is `Campaign.campaignId` in responses, NOT the internal `Campaign.id` (numeric hash). Returns `[]` if no campaign matches. See [ID types](/integrate-merkl/id-types).
- `creatorSlug` string — Filter by creator slug
- `chainId` unknown
- `action` string — A comma seprated list actions. Legal values are: POOL, HOLD, DROP, LEND, BORROW, LONG, SHORT, SWAP, INVALID, STAKE
- `tokenTypes` union[] — Filter by token type. Use POINT to include point campaigns and PRETGE to include preTGE campaigns. By default every token is returned.
  - union
    - string
    - string
    - string
- `point` boolean — Include opportunities with point campaigns
- `type` string — A comma separated list of Opportunity type
- `creatorAddress` string — Filter by creator address
- `tags` string — Filter by tag
- `test` boolean — Include opportunities with test campaigns
- `minimumTvl` number — Minimum TVL threshold in USD
- `maximumTvl` number — Maximum TVL threshold in USD
- `minimumApr` number — Minimum APR threshold
- `maximumApr` number — Maximum APR threshold
- `minimumDailyRewards` number — Minimum daily rewards threshold in USD
- `maximumDailyRewards` number — Maximum daily rewards threshold in USD
- `minimumCreatedAt` number — Filter opportunities whose last campaign was created at or after this Unix timestamp (seconds)
- `maximumCreatedAt` number — Filter opportunities whose last campaign was created at or before this Unix timestamp (seconds)
- `status` unknown
- `identifier` string — Filter by opportunity identifier (a.k.a. `mainParameter`). Free-form string, often a pool/vault/market address (e.g. `0x35Cbe8542E70fa2f7F9cDF129F19e593F4b4f560`) or an arbitrary on-chain hash for non-address opportunities. NOT a campaign ID. See [ID types](/integrate-merkl/id-types).
- `id` string — A comma-separated list of **internal opportunity IDs** (`Opportunity.id`, numeric hash). Example: `?id=5877322385708089533,1234567890`. NOT campaign IDs. See [ID types](/integrate-merkl/id-types).
- `campaigns` boolean — Include campaign data. Will slow down the request. Default: false
- `tokens` string — A comma separated list of token symbol. Use to filter by token
- `stablecoin` boolean — Filter opportunities that include at least one stablecoin token
- `rewardTokenSymbol` string — Filter by opportunity that have at least 1 campaigns where the reward token has this symbol
- `sort` unknown
- `order` string — `asc` to sort in ascending order or `desc` to sort in descending order.
- `distributionTypes` union[]
  - union — Filter by reward mechanism. Legal values are: `FIX_REWARD`, `MAX_REWARD`, `DUTCH_AUCTION`, `TOTAL_APR`. Default: no filter
    - string
    - string
    - string
    - string
- `mainProtocolId` string — A comma-separated list of **protocol slugs** (e.g. `aave,morpho,uniswap`). NOT numeric IDs. List slugs at [GET /v4/protocols](#tag/protocols/GET/v4/protocols/). See [ID types](/integrate-merkl/id-types).
- `programSlugs` string — A comma separated list of program ids or slugs. You can get the list of all supported programs by calling [GET /v4/programs](#tag/programs/GET/v4/programs/)
- `chainName` unknown
- `excludeSubCampaigns` boolean — Exclude sub-campaigns from the results. Default: false
- `explorerAddress` string — Filter by **on-chain pool/vault/market address** (20-byte EVM address, e.g. `0x35Cbe8542E70fa2f7F9cDF129F19e593F4b4f560`). Often the most reliable way to look up an opportunity if you only know the underlying contract. See [ID types](/integrate-merkl/id-types).
- `withInvalids` boolean — Include opportunities that have been marked as invalid
- `campaignTypes` unknown

## Response `200`

Response for status 200

---

[API](https://skmtc.dev/merkl/apis/merkl-api.md) · [All operations](https://skmtc.dev/merkl/apis/merkl-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/merkl/merkl-api/revisions/b7784c9a78b9/schema)
