## 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"`

# ``200      200

object

PageNumber

integer

Defaults to 0

Items

array of objects

Items

object

IsActive

boolean

Defaults to true

DontAffectParentFreqCap

boolean

Defaults to true

Flights

array

DailyCapAmount

integer

Defaults to 0

FreqCapType

integer

Defaults to 0

CapType

integer

Defaults to 0

IsFreqCap

string

IsDeleted

boolean

Defaults to true

EndDateISO

string

Price

integer

Defaults to 0

IsArchived

boolean

Defaults to true

LifetimeCapAmount

integer

Defaults to 0

FreqCapDuration

integer

Defaults to 0

FreqCap

integer

Defaults to 0

SalespersonId

string

AdvertiserId

integer

Defaults to 0

Name

string

Id

integer

Defaults to 0

CustomFieldsJson

string

StartDateISO

string

Updated 10 months ago

* * *

ShellJavaScriptRuby

```

xxxxxxxxxx

curl -X POST -H 'X-Adzerk-ApiKey:<APIKEY>' 'https://api.kevel.co/v1/campaign/search' --data-urlencode 'campaignName=%Nike%'
```

```

xxxxxxxxxx

{
  "PageNumber": 1,
  "Items": [
    {
      "IsActive": true,
      "DontAffectParentFreqCap": true,
      "Flights": [],
      "DailyCapAmount": 5000,
      "FreqCapType": 1,
      "CapType": 4,
      "IsFreqCap": null,
      "IsDeleted": false,
      "EndDateISO": null,
      "Price": 0,
      "IsArchived": false,
      "LifetimeCapAmount": 50000,
      "FreqCapDuration": 10,
      "FreqCap": 2,
      "SalespersonId": null,
      "AdvertiserId": 12345,
      "Name": "Nike Shoes",
      "Id": 567890,
      "CustomFieldsJson": null,
      "StartDateISO": "2017-01-01T00:00:00.0000000"
    }
  ]
}

Updated10 months ago

* * *
