Merkl Developer Portal logo
get

/v4/campaigns/count

Count the campaigns matching the filters provided through query parameters.

Query parameters

pagenumber | stringdefault: 0

0-indexed page number

itemsnumber | stringdefault: 20

Number of items returned by page

idstring

Filter by internal campaign ID (Campaign.id, numeric hash, e.g. 13896840291241714382). NOT the on-chain campaignId (hex hash) — use the campaignId query for that. Comma-separated list supported. See ID types.

creatorTagstring

Filter campaigns created by a user who has a specific tag

creatorAddressstring
creatorAddressesstring[]
creatorIdstring

Filter campaigns created by a user who is registered as a merkl creator

chainIdnumber | string

Filter by compute chain.
You can get the list of all supported chains by calling GET /v4/chains

distributionChainIdsnumber | string[]

Filter by distribution chain.
You can get the list of all supported chains by calling GET /v4/chains

typestring

Filter by type of campaign

typesstring[]

Filter by type of campaign using an array. The type entry has priority.

subTypenumber

Silo, Radiant, Morpho, Dolomite, Compound, Ajna and Euler campaigns have a subtype attribute you can filter on

campaignIdstring

Filter by on-chain campaign ID (Campaign.campaignId, 32-byte hex hash, e.g. 0x93cf385c2a446a7596820601caf25e63bfc4939efa9a89a6f21563b58ee54eb1). The same on-chain campaignId can exist on several chains; one resource per chain is returned. NOT the internal Campaign.id (numeric hash) — use the id query for that. See ID types.

campaignIdsstring[]

Filter by multiple on-chain campaign IDs (32-byte hex hashes). The campaignId entry has priority over this one. NOT internal Campaign.id values. See ID types.

mainParameterstring

Filter by mainParameter (a.k.a. opportunity identifier) — the value used to group campaigns into one opportunity. Can be a pool/vault/market address (e.g. 0x35Cbe854...) or an arbitrary on-chain hash. NOT a campaign or opportunity ID. See ID types.

tokenSymbolstring

Filter by reward token symbol (e.g. USDC for campaigns rewarding in USDC)

tokenAddressstring

Filter results by the reward token address. Use in combination with chainId for accuracy

testbooleandefault: false

Return campaigns rewarding in test tokens

tokenTypesenum[]

Filter by token type. Use POINT to include point campaigns and PRETGE to include preTGE campaigns. By default every token is returned.

TOKENPRETGEPOINT
pointboolean

Return campaigns rewarding in points

opportunityIdstring

Filter by internal opportunity ID (Opportunity.id, numeric hash, e.g. 7673870997270712040). Lookup at GET /v4/opportunities. NOT a campaign ID. See ID types.

opportunityIdsstring[]

Filter by multiple internal opportunity IDs. The opportunityId entry has priority over this one. See ID types.

statusstring

Comma-separated list of statuses to filter by. Legal values: LIVE, PAST, SOON. When omitted, returns all campaigns regardless of status.

startTimestampstring

Returns campaigns starting *after* the given unix timestamp

endTimestampstring

Returns campaigns ending *after* the given unix timestamp

withOpportunityboolean

Include opportunity data. Will slow down the request. Default: false

distributionTypesenum[]
FIX_REWARDMAX_REWARDDUTCH_AUCTIONTOTAL_APR
createdAfterDate | string (date-time) | string (date) | number | null
createdBeforeDate | string (date-time) | string (date) | number | null
excludeSubCampaignsbooleandefault: false

Exclude subcampaigns from the results. Default: false

onlySubCampaignsbooleandefault: false

Get Only Subcampaigns. Default: false

rootCampaignIdstring

Filter by root internal campaign ID (Campaign.id, numeric hash). Returns only subcampaigns sharing this root. See ID types.

parentCampaignIdstring

Filter by parent internal campaign ID (Campaign.id, numeric hash). Returns only subcampaigns sharing this parent. See ID types.

mainProtocolIdstring

Filter by protocol slug (e.g. aave, morpho). NOT a numeric ID. List slugs at GET /v4/protocols.

pauseComputestring

Filter by compute-pause reason. Returns only campaigns whose pauseCompute matches this exact reason (e.g. paused_high_amount).

showPrivateboolean

When true, include private campaigns the caller (JWT or API key owner) is authorized to see, decoded. When false (default), only public campaigns are returned. Bypasses CDN cache.

listOwnerstring

Address that owns the campaign lists referenced by campaignLists. Required when campaignLists is set.

campaignListsstring

Comma-separated list names owned by listOwner (stored in the global campaign-lists config). Returns campaigns whose ID is in *any* of the given lists (union). List names are case-insensitive. Lists are shareable — anyone can query any owner's lists. Example: baseapp,renew.

Responses

200
Response for status 200
Schema
number
Example
0