Page tree



Before Using PubMatic APIs…

First generate the API Token. For more information, see Getting Started with PubMatic APIs .

Retrieve the Bulk-Data Details for a Topic

If your data size is very large, the report takes too long to process, or the report generation is timing out, use this API method. This allows you to register the topic (query pattern) and get the data using the topicId generated by the registration process, when the data has been prepared and can manage large data sets more efficiently.

This method is limited to a single topic per pull. If you need to pull all topics, see WebHook Data Pull.

Request

URIhttp://{domainName}/topic/data/{topicId}/{day}
HTTP MethodGET

Request Headers                     

Header Name

Type

Required

Description

AuthorizationstringYes

Send your generated access token for authentication in place of ${access_token} for App/User. Format, "Bearer + Space + Token". Example:

"Bearer 9c7xxxe3c"

Accept-Encoding: gzipstringYes

Compresses data before network transfer. Client receives compressed data in bytes. Example:

154 megabytes file can be compressed to 17 megabytes

Request Path Parameters

Parameter Name

Type

Required

Validations

Description

topicIdintegerYes Publishers can only query their own dataUnique topic ID
daystringYes YYYY-MM-DD

Sample Request

http://api.pubmatic.com/v1/analytics/topic/data/1/2015-11-11

Response

Response Header Name

Type

Description

Content-Typeapplication/jsonJson response

Response Body

The following table lists parameters returned in API responses.

Response Body Parameter

Type

Description

alertstring

Alert message from server. In most cases, it will be null. Example:

"alert": null

columnsstring[]

Dimension and metrics columns. Please see the relevant reference section for a complete list of dimensions and metrics and their limitations. Example:

"columns": [
    "dealMetaId",
    "revenue",
    "paidImpressions",
    "ecpm"
],


dealMetaId is a special dimension in query for additional columns to be added on returned response. Example:

Query on dealMetaIdrevenuepaidImpressions, and ecmp, adds one more column, publisherdealId, to the response. The rows section will also include the new column value.

"columns": [
    "dealMetaId",
    "publisherDealId",
    "revenue",
    "paidImpressions",
    "ecpm"
],

dataFreshnessobject

The date on which the settings of the dataset were last updated. Example:

"dataFreshness": {
     "dataFreshnessHour": "2015-03-12T04",
     "timeZone": "PST"
},

 displayValue object

The display value of the "ID." Example:

dealMetaId "13497" has a description (name) of "xxx"

"displayValue": {
     "dealMetaId": {
         "13497": "xxx",
         "16083": "yyy",

 rowsarray of array

The main table-like data structure, in which each column in the row corresponds to the columns definition in the same sequence. Example:

The records below would be presented in columns, ["dealMetaId,","publisherDealId," "revenue," "paidImpressions," "ecpm"]

"rows": [
    [
        "16651",
        "PM-XXX339",
        83365.114596,
        10126407.0,
        8.232448
    ],

When using the dealMetaId dimension, you must associate the publisherDealId.

Example:

"columns": [
      "dealMetaId",
      "publisherDealId",
      "revenue"
],
"rows": [
    [
        "10534",
        "PM-SUU63339",
        0
    ],

Sample Response

JSON
{
    "alert": null,
    "columns": [
        "dealMetaId",
        "revenue",
        "paidImpressions",
        "ecpm"
    ],
    "currency": "USD",
    "dataFreshness": {
        "dataFreshnessHour": "2015-03-12T04",
        "timeZone": "PST"
    },
    "displayValue": {
        "dealMetaId": {
            "13497": "Criteo_Criteo_ALL_ROS_ALL_0708_3.50",
            "16083": "Target_RON_4.00_MediaMath",
            "16091": "Target_Women'sLifestyle_7.00_MediaMath",
            "16651": "Netflix_Entertainment_8.00_DBM",
            "17698": "AT&T_RON_6.50_MEC_AppNexus",
            "3504": "P&G_RON_6.50_AudienceScience",
            "3740": "MaxPoint Interactive_Maxpoint Interactive_ALL_FLNEWS_ALL_6.00",
            "3743": "MaxPoint Interactive_Maxpoint Interactive_ALL_FLTODAY_ALL_6.00",
            "6189": "Invite_Geico_RON_ALL_2.00",
            "8763": "MaxPoint Interactive_Maxpoint Interactive_ALL_RON_ALL_2.00"
        }
    },
    "rows": [
        [
            "16651",
            83365.114596,
            10126407,
            8.232448
        ],
        [
            "8763",
            77102.258791,
            38541211,
            2.000515
        ],
        [
            "3504",
            73710.9945,
            11340153,
            6.5
        ],
        [
            "3740",
            60776.184,
            10129364,
            6
        ],
        [
            "17698",
            54480.049734
            8096994,
            6.728429
        ],
        [
            "13497",
            45204.601177,
            11099020,
            4.072846
        ],
        [
            "6189",
            34021.467339,
            16561790,
            2.054214
        ],
        [
            "16091",
            30320.486,
            4331498,
            7
        ],
        [
            "3743",
            20962.92,
            3493820,
            6
        ],
        [
            "16083",
            10852.705205,
            2364376,
            4.590093
        ]
    ]
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

 Error Codes

Error Code

Error Description

500Internal Server Error
400Bad Request
401Unauthorized
403Access Denied
404Data Not Found
503Service Not Available or too many requests