You are here: Demand Partners > Real-time bidding > OpenRTB API > Mobile examples

Mobile examples

Last updated on November 1, 2017

This page contains the following mobile examples:

Important: Your bidding application must return a valid response even if you do not want to place a bid. For example, you can return a 204 No Content or a 200 OK response with an empty body, which will be treated as a bid of zero.

Mobile banner

The request and response below are mobile bannerThis is an ad that appears on a web page which is typically hyperlinked to an advertiser’s website. Banners can be images (GIF, JPEG, PNG), JavaScript programs or multimedia objects (For example, Java). examples.

BidRequest example

The following bid request is a mobile banner example. To accurately represent a mobile banner bid requestWhen OpenX Ad Exchange receives an ad request, it sends a communication containing details about the impression to selected real-time bidders to solicit bids for it., it includes Banner, App, and Device objects.


{
    "ext": {
        "pchain": "6a123e2ec45678c6:538995987
    },
    "source": {
        "pchain": "6a123e2ec45678c6:538995987",
        "fd": 1
    },
    "cur": ["USD"],
    "imp": [{
        "banner": {
            "ext": {
                "matching_ad_id": [{
                    "ad_width": 320,
                    "ad_height": 50,
                    "creative_id": 538123456,
                    "placement_id": 537789987,
                    "campaign_id": 537124578
                }]
            },
            "format": [{
                "w": 320,
                "h": 50
            }],
            "h": 50,
            "w": 320,
            "topframe": 1,
            "battr": [1, 2, 3, 6, 7, 8, 9, 17],
            "btype": [1, 4]
        },
        "id": "1",
        "exp": 300,
        "secure": 0,
        "instl": 0
    }],
    "at": 2,
    "id": "0abcf7cf-108c-4051-def7-49e3b9f9gh99",
    "regs": {
        "ext": {
            "sb568": 0
        },
        "coppa": 0
    },
    "bcat": ["108", "98", "IAB25", "IAB25-1", "IAB25-2", "IAB25-3", "IAB25-4", "IAB25-5", "IAB25-6", "IAB25-7", "IAB26", "IAB26-1", "IAB26-2", "IAB26-3", "IAB26-4", "OX-108", "OX-98"],
    "test": 0,
    "device": {
        "ext": {
            "language": ["en"],
            "browser_version": "61",
            "browser": "Chrome"
        },
        "dpidmd5": "05CC972FF8E2F9EF2D1B914CD0DC0C89",
        "dpidsha1": "98945FBDC53472CDDA5E15BBFECE3560D026ED11",
        "ifa": "7a123a2b-ef45-4b78-ac99-f3e94ab0d556",
        "connectiontype": 0,
        "carrier": "Frontier Communications",
        "language": "en",
        "js": 1,
        "w": 1440,
        "h": 2560,
        "osv": "6",
        "os": "Android",
        "model": "SM-G928V",
        "make": "Samsung",
        "devicetype": 4,
        "ip": "50.50.144.251",
        "lmt": 0,
        "dnt": 0,
        "geo": {
            "ext": {
                "dma": 617,
                "continent": "north america"
            },
            "zip": "53075",
            "city": "random lake",
            "metro": "617",
            "region": "WI",
            "country": "USA",
            "type": 2,
            "lon": -88.0105,
            "lat": 43.5717
        },
        "ua": "Mozilla/5.0 (Linux; Android 6.0.1; SM-G928V Build/MMB29K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36"
    },
    "user": {
        "id": "55816b39711f9b5acf3b90e313ed29e51665623f",
        "yob": 1984,
        "gender": "M"
    },
    "app": {
        "content": {
            "userrating": "4.5"
        },
        "publisher": {
            "id": "538987123"
        },
        "cat": ["IAB19", "IAB3"],
        "storeurl": "https://play.google.com/store/apps/details?id=yourapp",
        "domain": "yourapp.com",
        "name": "YourApp",
        "bundle": "com.yourapp.bundle",
        "id": "539321789"
    }
} 

See also

Learn more about the objects in this request:

BidResponse example

The following bid response contains a single SeatBid object. The Bid object includes the bundle field, which is required for app. Bid responses for banner also contain the h and w fields.

{
    "id": "0abcf7cf-108c-4051-def7-49e3b9f9gh99",
    "bidid": "78e6c6fe067a5e345b6d9325dd0d9c99",
    "seatbid": [{
        "bid": [{
            "id": "78e6c6fe067a5e345b6d9325dd0d9c99",
            "impid": "1",
            "adomain": ["advertiserdomain.com"],
            "price": 0.19,
            "bundle": "com.yourapp.bundle",
            "adm": "<script type='text/javascript' src='https://anonymous.com/delivery/r/ajs.php?did=78e6c6fe067a5e345b6d9325dd0d9c99&z=${AUCTION_PRICE:OXCRYPT}&u=|oBnRYgLwbGaAMIEo6XewUdheKogdaLOWmWEfqu5qJZo=|&c1=V15UTXQIVgOlqLbfKj6SeyeVLVUBS30RvN-IZ3XD5gQJlYHOfLC0FVitudzrhvLjCxMIuzIezis-BS8cKIvIc-UW8MBnUKFDcccCMWpaMQ1Raq4fg0cFgrD-KBLId2oY-w8fldcFqziuOTyr2XCRe3ZtTUgyG7xQPLAfg0Dc-PR15PEC-ZDc-mVqEyCXl8KMAS_G3rhFAZnhpBpe9Z7ogK6qjliSs9PnPds9H9Z0VZFFLez5ezGwiHiAYXqwQOYk-QyJl2S9Gl9Dm9s7mgQhFxr99ABkdqk4RYVqoOHrD8Po2i_PGVs_5SVBsHkgIIHGGjwz-AbhtIK3dwaePNkN5cMeDNmygPlZqQwsgjD1UPHwVzzNqymVQg'></script>",
            "crid": "3000567",
            "w": 300,
            "h": 250
            "ext": {
                "brand_id": "brand_0",
                "buyer_id": "buyer_0"
            }
        }]
    }]
}

Feedback form