Skip to main content
GET
https://api-v2.adrop.io
/
request
Banner Ads
curl --request GET \
  --url https://api-v2.adrop.io/request \
  --header 'Authorization: <authorization>'
{
    "code": 0,
    "msg": "OK",
    "result": {
        "id": "ad_123456",
        "format": "banner",
        "type": "display",
        "unit": "YOUR_UNIT_ID",
        "w": 320,
        "h": 100,
        "ad": "<div>...</div>",
        "target": "external",
        "carouselActivated": false
    }
}
Banner ads are returned in HTML format, allowing direct rendering in web projects. For other platforms, you can use WebView for rendering.

Request Parameters

Headers

Authorization
string
required
App Key (found in adrop_service.json)

Query Parameters

unit
string
required
Ad unit ID
uid
string
User unique identifier. Used for frequency capping and targeting.
pf
string
Platform. One of android, ios, web
lcl
string
Locale. e.g., en_US, ko_KR
theme
string
Theme mode. light or dark
contextId
string
Context targeting ID (required for targeted ads)
adId
string
Advertising identifier (required for device preview)

Response

code
integer
required
Response code. 0 indicates success.
msg
string
required
Response message
result
object
Ad data
{
    "code": 0,
    "msg": "OK",
    "result": {
        "id": "ad_123456",
        "format": "banner",
        "type": "display",
        "unit": "YOUR_UNIT_ID",
        "w": 320,
        "h": 100,
        "ad": "<div>...</div>",
        "target": "external",
        "carouselActivated": false
    }
}

Rendering

Web Rendering

<div id="ad-container"></div>

<script>
fetch('https://api-v2.adrop.io/request?unit=YOUR_UNIT_ID&uid=USER_ID&pf=web', {
    headers: { 'Authorization': 'YOUR_APP_KEY' }
})
.then(res => res.json())
.then(data => {
    if (data.code === 0) {
        document.getElementById('ad-container').innerHTML = data.result.ad;
    }
});
</script>
When using carousel banners, add the following script:
<script src="https://storage.adrop.io/js/adrop-carousel-1.0.1.min.js"></script>