ORTB
中 / EN

Samples

Native 1.2 规范共 3 组官方投放请求/响应示例。

§6.1 · Social Context, Clickout Response

Bid Request

"native":{
    "ver":"1.2",
    "context":2,
    "contextsubtype":20,
    "plcmttype":11,
    "plcmtcnt":1,
    "aurlsupport":0,
    "privacy":1,
    "eventrackers": [
        {
            "event":1,
            "methods": [1,2]
        },
        {
            "event":2,
            "methods": [1]
        }
        ],
        "assets":[
            {
                "id":123,
                "required":1,
                "title":{
                "len":140
                }
            },
            {
                "id":128,
                "required":0,
                "img":{
                "wmin":836,
                "hmin":627,
                "type":3
                }
            },
            {
                "id":124,
                "required":1,
                "img":{
                "wmin":50,
                "hmin":50,
                "type":1
                }
            },
            {
                "id":126,
                "required":1,
                "data":{
                "type":1,
                "len":25
                }
            },
            {
                "id":127,
                "required":1,
                "data":{
                "type":2,
                "len":140
                }
            }
        ]
    }

Bid Response

    "native": {
"link": {
    "url": "http: //i.am.a/URL"
    },
"assets": \[
    {
    "id": 123,
    "required": 1,
    "title": {
        "text": "Learn about this awesome thing"
        }
    },
    {
    "id": 124,
    "required": 1,
    "img": {
        "url":"http://www.myads.com/thumbnail1.png"
        }
    },
    {
    "id": 128,
    "required": 1,
    "img": {
        "url":"http://www.myads.com/largethumb1.png"
        }
    },
    {
    "id": 126,
    "required": 1,
    "data": {
    "value": "My Brand"
        }
    },
    {
    "id": 127,
    "required": 1,
    "data": {
        "value": "Learn all about this awesome story of someone using my product."
        }
    }
    ],
    "eventtrackers": [
        {
        "event":1,
        "method":2,
        "url":"http://www.mytracker.com/tracker.js"
        }
        {
        "event":2,
        "method":1,
        "url":"http://www.mytracker.com/tracker.php"
        }
    ],
    "privacy": "http://www.myprivacyurl.com"
}

§6.2 · Content Context, Video Response

Bid Request

    "native":{
        "ver":"1.2",
        "context":1,
        "contextsubtype":10,
        "plcmttype":11,
        "plcmtcnt":1,
        "aurlsupport":0,
        "privacy":1,
        "eventrackers": [
        {
            "event":1,
            "methods": [1,2]
        },
        {
            "event":2,
            "methods": [1]
        }
        ],
        "assets":[
        {
            "id": 4, 
            "video": {
                "linearity": 1, 
                "minduration": 15, 
                "maxduration": 30, 
                "protocols": [
                    2,3 
                ],
                    "mimes": [ 
                            "video/mp4"
                    ] 
            }
        }, 
        {
            "id":123,
            "required":1,
            "title":{
            "len":140
        }
    },
        {
            "id":128,
            "required":0,
            "img":{
            "wmin":836,
            "hmin":627,
            "type":3
        }
    },
        {
            "id":124,
            "required":1,
            "img":{
            "wmin":50,
            "hmin":50,
            "type":1
        }
    },
        {
            "id":126,
            "required":1,
            "data":{
            "type":1,
            "len":25
        }
    },
        {
            "id":127,
            "required":1,
            "data":{
            "type":2,
            "len":140
        }
    }
],
    "eventtrackers": [
    {
        "event":1,
        "method":2,
        "url":"http://www.mytracker.com/tracker.js"
    }
    {
        "event":2,
        "method":1,
        "url":"http://www.mytracker.com/tracker.php"
    }
    ],
    "privacy": "<u>http://www.myprivacyurl.com"</u>
}

