NeverBlock API
Neverblock uses a simple endpoint to proxy requests to the ExoClick syndication servers.
This endpoint is documented below and you are free to use it to create your own custom integration in your language of choice.
v1
This version of API supports all the formats, currently available for neverblock solution (banners, sticky banners, native ads, instant messages).
Request
Single Zone Request
https://syndication-adblock.exoclick.com/ads-multi.php?v=1&zones[0][idzone]=123456&user_ip=8.8.8.8
Multi Zone Request
https://syndication-adblock.exoclick.com/ads-multi.php?v=1&zones[0][idzone]=123456&zones[1][idzone]=654321&zones[2][idzone]=135790&user_ip=8.8.8.8
The requests above are similar, except that multi zone requests need to be structured with an incremental array notation (i.e. zones[0][idzone], zones[1][idzone],…) as demonstrated.
Note
Multi zone requests are limited to a maximum of 20 zones per request.
Parameters
The following parameters should be set for all requests:
- zones[N ][idzone] - zone id to be requested
- user_ip - end users IP (used for targeting)
Headers
The following headers should be set for all requests:
- X-Forwarded-For - Originating IP address of client
- Referer - Referring website address
- User-Agent - Client identifier
- Accept-Language - Client language and locale
Response
The JSON payloads returned from the above examples are as follows:
Single Zone Response
{
"zones": [
{
"idzone":"123456",
"type":"sticky_banner",
"data": {
"image":"http:\/\/static.exoclick.com\/library\/238804\/29d31cb0a21c35619a8e34a52b895a1d18fe4eae.gif",
"url":"http:\/\/main.dynsrvaba.com\/click.php?data=IHwyMTY4Mzk5fHxodHRwJTNBJTJGJTJGd3d3LnNreXBlLmNvbXx8fDB8fDE1MTcyNTI1NzF8b2xkLnhoYW1zdGVyLmNvbXwxMC40Mi4wLjF8fDE4MTAwMjM1fDI4MjkyNTN8NTA4fHw0MXwyfDE1fDB8MHx8NDY4eDYwfDF8MHx8NWE2YjY1MTBhYWFlODEuNDg3MjYwNzIxNDY0MzgzNjM2fDB8fDF8MHx8MXwwfDB8ICB8fDF8MHwwfDB8MHwwfDB8MHx8fDB8T0t8YzcwYTVmNDcwZDQzMDFjMjIzNDExNTRjZWMzNDIyZTg%3D",
"v_pos":"top",
"h_pos":"left",
"frequency_period":"1440",
"width":"468",
"height":"60"
}
}
],
"renderers":{"sticky_banner":"http:\/\/ads.exoclick.com\/nb\/sticky_banner.js"}
}
Multi Zone Response
{
"zones": [
{
"idzone": "123456",
"type": "banner",
"data": {
"image": "http://static.exoclick.com/library/238804/98fe7c6aee5b7348ee3b1329a48e16b418c20251.gif",
"url": "http://main.dynsrvaba.com/click.php?data=IHwyMTY4Mzk1fHxodHRwJTNBJTJGJTJGd3d3LnlhbmRleC5ydXx8fDB8fDE1MTcyNTM2MzV8b2xkLnhoYW1zdGVyLmNvbXwxMC40Mi4wLjF8fDE4MTAwMjI5fDI4MjkyNDV8NTA4fHw0MXwyfDE1fDB8MHx8MzAweDI1MHwxfDB8fDVhNmI2NTEwYWFhZTgxLjQ4NzI2MDcyMTQ2NDM4MzYzNnwwfHwxfDB8fDF8MHwwfCAgfHwxfDB8MHwwfDB8MHwwfDB8fHwwfE9LfGY5MDQwMGEyNzE4MDIyYjBkZDNmMjg0MmM0NGVhYzA2"
}
},
{
"idzone": "654321",
"type": "instant_message",
"data": {
"image": "http://static.exoclick.com/library/238804/43a77757d684abc5ee93d8169c09f3b1c9bfb650.gif",
"url": "http://main.dynsrvaba.com/click.php?data=IHwyMTY4Mzg5fHxodHRwJTNBJTJGJTJGd3d3LnlhbmRleC5ydXx8fDB8fDE1MTcyNTM2MzZ8b2xkLnhoYW1zdGVyLmNvbXwxMC40Mi4wLjF8fDE4MTAwMjIzfDI4MjkyNDl8NTA4fHw0MXwyfDE1fDB8MHx8MjUweDE1MHwxfDB8fDVhNmI2NTEwYWFhZTgxLjQ4NzI2MDcyMTQ2NDM4MzYzNnwwfHwxfDB8fDF8MHwwfCAgfHwxfDB8MHwwfDB8MHwwfDB8fHwwfE9LfDNmNzNkOWU3OGEwM2NkNGQ5MjI5ZGRiNDhkODJiYjdk",
"frequency_period": "1440"
}
},
{
"idzone": "135790",
"type": "sticky_banner",
"data": {
"image": "http://static.exoclick.com/library/238804/29d31cb0a21c35619a8e34a52b895a1d18fe4eae.gif",
"url": "http://main.dynsrvaba.com/click.php?data=IHwyMTY4Mzk5fHxodHRwJTNBJTJGJTJGd3d3LnNreXBlLmNvbXx8fDB8fDE1MTcyNTM2MzZ8b2xkLnhoYW1zdGVyLmNvbXwxMC40Mi4wLjF8fDE4MTAwMjM1fDI4MjkyNTd8NTA4fHw0MXwyfDE1fDB8MHx8NDY4eDYwfDF8MHx8NWE2YjY1MTBhYWFlODEuNDg3MjYwNzIxNDY0MzgzNjM2fDB8fDF8MHx8MXwwfDB8ICB8fDF8MHwwfDB8MHwwfDB8MHx8fDB8T0t8YjFmZjRiMjMyMTkyOTJkNDZjYzMyMDFhYzA2N2YxYjY%3D",
"v_pos": "top",
"h_pos": "right",
"frequency_period": "1440",
"width": "468",
"height": "60"
}
}
],
"renderers": {
"banner": "http://ads.vagrant.test/nb/banner.js",
"instant_message": "http://ads.vagrant.test/nb/im.js",
"sticky_banner": "http://ads.vagrant.test/nb/sticky_banner.js"
}
}
Response Data
The following values can be extracted from zones object per each zone in the returned JSON payload for the purpose of ad serving:
- idzone: Zone identifier (useful for distinguishing zone requests when processing)
- type: Type of ad, in renderers it’s possible to get the corresponding default renderer script for it. (Default renderer script expects ExoLoader object to be present in it’s scope)
- data: The ad data specific to the given ad type. Most commonly image and url can be found for banner and banner-like types, some of them have additional parameters.
In case you use the API it’s up to you to write the code generating the DOM to be displayed on front-end, based on provided data. Our default renderers are the scripts that have this responsibility as part of default neverblock solution (php + javascript installation). They can be used with ExoLoader js object only, which internally stores the post-processed responses in its own format and has several helper functions that renderers use and expect to be defined.
v0
This version of API supports only banners. It will return false for any zones of different type.
Request
Single Zone Request
https://syndication-adblock.exoclick.com/ads-multi.php?zones[0][idzone]=123456&user_ip=8.8.8.8
Multi Zone Request
https://syndication-adblock.exoclick.com/ads-multi.php?zones[0][idzone]=123456&zones[1][idzone]=654321&zones[2][idzone]=135790&user_ip=8.8.8.8
The requests above are similar, except that multi zone requests need to be structured with an incremental array notation (i.e. zones[0][idzone], zones[1][idzone],…) as demonstrated.
Note
Multi zone requests are limited to a maximum of 20 zones per request.
Parameters
The following parameters should be set for all requests:
- zones[N ][idzone] - zone id to be requested
- user_ip - end users IP (used for targeting)
Headers
The following headers should be set for all requests:
- X-Forwarded-For - Originating IP address of client
- Referer - Referring website address
- User-Agent - Client identifier
- Accept-Language - Client language and locale
Response
The JSON payloads returned from the above examples are as follows:
Single Zone Response
[
{
"idzone":"123456",
"url":"https:\/\/main.dynsrvaba.com\/click.php?data=IHwyMDMyMTU4fHxodHRwJTNBJTJGJTJGdC5mcnR5aC5jb20lMkZhZmZfYyUzRm9mZmVyX2lkJTNEMTQ0NyUyNmFmZl9pZCUzRDE3MyUyNmFmZl9zdWIyJTNEJTdCY29udmVyc2lvbnNfdHJhY2tpbmclN0RfJTdCem9uZV9pZCU3RCUyNm5vcG9wfHx8MHx8MTUwODQzMTUzM3xwZXJmZWN0Z2lybHMubmV0fDg3LjE5OC4yNDkuMTU0fHwxNzI3ODUyMnwxMzc2NzAyfDUwOHx8NDF8M3wxNnwwfDB8fDMwMHgyNTB8MXwxfHw1ODU4MjRmYWFhMWFmMy41NzE5MDExODUzMzAwNDgxOXwxODcyNHx8MXwwfHwxfDB8MHwgIHx8MXwwfDB8MHwxfDc1MjEzMTR8MHwyOTY0NTc0fHx8T0t8NTM0YmY0MDdmMmUxMDM3NGZiZTBjMDIyZjZjNTFiNTE%3D",
"imgurl":"https:\/\/static.exoclick.com\/banners\/148652\/17918070509411500_1_xacd.gif"
}
]
Multi Zone Response
[{
"idzone": "123456",
"url": "http:\/\/main.dynsrvaba.com\/click.php?data=IHwyMDMyNDAyfHxodHRwJTNBJTJGJTJGb3B0aW1pc2VyLnRtdHJjay5jb20lMkYlM0Zncm91cF9pZCUzRDE2ODQlMjZzdWJpZCUzRCU3QmNvbnZlcnNpb25zX3RyYWNraW5nJTdEJTI2a2V5d29yZCUzRCU3QnpvbmVfaWQlN0R8fHwxODE4MTgxODE4MTh8fDE1MDg3NzIxOTl8b2xvbG8uY29tfDg3LjE5OC4yNDkuMTU0fHwxNzI4MDI0MHwyMTM3MjM3fDUwOHx8NDF8MnwxNnwwfDB8fDMwMHgyNTB8MXwwfHw1OTViODM5N2Q2YjZmOC45MjExMDU0MjE5MjgyOTYwMzN8MTg3MjR8fDF8MHx8MXwyNTc3OHwzNjQxOHwgIHx8MXwwfDB8MHwwfDc1MjEzMTR8MHwyOTY0NTc0fHx8T0t8M2RhMTYyNWM2YzJiOTI3ZDdmZjc3YzEyMDIzMDBkZTU%3D",
"imgurl": "http:\/\/static.exoclick.com\/banners\/510942\/17918091848105800_1_xacd.gif"
}, {
"idzone": "654321",
"url": "http:\/\/main.dynsrvaba.com\/click.php?data=IHwyMDMyNDAyfHxodHRwJTNBJTJGJTJGb3B0aW1pc2VyLnRtdHJjay5jb20lMkYlM0Zncm91cF9pZCUzRDE2ODQlMjZzdWJpZCUzRCU3QmNvbnZlcnNpb25zX3RyYWNraW5nJTdEJTI2a2V5d29yZCUzRCU3QnpvbmVfaWQlN0R8fHwxODE4MTgxODE4MTh8fDE1MDg3NzIxOTl8b2xvbG8uY29tfDg3LjE5OC4yNDkuMTU0fHwxNzI4MDIyMnwyMTM3MjM3fDUwOHx8NDF8MnwxNnwwfDB8fDMwMHgyNTB8MXwwfHw1OTViODM5N2Q2YjZmOC45MjExMDU0MjE5MjgyOTYwMzN8MTg3MjR8fDF8MHx8MXwyNTc3OHwzNjQxOHwgIHx8MXwwfDB8MHwwfDc1MjEzMTR8MHwyOTY0NTc0fHx8T0t8NjdhMDM3Zjc2OGIyYTVmMWRhYjhkYTk0Njk4YTQ0ZWY%3D",
"imgurl": "http:\/\/static.exoclick.com\/banners\/510942\/17918091847332100_1_xask.gif"
}, {
"idzone": "135790",
"url": "http:\/\/main.dynsrvaba.com\/click.php?data=IHwxNzU4MjI3fHxodHRwcyUzQSUyRiUyRnd3dy5jYXJ0b29udHViZS5jb20lMkZwMiUyRmluZGV4LnBocCUzRnQlM0RFWC0zMDB4MjUwLUlFLURlc2stUk9OfHx8MTgxODE4MTgxODE4fHwxNTA4NzcyMTk5fG9sb2xvLmNvbXw4Ny4xOTguMjQ5LjE1NHx8MTY3MDczNTZ8MjEzNzIzN3w1MDh8fDQxfDJ8MTZ8MHwwfHwzMDB4MjUwfDF8MHx8NTk1YjgzOTdkNmI2ZjguOTIxMTA1NDIxOTI4Mjk2MDMzfDE4NzI0fHwxfDB8fDF8MHwwfCAgfHwxfDB8MHwwfDB8NzUyMTMxNHwwfDI5NjQ1NzR8fHxPS3xkZmM4MTcwYzMyZjhkMDhmM2FhNTMxMjA4MjIyNThhMw%3D%3D",
"imgurl": "http:\/\/static.exoclick.com\/banners\/41682\/17713113437719500_1_xacd.gif"
}]
Response Data
The following values can be extracted from the returned JSON payload for the purpose of ad serving:
- url: Click URL to be used to wrap the banner image
- imgurl: Banner image source URL
- idzone: Zone identifier (useful for distinguishing zone requests when processing)