campaigns

This method returns suggestions for advertiser campaigns. Results can be filtered by using query parameters. This method is handy for implementing auto-completion form elements in your web application's UI.

Request Cost: 25 units, Result Cost: 1 unit/result

URL Format

http://api.adbeat.com/v3/{api-key}/campaigns

Parameters

Parameter Name Meaning Default Value Notes
q query (required) No wildcards needed or used - e.g. compu will find /technology and computing/internet technology as a suggestion.
countryId country filter (no filtering)
e.g. us (See countries)
platformId platform filter (no filtering) e.g. desktop (See platforms) To specify multiple values, separate them by commas (e.g. iPhone,iPad) Currently only desktop is supported for a non-us countryId. Use &platformId=mobile to specify all mobile devices (i.e. android, iphone, ipad, androidtablet)
rows Number of results to return 10
start Index of first result to return 0 Use start=N (where N > 0) to page through results by making repeated requests.

Return Fields

Note: The following fields are returned except for certain query parameter filters. (See Response Format)
Field Name Example Notes
advertiserId comparisons.org
Advertiser domain name
campaignId 4fd9c8
The campaign id for the campaign.
countryId us
platformId desktop
suggestion /technology and computing/software Suggested term for the provided query.
score 14 Score of result, based on popularity of the term and other factors.
apiUnits 35 The number of API units consumed by this request.

Usage Example(s)

To find suggestions that contains bank, do this:

http://api.adbeat.com/v3/{api-key}/campaigns/?q=bank

JSON Response

{
    "statusCode": 200,
    "numHits": 4820,
    "hits": [{
        "countryId": "us",
        "campaignId": "4fd9c8",
        "score": 128355752,
        "suggestion": "The Home Refinancing Plan Banks Don't Want You Knowing (comparisons.org)",
        "platformId": "androidTablet",
        "advertiserId": "comparisons.org"
    }, {
        "countryId": "us",
        "campaignId": "4fd9c8",
        "score": 128355752,
        "suggestion": "The Home Refinancing Plan Banks Don't Want You Knowing (comparisons.org)",
        "platformId": "iPad",
        "advertiserId": "comparisons.org"
    }, {
        "countryId": "us",
        "campaignId": "4fd9c8",
        "score": 128355752,
        "suggestion": "The Home Refinancing Plan Banks Don't Want You Knowing (comparisons.org)",
        "platformId": "android",
        "advertiserId": "comparisons.org"
    }, {
        "countryId": "us",
        "campaignId": "4fd9c8",
        "score": 128355752,
        "suggestion": "The Home Refinancing Plan Banks Don't Want You Knowing (comparisons.org)",
        "platformId": "iPhone",
        "advertiserId": "comparisons.org"
    }, {
        "countryId": "us",
        "campaignId": "4fd9c8",
        "score": 128355752,
        "suggestion": "The Home Refinancing Plan Banks Don't Want You Knowing (comparisons.org)",
        "platformId": "desktop",
        "advertiserId": "comparisons.org"
    }, {
        "countryId": "us",
        "campaignId": "b8c6e3",
        "score": 47041600,
        "suggestion": "Investing, Advice, Retirement and Banking (tiaa.org)",
        "platformId": "androidTablet",
        "advertiserId": "tiaa.org"
    }, {
        "countryId": "us",
        "campaignId": "b8c6e3",
        "score": 47041600,
        "suggestion": "Investing, Advice, Retirement and Banking (tiaa.org)",
        "platformId": "iPad",
        "advertiserId": "tiaa.org"
    }, {
        "countryId": "us",
        "campaignId": "b8c6e3",
        "score": 47041600,
        "suggestion": "Investing, Advice, Retirement and Banking (tiaa.org)",
        "platformId": "android",
        "advertiserId": "tiaa.org"
    }, {
        "countryId": "us",
        "campaignId": "b8c6e3",
        "score": 47041600,
        "suggestion": "Investing, Advice, Retirement and Banking (tiaa.org)",
        "platformId": "iPhone",
        "advertiserId": "tiaa.org"
    }, {
        "countryId": "us",
        "campaignId": "b8c6e3",
        "score": 47041600,
        "suggestion": "Investing, Advice, Retirement and Banking (tiaa.org)",
        "platformId": "desktop",
        "advertiserId": "tiaa.org"
    }],
    "apiUnits": 35,
    "statusMsg": "successful campaigns request",
    "requestParameters": {
        "q": "bank"
    },
    "handler": "campaigns"
}