Bid Response

    "native": {
"link": {
    "url": "http: //i.am.a/URL"
},
"assets": [
{
        "id": 4, 
        "video": {
            "vasttag": "\<VAST version='2.0'\>\</VAST\>" 
            }
    },
    {
        "id": 123,
        "required": 1,
        "title": {
            "text": "Watch this awesome thing"
    }
    },
    {
        "id": 124,
        "required": 1,
        "img": {
            "url":"http://www.myads.com/thumbnail1.png"
    }
    },
    {
        "id": 128,
        "required": 1,
        "img": {
            "url":"http://www.myads.com/largethumb1.png"
    }
    },
    {
        "id": 126,
        "required": 1,
        "data": {
            "value": "My Brand"
    }
    },
    {
    "id": 127,
    "required": 1,
    "data": {
        "value": "Watch all about this awesome story of someone using my product."
            }
        }
    ]
}

§6.3 · Third-Party Ad Serving Example

Bid Request

    "native":{
        "ver":"1.2",
        "context":2,
        "contextsubtype":20,
        "plcmttype":11,
        "plcmtcnt":1,
        "aurlsupport":1,
        "durlsupport":1,
        "assets":[
            {
                "id":123,
                "required":1,
                "title":{
                    "len":140
                }
            },
            {
                "id":128,
                "required":0,
                "img":{
                    "wmin":836,
                    "hmin":627,
                    "type":3
                }
            },
            {
                "id":124,
                "required":1,
                "img":{
                    "wmin":50,
                    "hmin":50,
                    "type":1
                }
            },
            {
                "id":126,
                "required":1,
                "data":{
                    "type":1,
                    "len":25
                }
            },
            {
                "id":127,
                "required":1,
                "data":{
                    "type":2,
                    "len":140
                }
            }
        ]
    }

Bid Response

"native": {
    "assetsurl": "http://www.myadserver.com/getad123nativejson.php",
    "link": {
        "url": "http: //i.am.a/URL"
        },
    "assets": \[
    {
    "id": 123,
    "required": 1,
    "title": {
        "text": "Learn about this awesome thing"
    }
    },
    {
    "id": 124,
    "required": 1,
    "img": {
        "url":"http://www.myads.com/thumbnail1.png"
    }
    },
    {
    "id": 128,
    "required": 1,
    "img": {
        "url":"http://www.myads.com/largethumb1.png"
    }
    },
    {
    "id": 126,
    "required": 1,
    "data": {
        "value": "My Brand"
    }
    },
    {
    "id": 127,
    "required": 1,
    "data": {
        "value": "Learn all about this awesome story of someone using my product."
            }
        }
    ]
}

What Should be Returned by the Assets URL

{
    "assets": [
    {
        "required": 1,
        "title": {
            "text": "Learn about this awesome thing",
            "len": 30
            }
    },
    {
        "link": {
            "url": "http://brand.com/landingpage/"
        },
    },
  2 {
        "img": {
            "type":1,
            "url":"<u>http://www.myads.com/icon.png</u>",
            "h":50,
            "w":50
        }
    },
    {
        "img": {
            "type":3,
            "url":"http://www.myads.com/largethumb11.png",
            "h":200,
            "w":200
        }
    },
    {
    "img": {
        "type":3,

What Should be Returned by the Assets URL

        "url":"http://www.myads.com/largethumb43.png",
        "h":200,
        "w":267
        }
    },
    {
    "img": {
        "type":3,
        "url":"http://www.myads.com/largethumb1911.png",
        "h":200,
        "w":382
        }
    },
    {
    "required": 1,
    "data": {
        "type":1,
        "len":8,
        "value": "My Brand"
        }
    },
    {
    "required": 1,
    "data": {
        "type":2,
        "len":63,
            "value": "Learn all about this awesome story of someone using my product."  
            }
        }
    ]
}

示例忠实于官方原文(含官方笔误与怪癖,逐组注记)。 PDF 转换残留的弯引号已归一化(126 处)。