Sign in | Sign up

publishers

This method returns suggestions for publisherIds. 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}/publishers

Parameters

Parameter Name Meaning Default Value Notes
q query (required) No wildcards needed or used - e.g. uk will find publishers-uk.com 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 Maximum 100
start Index of first result to return 0 Use start=N (where N > 0) to page through results by making repeated requests.
fields fields filter (no filtering) Restrict which fields get returned. e.g. &fields=suggestion would return just one of the available fields. &fields=suggestion,score would return just two of the available fields.

Return Fields

Note: The following fields are returned except for certain query parameter filters. (See Response Format)
Field Name Example Notes
countryId us See countries
platformId desktop See platforms
suggestion publishers-uk.com Suggested publisherId for the provided query.
score 4930 Score of result, based on the magnitude of advertising on the publisher and other factors.
apiUnits 35 The number of API units consumed by this request.

Usage Example(s)

To find suggestions that contain news do this:

http://api.adbeat.com/v3/{api-key}/publishers/?q=news

JSON Response

{
    "statusCode": 200,
    "numHits": 297,
    "hits": [{
        "countryId": "us",
        "score": 82524,
        "suggestion": "newser.com",
        "platformId": "desktop"
    }, {
        "countryId": "us",
        "score": 56663,
        "suggestion": "news.discovery.com",
        "platformId": "desktop"
    }, {
        "countryId": "us",
        "score": 38015,
        "suggestion": "news.softpedia.com",
        "platformId": "desktop"
    }, {
        "countryId": "ca",
        "score": 36048,
        "suggestion": "newser.com",
        "platformId": "desktop"
    }, {
        "countryId": "us",
        "score": 26800,
        "suggestion": "news.discovery.com",
        "platformId": "android"
    }, {
        "countryId": "us",
        "score": 26524,
        "suggestion": "news.discovery.com",
        "platformId": "iphone"
    }, {
        "countryId": "us",
        "score": 26416,
        "suggestion": "news.cnet.com",
        "platformId": "desktop"
    }, {
        "countryId": "us",
        "score": 24438,
        "suggestion": "news.discovery.com",
        "platformId": "ipad"
    }, {
        "countryId": "us",
        "score": 23972,
        "suggestion": "news.com.au",
        "platformId": "desktop"
    }, {
        "countryId": "us",
        "score": 21715,
        "suggestion": "newsday.com",
        "platformId": "desktop"
    }],
    "apiUnits": 35,
    "statusMsg": "successful publishers request",
    "requestParameters": {
        "q": "news"
    },
    "handler": "publishers"
}

You can also use parameters to get more specific and detailed results. To find suggestions that contain ms, limit the results to the us, limit the platform to desktop, and return 5 rows of data instead of the default 10 rows, do this:

http://api.adbeat.com/v3/{api-key}/publishers/?q=ms&countryid=us&platformid=desktop&rows=5

JSON Response

{
    "statusCode": 200,
    "numHits": 25,
    "hits": [{
        "score": 51264,
        "suggestion": "msn.com"
    }, {
        "score": 14959,
        "suggestion": "mstarz.com"
    }, {
        "score": 10140,
        "suggestion": "msnbc.com"
    }, {
        "score": 6354,
        "suggestion": "msghn.org"
    }, {
        "score": 5227,
        "suggestion": "msnewsnow.com"
    }],
    "apiUnits": 30,
    "statusMsg": "successful publishers request",
    "requestParameters": {
        "platformid": "desktop",
        "q": "ms",
        "countryid": "us",
        "rows": "5"
    },
    "handler": "publishers"
}