{"_id":"56465ec2054d8f0d00bc76da","__v":36,"category":{"_id":"564dcf87d3320b0d0028ca10","version":"564621e10c30fb2100ba3817","__v":26,"pages":["564dcfb4d3320b0d0028ca11","564dd25da8671617004e7b71","564dd3a7e39c4435005a1f33","564ddbcbd3320b0d0028ca25","564ddcb2a8671617004e7b8e","564ddfffa8671617004e7b94","564de165a8671617004e7b97","564de17d9176e9170068007b","564de194e39c4435005a1f56","564de3d99176e9170068007e","564de439fe07a81700b5c3af","564ef3911e9a082b00344ea1","564f03dfedbade0d000efa57","564f0978234efc0d006e186e","564f0d9aaf8ae235002db90e","564f133e4f000617007bd68e","564f14d829338a1700beefcd","564f15619eb2701700532470","564f2fec6b10960d00865761","564f302b6b10960d00865764","564f33e219857f2b00387a44","564f35d110b21d3500ad29d3","564f42e41af2c835004bfbe9","564f456ab85ee335004cbdb3","5652e161b83d8e0d00d24b6b","56859949cfc7cf0d001cb3f5"],"project":"564621e00c30fb2100ba3814","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-11-19T13:32:55.176Z","from_sync":false,"order":6,"slug":"api-overview","title":"Ad Request API"},"project":"564621e00c30fb2100ba3814","user":"564621d275c83f0d00e9d52d","editedParams":true,"parentDoc":null,"version":{"_id":"564621e10c30fb2100ba3817","__v":15,"project":"564621e00c30fb2100ba3814","createdAt":"2015-11-13T17:46:09.275Z","releaseDate":"2015-11-13T17:46:09.275Z","categories":["564621e10c30fb2100ba3818","564624cf0c30fb2100ba3822","564628d69f3f550d00fa3db6","564dafeeda00e82b00ed601d","564daff8fc36dc3700882b95","564db0ccda00e82b00ed601f","564dcf87d3320b0d0028ca10","5661a6e436398e0d00f79566","568585153703ed1700e420b0","56858767d96a760d00545da6","56858d693703ed1700e420b2","56858d8d22c41b0d00e4666c","56859e9c009a8d0d00797130","5685a6453703ed1700e420d3","5a8bf8dbe86f530012159b73"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"editedParams2":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-13T22:05:54.557Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":true,"api":{"examples":{"codes":[{"name":"Complete Banner Request","code":"curl \"http://my.mobfox.com/request.php?rt=api&r_type=banner&i=69.197.148.18&s=fe96717d9875b9da4339ea5367eff1ec&adspace_width=320&adspace_height=50&adspace_strict=0&o_iosadvid=00000000-0000-0000-0000-000000000000&r_floor=0.2&longitude=12.12&latitude=280.12&demo_gender=male&demo_age=1982&demo_keywords=sports&u=Mozilla%2F5.0%20(iPhone%3B%20CPU%20iPhone%20OS%208_0%20like%20Mac%20OS%20X)%20AppleWebKit%2F600.1.3%20(KHTML%2C%20like%20Gecko)%20Version%2F8.0%20Mobile%2F12A4345d%20Safari%2F600.1.4&r_resp=xml\"\n\n# Replace the value of s= with your own inventory hash once you are ready for live ads","language":"curl"}]},"method":"get","results":{"codes":[{"name":"Banner (XML)","code":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<request type=\"textAd\">\n   <htmlString>\n      <![CDATA[<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"><title></title><style>body{margin:0;padding:0}#mobfoxCover{background:0 0;margin:0;padding:0;border:none;position:absolute;left:0;top:0;z-index:100}</style></head><body><div id=\"mobfoxCover\"></div><script type=\"text/javascript\">function checkRedirect(e){return function(){if(state===REDIRECT){state=REDUNDANT;var t=window.document.querySelector(\"iframe\").contentDocument.querySelector(\"html\").innerHTML.toLowerCase();if(!(t.indexOf(\"<script\")<0&&t.indexOf(\"<iframe\")<0)){var o=new XMLHttpRequest,d={creativeId:creativeId,advertiserId:advertiserId,hParam:hParam,dspId:dspId,networkId:networkId,autoPilotInventoryConfId:autoPilotInventoryConfId,stackItemId:stackItemId,adSpaceId:adSpaceId,cId:cId,adomain:adomain,geo:geo,event:e,ua:window.navigator.userAgent,adId:adId,site:window.location.href,md5Hash:md5Hash,snapshot:btoa(unescape(encodeURIComponent(t)))};o.open(\"POST\",\"http://my.mobfox.com/fraud-integration\",!1),o.setRequestHeader(\"Content-type\",\"application/json\"),o.send(JSON.stringify(d))}}}}function init(){window.onbeforeunload=checkRedirect(\"onbeforeunload\"),window.addEventListener(\"beforeunload\",checkRedirect(\"beforeunload\")),window.addEventListener(\"unload\",checkRedirect(\"unload\")),document.addEventListener(\"visibilitychange\",function(){\"hidden\"===document.visibilityState&&checkRedirect(\"visibilityState\")});var e=document.createElement(\"iframe\");document.body.appendChild(e),e.width=\"320\",e.height=\"50\";var t=document.querySelector(\"#mobfoxCover\");t.style.width=e.width+\"px\",t.style.height=e.height+\"px\",e.style.margin=\"0px\",e.style.padding=\"0px\",e.style.border=\"none\",e.scrolling=\"no\",e.style.overflow=\"hidden\",e.sandbox=\"allow-scripts allow-popups allow-popups-to-escape-sandbox allow-top-navigation allow-same-origin\";var o=atob(markupB64);setTimeout(function(){state=NORMAL},200),setTimeout(function(){var e=document.querySelector(\"#mobfoxCover\");document.body.removeChild(e)},200);var d=\"srcdoc\"in e,n=o;o.indexOf(\"<body>\")<0&&(n=\"<html><body style='margin:0'>\"+o+\"</body></html>\"),d?e.srcdoc=n:(e.contentWindow.document.open(),e.contentWindow.document.write(n),e.contentWindow.document.close())}var markupB64=\"PGEgaHJlZj0iaHR0cDovL2RvY3MubW9iZm94LmNvbS92MS4wL2RvY3MvdGVzdC1hZC1sYW5kaW5nLXBhZ2UiIHRhcmdldD0iX2JsYW5rIj48aW1nIHNyYz0iaHR0cHM6Ly9jcmVhdGl2ZWNkbi5tb2Jmb3guY29tL2U4ZTkxNWYzMmJhOTVkM2JmMzY4YTM5N2EyMzQ4NzVmLmdpZiIgYm9yZGVyPSIwIi8+PC9hPjxicj48c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+ZnVuY3Rpb24gbWZDbGlja1RyYWNrZXIoKXt0aGlzLmNsaWNrTWFjcm9OYW1lPSJNRl9DTElDS19VUkwiLHRoaXMuY2xpY2tVcmw9Imh0dHA6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1bmN0aW9uKGkpe2lmKHZvaWQgMCE9PWkmJmkpe3ZhciByPW5ldyBYTUxIdHRwUmVxdWVzdDtyLm9ucmVhZHlzdGF0ZWNoYW5nZT1mdW5jdGlvbigpe3IucmVhZHlTdGF0ZT09WE1MSHR0cFJlcXVlc3QuRE9ORSYmci5zdGF0dXN9LHIub3BlbigiR0VUIixpLCEwKSxyLnNlbmQoKX19fXZhciBtZkNsaWNrPW5ldyBtZkNsaWNrVHJhY2tlcjttZkNsaWNrLmluaXQoKTs8L3NjcmlwdD48aW1nIHN0eWxlPSJwb3NpdGlvbjphYnNvbHV0ZTsgbGVmdDogLTEwMDAwcHg7IiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBzcmM9Imh0dHA6Ly9udmlyZ2luaWEtY2FsbGJhY2tzLm1vYmZveC5jb20vZXhjaGFuZ2UucGl4ZWwucGhwP2g9NGI0NTJhNWRjMzllZjBkNDM4NzRlYTdhNzcxN2M3OTciLz4=\",INITIAL=0,REDIRECT=1,REDUNDANT=2,NORMAL=3,state=INITIAL,creativeId=\"\",advertiserId=\"\",hParam=\"4b452a5dc39ef0d43874ea7a7717c797\",dspId=\"\",networkId=\"\",autoPilotInventoryConfId=\"\",stackItemId=\"392746\",serverHost=\"184.172.209.50\",adSpaceId=\"\",adId=\"\",cId=\"\",adomain=\"\",geo=\"US\",md5Hash=\"f3bd183c0b19faf12c76e75461cb8cac\";document.addEventListener(\"DOMContentLoaded\",function(e){state=REDIRECT}),setTimeout(init,1)</script></body></html>]]></htmlString>\n   <clicktype>safari</clicktype>\n   <clickurl><![CDATA[http://nvirginia-callbacks.mobfox.com/exchange.click.php?h=4b452a5dc39ef0d43874ea7a7717c797]]></clickurl>\n   <urltype>link</urltype>\n   <refresh>30</refresh>\n   <scale>no</scale>\n   <skippreflight>yes</skippreflight>\n   <cpmPrice>50</cpmPrice>\n   \n   <!-- MORE META VALUES AVAILABLE - SEE BELOW -->\n   \n</request>","language":"xml","status":200},{"status":200,"name":"Banner (JSON)","language":"json","code":"{\n   \"request\":{\n      \"type\":\"textAd\",\n      \"htmlString\":\"<!DOCTYPE html><html lang=\\\"en\\\"><head><meta charset=\\\"UTF-8\\\"><title><\\/title><style>body{margin:0;padding:0}#mobfoxCover{background:0 0;margin:0;padding:0;border:none;position:absolute;left:0;top:0;z-index:100}<\\/style><\\/head><body><div id=\\\"mobfoxCover\\\"><\\/div><script type=\\\"text\\/javascript\\\">function checkRedirect(e){return function(){if(state===REDIRECT){state=REDUNDANT;var t=window.document.querySelector(\\\"iframe\\\").contentDocument.querySelector(\\\"html\\\").innerHTML.toLowerCase();if(!(t.indexOf(\\\"<script\\\")<0&&t.indexOf(\\\"<iframe\\\")<0)){var o=new XMLHttpRequest,d={creativeId:creativeId,advertiserId:advertiserId,hParam:hParam,dspId:dspId,networkId:networkId,autoPilotInventoryConfId:autoPilotInventoryConfId,stackItemId:stackItemId,adSpaceId:adSpaceId,cId:cId,adomain:adomain,geo:geo,event:e,ua:window.navigator.userAgent,adId:adId,site:window.location.href,md5Hash:md5Hash,snapshot:btoa(unescape(encodeURIComponent(t)))};o.open(\\\"POST\\\",\\\"http:\\/\\/my.mobfox.com\\/fraud-integration\\\",!1),o.setRequestHeader(\\\"Content-type\\\",\\\"application\\/json\\\"),o.send(JSON.stringify(d))}}}}function init(){window.onbeforeunload=checkRedirect(\\\"onbeforeunload\\\"),window.addEventListener(\\\"beforeunload\\\",checkRedirect(\\\"beforeunload\\\")),window.addEventListener(\\\"unload\\\",checkRedirect(\\\"unload\\\")),document.addEventListener(\\\"visibilitychange\\\",function(){\\\"hidden\\\"===document.visibilityState&&checkRedirect(\\\"visibilityState\\\")});var e=document.createElement(\\\"iframe\\\");document.body.appendChild(e),e.width=\\\"320\\\",e.height=\\\"50\\\";var t=document.querySelector(\\\"#mobfoxCover\\\");t.style.width=e.width+\\\"px\\\",t.style.height=e.height+\\\"px\\\",e.style.margin=\\\"0px\\\",e.style.padding=\\\"0px\\\",e.style.border=\\\"none\\\",e.scrolling=\\\"no\\\",e.style.overflow=\\\"hidden\\\",e.sandbox=\\\"allow-scripts allow-popups allow-popups-to-escape-sandbox allow-top-navigation allow-same-origin\\\";var o=atob(markupB64);setTimeout(function(){state=NORMAL},200),setTimeout(function(){var e=document.querySelector(\\\"#mobfoxCover\\\");document.body.removeChild(e)},200);var d=\\\"srcdoc\\\"in e,n=o;o.indexOf(\\\"<body>\\\")<0&&(n=\\\"<html><body style='margin:0'>\\\"+o+\\\"<\\/body><\\/html>\\\"),d?e.srcdoc=n:(e.contentWindow.document.open(),e.contentWindow.document.write(n),e.contentWindow.document.close())}var markupB64=\\\"PGEgaHJlZj0iaHR0cDovL2RvY3MubW9iZm94LmNvbS92MS4wL2RvY3MvdGVzdC1hZC1sYW5kaW5nLXBhZ2UiIHRhcmdldD0iX2JsYW5rIj48aW1nIHNyYz0iaHR0cHM6Ly9jcmVhdGl2ZWNkbi5tb2Jmb3guY29tL2U4ZTkxNWYzMmJhOTVkM2JmMzY4YTM5N2EyMzQ4NzVmLmdpZiIgYm9yZGVyPSIwIi8+PC9hPjxicj48c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+ZnVuY3Rpb24gbWZDbGlja1RyYWNrZXIoKXt0aGlzLmNsaWNrTWFjcm9OYW1lPSJNRl9DTElDS19VUkwiLHRoaXMuY2xpY2tVcmw9Imh0dHA6Ly9udmlyZ2luaWEtY2FsbGJhY2tzLm1vYmZveC5jb20vZXhjaGFuZ2UuY2xpY2sucGhwP2g9ODVmZGIyNGJkNTQ5NzU3ZjY4Mzk0NWNhZjVkYjRlNWMiLHRoaXMuaW5pdD1mdW5jdGlvbigpe3ZhciBpPXRoaXM7aWYoIWkuY2xpY2tVcmx8fGkuY2xpY2tVcmwuaW5kZXhPZihpLmNsaWNrTWFjcm9OYW1lKT49MClyZXR1cm4hMTsidW5kZWZpbmVkIiE9dHlwZW9mIG1yYWlkPyJsb2FkaW5nIj09PW1yYWlkLmdldFN0YXRlKCk\\/bXJhaWQ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ZTsgbGVmdDogLTEwMDAwcHg7IiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBzcmM9Imh0dHA6Ly9udmlyZ2luaWEtY2FsbGJhY2tzLm1vYmZveC5jb20vZXhjaGFuZ2UucGl4ZWwucGhwP2g9ODVmZGIyNGJkNTQ5NzU3ZjY4Mzk0NWNhZjVkYjRlNWMiLz4=\\\",INITIAL=0,REDIRECT=1,REDUNDANT=2,NORMAL=3,state=INITIAL,creativeId=\\\"\\\",advertiserId=\\\"\\\",hParam=\\\"85fdb24bd549757f683945caf5db4e5c\\\",dspId=\\\"\\\",networkId=\\\"\\\",autoPilotInventoryConfId=\\\"\\\",stackItemId=\\\"392746\\\",serverHost=\\\"184.172.209.50\\\",adSpaceId=\\\"\\\",adId=\\\"\\\",cId=\\\"\\\",adomain=\\\"\\\",geo=\\\"US\\\",md5Hash=\\\"f3bd183c0b19faf12c76e75461cb8cac\\\";document.addEventListener(\\\"DOMContentLoaded\\\",function(e){state=REDIRECT}),setTimeout(init,1)<\\/script><\\/body><\\/html>\",\n      \"clicktype\":\"safari\",\n      \"clickurl\":\"http://nvirginia-callbacks.mobfox.com/exchange.click.php?h=85fdb24bd549757f683945caf5db4e5c\",\n      \"urltype\":\"link\",\n      \"refresh\":\"30\",\n      \"scale\":\"no\",\n      \"skippreflight\":\"yes\",\n      \"cpmPrice\":50\n      \n      <!-- MORE META VALUES AVAILABLE - SEE BELOW -->\n      \n   }\n}"},{"name":"Error (XML)","status":200,"language":"xml","code":"<error>Invalid inventory hash supplied. (argument \"s\")</error>\n\n<!-- We respond with 200 OK and add an error xml element to our response if something went wrong -->"},{"name":"Error (JSON)","status":200,"language":"json","code":"{\n  \"error\": \"Invalid inventory hash supplied. (argument \\\"s\\\")\"\n}\n\n// We respond with 200 OK and add an error xml element to our response if something went wrong"},{"status":200,"name":"No Ad (XML)","language":"xml","code":"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<request type=\"noAd\"></request>"},{"status":200,"name":"No Ad (JSON)","language":"json","code":"{\n    \"error\": \"No Ad Available\"\n}"}]},"settings":"","auth":"required","params":[{"_id":"56473ab856fb450d0041012d","ref":"","in":"query","required":true,"desc":"Requester type. Our SDKs will populate this parameter with their SDK version numbers.","default":"api","type":"string","name":"rt"},{"_id":"56473ab856fb450d0041012c","ref":"","in":"query","required":true,"desc":"Requested ad type. Allowed values: banner, video, native","default":"banner","type":"string","name":"r_type"},{"_id":"56473f2c054d8f0d00bc776f","ref":"","in":"query","required":true,"desc":"The hash of your inventory to identify which app is making the request.","default":"fe96717d9875b9da4339ea5367eff1ec","type":"string","name":"s"},{"_id":"56473ee7c7687d0d00739fa0","ref":"","in":"query","required":true,"desc":"Set IP address of the device making the request. API will first check for the X-Forwarded-For header before it falls back to this parameter.","default":"69.197.148.18","type":"string","name":"i"},{"_id":"56473f2c054d8f0d00bc776e","ref":"","in":"query","required":true,"desc":"Url encoded user agent string.","default":"","type":"string","name":"u"},{"_id":"5647729ac7687d0d00739fb9","ref":"","in":"query","required":false,"desc":"Width of your ad space.","default":"320","type":"int","name":"adspace_width"},{"_id":"5647729ac7687d0d00739fb8","ref":"","in":"query","required":false,"desc":"Height of your ad space.","default":"50","type":"int","name":"adspace_height"},{"_id":"5647729ac7687d0d00739fb7","ref":"","in":"query","required":false,"desc":"If this parameter is set to 1 and an adspace_height and adspace_width is provided, the ad server will only serve ads of these exact dimensions and will not serve any smaller-sized ads.","default":"0","type":"int","name":"adspace_strict"},{"_id":"585c00350da2ee0f00108bbd","ref":"","in":"query","required":false,"desc":"Define, which response format to receive, **xml** or **json**. The default is **xml** for legacy reasons.","default":"xml","type":"string","name":"r_resp"}],"url":"/request.php?rt=api&r_type=banner"},"isReference":false,"order":4,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Additional ad metadata is available\",\n  \"body\": \"If you are interested in the **CPM value, demand partner id, creative id, campaign id, etc.** of your ad, please visit this page to see which one are available: [Response Format](doc:response-format)\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Augment your ad request with global ad request parameters\",\n  \"body\": \"We recommend passing these parameters on all of your ad requests to get the best eCPM:\\n* o_andadvid\\n* o_iosadvid\\n* latitude\\n* longitude\\n* r_floor\\n* demo_age\\n* demo_gender\\n* c_mraid\\n* adspace_width/adspace_height\\n\\nThese params are documented on our [Global Request Parameters](doc:global-request-parameters) page.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Typical Regular Banner Sizes\",\n  \"body\": \"Most used ad sizes are:\\n* 300x50 (for phones)\\n* 320x50 (for phones)\\n* 300x250 (for  phones) also called \\\"Medium Rectangle\\\"\\n* 728x90 (for tablets)\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Mozilla%2F5.0%20(iPhone%3B%20CPU%20iPhone%20OS%208_0%20like%20Mac%20OS%20X)%20AppleWebKit%2F600.1.3%20(KHTML%2C%20like%20Gecko)%20Version%2F8.0%20Mobile%2F12A4345d%20Safari%2F600.1.4\",\n      \"language\": \"text\",\n      \"name\": \"User Agent for testing\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"banners","type":"endpoint","title":"Request  Regular Banners"}

getRequest Regular Banners


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

rt:
required
stringapi
Requester type. Our SDKs will populate this parameter with their SDK version numbers.
r_type:
required
stringbanner
Requested ad type. Allowed values: banner, video, native
s:
required
stringfe96717d9875b9da4339ea5367eff1ec
The hash of your inventory to identify which app is making the request.
i:
required
string69.197.148.18
Set IP address of the device making the request. API will first check for the X-Forwarded-For header before it falls back to this parameter.
u:
required
string
Url encoded user agent string.
adspace_width:
integer320
Width of your ad space.
adspace_height:
integer50
Height of your ad space.
adspace_strict:
integer0
If this parameter is set to 1 and an adspace_height and adspace_width is provided, the ad server will only serve ads of these exact dimensions and will not serve any smaller-sized ads.
r_resp:
stringxml
Define, which response format to receive, **xml** or **json**. The default is **xml** for legacy reasons.

Examples


Result Format


Documentation

[block:callout] { "type": "success", "title": "Additional ad metadata is available", "body": "If you are interested in the **CPM value, demand partner id, creative id, campaign id, etc.** of your ad, please visit this page to see which one are available: [Response Format](doc:response-format)" } [/block] [block:callout] { "type": "info", "title": "Augment your ad request with global ad request parameters", "body": "We recommend passing these parameters on all of your ad requests to get the best eCPM:\n* o_andadvid\n* o_iosadvid\n* latitude\n* longitude\n* r_floor\n* demo_age\n* demo_gender\n* c_mraid\n* adspace_width/adspace_height\n\nThese params are documented on our [Global Request Parameters](doc:global-request-parameters) page." } [/block] [block:callout] { "type": "info", "title": "Typical Regular Banner Sizes", "body": "Most used ad sizes are:\n* 300x50 (for phones)\n* 320x50 (for phones)\n* 300x250 (for phones) also called \"Medium Rectangle\"\n* 728x90 (for tablets)" } [/block] [block:code] { "codes": [ { "code": "Mozilla%2F5.0%20(iPhone%3B%20CPU%20iPhone%20OS%208_0%20like%20Mac%20OS%20X)%20AppleWebKit%2F600.1.3%20(KHTML%2C%20like%20Gecko)%20Version%2F8.0%20Mobile%2F12A4345d%20Safari%2F600.1.4", "language": "text", "name": "User Agent for testing" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}