---
updatedAt: 2026-08-01T11:27:33.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Search Campaigns

## Why Search Campaigns?

If you would like to review the properties of a campaign, the Kevel API enables you to perform a search on a campaign's name and then have a list of properties returned to you for that campaign. The result will be a JSON list of all campaigns for which the value of `campaignName` is contained in the name property (aka wildcard search).

> 📘 Note
>
> This endpoint accepts a string key/value pair as its payload instead of a JSON object.

## API Syntax

When using the Search Campaigns API endpoint, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:

`POST https://api.kevel.co/v1/campaign/search`

Where:

* `POST` - the type of API request being made.
* `https://api.kevel.co` - the URL for the request.
* `v1` - the API version.
* `campaign` - the API endpoint being called.
* `search` - the request being made to the endpoint.

## Request Syntax

When making a request to this endpoint, please keep the following rules in mind:

* You will need to pass in a single string with a key of `campaignName`. The value should be the term you want to search for.
* To search for a single, exact word: `"campaignName=Nike"`
* To search for multiple words, use url encoding: `campaignName=20th%20Century%20Fox`
* To search for a substring, url encode the character `%` as a prefix and suffix. For example, to find all campaigns with names that contain the string `bank`, you should search for `%25bank%25`.
* If nothing is found, you will see `items` is blank, like `"Items": []`.

> 🚧 Caution
>
> If you are searching for a campaign name that contains multiple words, you must URL encode the term you are searching for. For example, in `curl` you can use the `--data-urlencode` flag and search for `"campaignName=Nike Shoes"`

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "adzerk-management-apis",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.kevel.co"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-Adzerk-ApiKey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/campaign/search": {
      "post": {
        "summary": "Search Campaigns",
        "description": "",
        "operationId": "search-campaigns",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"PageNumber\": 1,\n  \"Items\": [\n    {\n      \"IsActive\": true,\n      \"DontAffectParentFreqCap\": true,\n      \"Flights\": [],\n      \"DailyCapAmount\": 5000,\n      \"FreqCapType\": 1,\n      \"CapType\": 4,\n      \"IsFreqCap\": null,\n      \"IsDeleted\": false,\n      \"EndDateISO\": null,\n      \"Price\": 0,\n      \"IsArchived\": false,\n      \"LifetimeCapAmount\": 50000,\n      \"FreqCapDuration\": 10,\n      \"FreqCap\": 2,\n      \"SalespersonId\": null,\n      \"AdvertiserId\": 12345,\n      \"Name\": \"Nike Shoes\",\n      \"Id\": 567890,\n      \"CustomFieldsJson\": null,\n      \"StartDateISO\": \"2017-01-01T00:00:00.0000000\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "PageNumber": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "Items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "IsActive": {
                            "type": "boolean",
                            "example": true,
                            "default": true
                          },
                          "DontAffectParentFreqCap": {
                            "type": "boolean",
                            "example": true,
                            "default": true
                          },
                          "Flights": {
                            "type": "array"
                          },
                          "DailyCapAmount": {
                            "type": "integer",
                            "example": 5000,
                            "default": 0
                          },
                          "FreqCapType": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "CapType": {
                            "type": "integer",
                            "example": 4,
                            "default": 0
                          },
                          "IsFreqCap": {},
                          "IsDeleted": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          },
                          "EndDateISO": {},
                          "Price": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "IsArchived": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          },
                          "LifetimeCapAmount": {
                            "type": "integer",
                            "example": 50000,
                            "default": 0
                          },
                          "FreqCapDuration": {
                            "type": "integer",
                            "example": 10,
                            "default": 0
                          },
                          "FreqCap": {
                            "type": "integer",
                            "example": 2,
                            "default": 0
                          },
                          "SalespersonId": {},
                          "AdvertiserId": {
                            "type": "integer",
                            "example": 12345,
                            "default": 0
                          },
                          "Name": {
                            "type": "string",
                            "example": "Nike Shoes"
                          },
                          "Id": {
                            "type": "integer",
                            "example": 567890,
                            "default": 0
                          },
                          "CustomFieldsJson": {},
                          "StartDateISO": {
                            "type": "string",
                            "example": "2017-01-01T00:00:00.0000000"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X POST -H 'X-Adzerk-ApiKey:<APIKEY>' 'https://api.kevel.co/v1/campaign/search' --data-urlencode 'campaignName=%Nike%'"
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/management-sdk');\nconst apiKey = process.env.ADZERK_API_KEY;\n\nasync function searchCampaigns() {\n  let specifications = await Adzerk.fetchSpecifications();\n  let client = await Adzerk.buildClient({apiKey, specifications});\n\n  let campaigns = await client.run(\"campaign\", \"search\", {campaignName: \"%Nike%\"});\n  console.log(campaigns);\n\n  let names = campaigns.items.map(a => a.name)\n  console.log(names);\n}\n\nsearchCampaigns();"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk\"\n\ndef search_campaign()\n    client = Adzerk::Client.new(ENV[\"ADZERK_API_KEY\"])\n    name = \"Campaign%\"\n    pp client.campaigns.search(name)\nend\nsearch_campaign()"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "ruby"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```