In most cases, you use the Reporting > Real Time Bidding screen for Exporting RTB Bids. However, if you need more information than is available on the report, such as caller ID or ZIP Code, you can create a custom report using the API.
The procedures and examples in this article cover how to use the Ringba API to export bid request data sent by publishers. You can use this process to track bid activity, analyze trends, and optimize performance.
This article contains the following sections:
- Prerequisites
- API Endpoint for Exporting Bid Requests
- Example API Requests
- Exporting Publisher Bid Requests Through the API FAQ
Prerequisites
To complete the steps in these procedure, you must have the following:
- API access to the Ringba platform
- Authentication credentials for the API. See API Access Tokens.
- Understanding of the Ringba API endpoint for exporting bid data. See the Ringba API Documentation.
Note: The code samples in this article contain placeholders for ID values that are unique to you. Placeholders appear in double curly braces {{}}. The braces only indicate that it is a placeholder; you should not include them in your code.
API Endpoint for Exporting Bid Requests
Use the following steps to retrieve bid requests sent by publishers:
-
Send a POST request to trigger Ringba to generate the file with the specified columns.
POST https://api.ringba.com/{{accountid}}/rtb/export/csv
-
Send a GET request using the ID that you received from the response to the first request.
GET https://api.ringba.com/{{accountid}}/rtb/export/{{id from first request}}
Request parameters
To filter and customize the export, include the following parameters:
| Parameter | Type | Description |
|---|---|---|
| reportStart | string | Beginning of report time period in UTC, shown in ISO format |
| reportEnd | string | End of report time period in UTC, shown in ISO format |
| formatPercentages | string | (Optional) Formats values as percentages in the response for better readability |
| formatDateTime | string | (Optional) Formats date and time columns in the response for better readability |
| formatTimeZone | string | (Optional) Changes the times in the response so that the time zone is the same as specified |
| valueColumns | string | Columns desired on the report. The example below shows all standard columns, but you can include any custom column using the same custom tag format. (e.g. “tag:User:zip”) |
Handling the response
After you receive the ID in the response to the first request, you must to send the second request with that ID in the URL to be able to receive the link to download the file. The file is in CSV format.
Use your browser to download the file by clicking on the link in the response. If there is no link, then the system is still generating the file. Try the second step again after a few minutes.
Example API Requests
This sections contains some sample code to demonstrate how to use the API calls.
Export CSV - POST (first step)
POST https://api.ringba.com/{{accountid}}/rtb/export/csvRequest example:
{
"reportStart": "2025-01-09T07:00:00Z",
"reportEnd": "2025-01-10T06:59:59Z",
"formatTimespans": true,
"formatPercentages": true,
"formatDateTime": true,
"generateRollups": true,
"valueColumns": [
{
"column": "campaignName"
},
{
"column": "publisherName"
},
{
"column": "campaignId"
},
{
"column": "publisherId"
},
{
"column": "publisherSubId"
},
{
"column": "bidAmount"
},
{
"column": "winningBid"
},
{
"column": "winningBidCallAccepted"
},
{
"column": "winningBidCallRejected"
},
{
"column": "bidDt"
},
{
"column": "bidExpireInSeconds"
},
{
"column": "bidExpireDt"
},
{
"column": "bidDID"
},
{
"column": "bidId"
},
{
"column": "isZeroBid"
},
{
"column": "reasonForReject"
},
{
"column": "tag:User:zip"
},
{
"column": "tag:User:exposeCallerId"
},
{
"column": "tag:InboundNumber:State"
},
{
"column": "tag:InboundNumber:Number"
}
],
"filters": [],
"formatTimeZone": "America/Los_Angeles"
}Response example:
{
"id": "{{id from first request}}"
}Export CSV - GET (Second step)
GET https://api.ringba.com/{{accountid}}/rtb/export/{{id from first request}}Response example:
{
"status": "Ready",
"url": "https://ringba-export.s3.amazonaws.com/rtb-export/2025/02/17/XXX999.zip?AWSAccessKeyId=XXX999&Expires=1739852825&x-amz-security-token=XXXxxx999&Signature=XXX999"
}Exporting Publisher Bid Requests Through the API FAQ
What if I still have questions about using the API to export publisher bid requests?
If you have any questions or need additional help, please reach out to our support team via chat or email at support@ringba.com.