Description: Request the total number of visits purchased and the associated cost for a specific period of time.
- The data is accurate up to the moment the API request is made.
- Passing the optional request parameter reporttype will provide additional reporting detail.
URL: https://api.bedrock.com/query/1.0/visit/totals
HTTP Request Methods: GET, POST
API Rate Limit: None. However, BEDROCK reserves the right to limit API requests. If you are concerned about your volume please contact support. Sample API Call:
| https://api.bedrock.com/query/1.0/visit/totals?apikey=3eb2b085c8363457dd56f42f54ee9gh6&starthour=2009-08-04-23&reporttype=keyword |
Request Parameters:
| Name | Description | Required | Example Value | | apikey | A 32-character secret key given to you upon registration. | Yes | 3eb2b085c8363457dd56f42f54ee9gh6 | | starthour | The report will query data back to this hour.
- The format is YYYY-MM-DD-HH
| Yes | 2009-08-04-23 | | endhour | The report will query data up to this hour.
- The format is YYYY-MM-DD-HH
- The default endhour is the current time.
| No | 2009-08-05-00 | | timezone | A time zone can be selected to specify how the starthour and endhour should be interpreted.
| No | America/Los_Angeles | | format | Choose a response format. Supported formats:
| No | xml | | callback | Used w/ json format. Response will be JSONP w/ the passed value as a callback. | No | foo
| | trafficid | A 16-character identifier of your choice. It can be inserted into your landing page URL for tracking. | No | vertical | | reporttype | Choose a report type. Supported report types:
- summary (default)
- keyword
- seller
- bid
- country
| No
| keyword |
XML Response: A successful XML response will contain a <success> element, <starthour>, <endhour>, and <timezone> elements indicating the time period being queried, and <visits> and <amount> elements indicating the total number of visits and cost from these visits respectively.
<response> <success>true</success> <starthour>2009-08-04-23</starthour> <endhour>2009-08-05-00</endhour> <timezone>America/Los_Angeles</timezone> <visits>34959</visits> <cost>1747.95</cost> </response> |
If reporttype is passed, a successful XML response will also include <rows> and <row> elements denoting each discrete line of the report.
<response> <success>true</success> <starthour>2009-08-04-23</starthour> <endhour>2009-08-05-00</endhour> <timezone>America/Los_Angeles</timezone> <rows>
<row> <keyword>paris hilton</keyword>
<visits>34959</visits> <cost>1747.95</cost> </row> <row> <keyword>angelina jolie</keyword> <visits>12333</visits> <cost>993.33</cost> </row>
</rows> </response> |
An unsuccessful response will contain one or more <error> elements indicating the problematic request parameter field.
<errors> <error> <field>apikey</field> <message>cannot be empty</message> </error> </errors> |
|
|