Sign in | Sign up

categories

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

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
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 compu for the desktop platform, do this:

http://api.adbeat.com/v3/{api-key}/categories/?q=compu&platformId=desktop"

JSON Response

{
    "statusCode": 200,
    "numHits": 9,
    "hits": [{
        "countryId": "us",
        "score": 1,
        "suggestion": "/technology and computing/web hosting"
    }, {
        "countryId": "us",
        "score": 1,
        "suggestion": "/technology and computing/telecom"
    }, {
        "countryId": "us",
        "score": 1,
        "suggestion": "/technology and computing/tech news and info"
    }, {
        "countryId": "us",
        "score": 1,
        "suggestion": "/technology and computing/software"
    }, {
        "countryId": "us",
        "score": 1,
        "suggestion": "/technology and computing/internet technology"
    }, {
        "countryId": "us",
        "score": 1,
        "suggestion": "/technology and computing/consumer electronics"
    }, {
        "countryId": "us",
        "score": 1,
        "suggestion": "/technology and computing/computer security"
    }, {
        "countryId": "us",
        "score": 1,
        "suggestion": "/technology and computing/computer hardware"
    }, {
        "countryId": "us",
        "score": 1,
        "suggestion": "/technology and computing"
    }],
    "apiUnits": 34,
    "statusMsg": "successful categories request",
    "requestParameters": {
        "q": "compu",
        "platformId": "desktop"
    },
    "handler": "categories"
}