Skip to main content
GET
cURL

Query Parameters

ID
integer
required

Your Haku account ID.

setID
integer
required

The Zone ID being requested.

type
string
required

Has two possible values: "json" returns the most eligible ad, while "jsonr" returns a list of all eligible ads ordered from most to least eligible.

For more information, read How to request for all eligible ads via API.

size
string

The ad size you expect to receive.

rf
integer

Pass this parameter ;rf=1 if you want to determine whether the ad has a destination URL to which the user will be redirected when the ad is clicked. If this parameter is present in the request, the response will contain the extra field is_redirectable.

kw
string

Required for Keyword Targeting. Allows you to pass keywords to Haku, for use with keyword targeting. Pass a comma delimited string of keywords. For example ;kw=apples,pears.

referrer
string

Required for URL Targeting. Our URL Targeting feature traditionally relies on the HTTP referrer header to know which page our ad requests were made on. However, if you're making server-side requests you can pass it to us directly in the ad request using the ;referrer= parameter. The URL must be encoded when passing it in this way.

ip
string

Required for Geographic Targeting. If you're doing server side ad requests, and you want to geographically target your campaigns, you can simply add the ip= query parameter into the request and provide the IPv4 address used for targeting.

ua
string

Required for Platform Targeting. The user's User Agent string (URL encoded)

sw
integer

Required for Platform Targeting. The user's device's screen width.

sh
integer

Required for Platform Targeting. The user's device's screen height.

spr
integer

Required for Platform Targeting. The user's device's screen pixel ratio.

pid
integer

Required for Unique Delivery or Roadblocks. The pid stands for 'pageID' and is a random number that must be the same for any ad requested from the current page instance.

place
integer

Required for Unique Delivery. Place represents the number of times a particular zone has been requested on a single page instance, this should be incremented each time the zone is re-requested. Starts from 0, 1, 2, and so on.

_abdk
string

When using Data Keys, use this parameter to pass in the key-value pairs.

defer_signing
boolean

When using Beacon Signing Keys, use this parameter to defer generating hashes and timestamps such that they can be signed later with a shared key.

Response

200 - application/json

successful operation

status
string

Indication of successful operation.

Example:

"SUCCESS"

placements
object[]