Help Center > Manage Your Account > AdSpeed API

Ad

Documentation for API methods to manage one or multiple ads.

API Version

1.2.7 (build 20110606). Documentation was last modified on Sun, 29 Jan 12 20:25:56 -0500. Since the API methods and response format can change from one version to another, you should check this page frequently for updates.

API Methods - Ad

AS.Ads.getCounts

Returns the number of active, pending, deleted and total ads for the publisher
Parameters
  • None
Sample Request
Sample Response
<Ads total="8" active="3" pending="3" archived="0" deleted="2"/>

AS.Ads.getList

Returns the list of ads for this publisher
Parameters
  • perpage (Optional, default value is 10)
    The number of items per page
  • page (Optional, default value is 1)
    The page number
Sample Request
Sample Response
<Ads total="8" page="1" numpage="2" perpage="4">
  <Ad id="35093" name="Sample Text Ad" status="active"/>
  <Ad id="36943" name="Sample Image Ad" status="active"/>
  <Ad id="40631" name="Sample Rich HTML Ad" status="pending"/>
  <Ad id="54412" name="Sample Text Link Ad" status="pending"/>
</Ads>

AS.Ads.createStandard

Create a new standard/external ad (SWF, JPG, GIF, PNG, BMP) for this account. Limit 50 calls/day and use POST
Parameters
  • name (Required)
    The name of this ad
  • clickurl (Required)
    The destination URL to redirect when someone clicks on this ad (start with http://, must be URL-encoded properly)
  • imageurl (Required)
    The URL of an external JPG/GIF/BMP/SWF file (start with http://, must be URL-encoded properly)
Sample Request
Sample Response
<Ad id="123" name="SampleSWFAd" status="active"></Ad>

AS.Ads.createHTML

Create a new Rich-Media/HTML ad for this account. Limit 50 calls/day and use POST
Parameters
  • name (Required)
    The name of this ad
  • html (Required)
    The HTML ad code
  • width (Required)
    The ad width in pixels
  • height (Required)
    The ad height in pixels
Sample Request
Sample Response
<Ad id="456" name="SampleHTMLAd" status="active"></Ad>

AS.Ads.createText

Create a new text link ad for this account. Limit 50 calls/day and use POST
Parameters
  • name (Required)
    The name of this ad
  • first (Required)
    The first text line
  • next (Required)
    The next text line(s)
  • clickurl (Required)
    The destination URL to redirect when someone clicks on this ad (start with http://, must be URL-encoded properly)
Sample Request
Sample Response
<Ad id="456" name="SampleTextLinkAd" status="active"></Ad>

AS.Ad.linkToZone

Links this ad to the specified zone
Parameters
  • ad (Required)
    The ad identification
  • zone (Required)
    The zone identification
  • token (Required)
    The authentication MD5 hash generated from concatenating [Ad ID][Ad Name][Zone ID][Zone Name]
Sample Request
Sample Response
<Confirmation ad="36943" zone="7607">LINKED</Confirmation>

AS.Ad.unlinkFromZone

Unlinks this ad from the specified zone
Parameters
  • ad (Required)
    The ad identification
  • zone (Required)
    The zone identification
  • token (Required)
    The authentication MD5 hash generated from concatenating [Ad ID][Ad Name][Zone ID][Zone Name]
Sample Request
Sample Response
<Confirmation ad="36943" zone="7607">UNLINKED</Confirmation>

AS.Ad.getServingCode

Returns the serving code for this ad
Parameters
  • ad (Required)
    The ad identification
  • token (Required)
    The authentication MD5 hash generated from concatenating [Ad ID][Ad Name]
  • width (Required)
    The ad width in pixels
  • height (Required)
    The ad height in pixels
Sample Request
Sample Response
<Ad id="36943" name="Sample Image Ad" status="active">
  <ServingCode type="regular">
<!-- AdSpeed.com  Serving Code 7.9.5 for [Ad] Sample Image Ad 468x60 -->
    <script type="text/javascript"><![CDATA[
	var a=new Date();d=document;n=navigator;s=screen;var q='&amp;tz='+a.getTimezoneOffset()/60 +'&amp;ck='+(n.cookieEnabled?'Y':'N') +'&amp;jv='+(n.javaEnabled()?'Y':'N') +'&amp;scr='+s.width+'x'+s.height+'x'+s.colorDepth +'&amp;z='+Math.random() +'&amp;ref='+escape(d.referrer.substr(0,255)) +'&amp;uri='+escape(d.URL.substr(0,255));document.write('<ifr'+'ame width="468" height="60" src="http://g.adspeed.net/ad.php?do=html&amp;aid=36943&amp;wd=468&amp;ht=60&amp;target=_top'+q+'" frameborder="0" scrolling="no" allowtransparency="true" hspace="0" vspace="0"></ifr'+'ame>');
	]]></script>
    <noscript>
      <iframe width="468" height="60" src="http://g.adspeed.net/ad.php?do=html&amp;aid=36943&amp;wd=468&amp;ht=60&amp;target=_top" frameborder="0" scrolling="no" allowtransparency="true" hspace="0" vspace="0">
        <a href="http://g.adspeed.net/ad.php?do=clk&amp;aid=36943&amp;wd=468&amp;ht=60&amp;pair=as" target="_top">
          <img style="border:0px;" src="http://g.adspeed.net/ad.php?do=img&amp;aid=36943&amp;wd=468&amp;ht=60&amp;pair=as" width="468" height="60"/>
        </a>
      </iframe>
    </noscript>
<!-- AdSpeed.com End -->
  </ServingCode>
</Ad>

AS.Ad.getLinkedZones

Returns the list of zones linked to this ad
Parameters
  • ad (Required)
    The ad identification
  • token (Required)
    The authentication MD5 hash generated from concatenating [Ad ID][Ad Name]
  • perpage (Optional, default value is 10)
    The number of items per page
  • page (Optional, default value is 1)
    The page number
Sample Request
Sample Response
<Ad id="36943" name="Sample Image Ad" status="active">
  <Zones total="1" page="1" numpage="1" perpage="4">
    <Zone id="7549" name="Section Travel" status="active"/>
  </Zones>
</Ad>

AS.Ad.getServingCodeForLinkedZones

Returns the list of zones linked to this ad and their serving codes
Parameters
  • ad (Required)
    The ad identification
  • token (Required)
    The authentication MD5 hash generated from concatenating [Ad ID][Ad Name]
  • perpage (Optional, default value is 10)
    The number of items per page
  • page (Optional, default value is 1)
    The page number
Sample Request
Sample Response
<Ad id="36943" name="Sample Image Ad" status="active">
  <Zones total="1" page="1" numpage="1" perpage="2">
    <Zone id="7549" name="Section Travel" status="active">
      <ServingCode type="regular">
<!-- AdSpeed.com  Serving Code 7.9.5 for [Zone] Section Travel 468x60 -->
        <script type="text/javascript"><![CDATA[
	var a=new Date();d=document;n=navigator;s=screen;var q='&amp;tz='+a.getTimezoneOffset()/60 +'&amp;ck='+(n.cookieEnabled?'Y':'N') +'&amp;jv='+(n.javaEnabled()?'Y':'N') +'&amp;scr='+s.width+'x'+s.height+'x'+s.colorDepth +'&amp;z='+Math.random() +'&amp;ref='+escape(d.referrer.substr(0,255)) +'&amp;uri='+escape(d.URL.substr(0,255));document.write('<ifr'+'ame width="468" height="60" src="http://g.adspeed.net/ad.php?do=html&amp;zid=7549&amp;wd=468&amp;ht=60&amp;target=_top'+q+'" frameborder="0" scrolling="no" allowtransparency="true" hspace="0" vspace="0"></ifr'+'ame>');
	]]></script>
        <noscript>
          <iframe width="468" height="60" src="http://g.adspeed.net/ad.php?do=html&amp;zid=7549&amp;wd=468&amp;ht=60&amp;target=_top" frameborder="0" scrolling="no" allowtransparency="true" hspace="0" vspace="0">
            <a href="http://g.adspeed.net/ad.php?do=clk&amp;zid=7549&amp;wd=468&amp;ht=60&amp;pair=as" target="_top">
              <img style="border:0px;" src="http://g.adspeed.net/ad.php?do=img&amp;zid=7549&amp;wd=468&amp;ht=60&amp;pair=as" alt="i" width="468" height="60"/>
            </a>
          </iframe>
        </noscript>
<!-- AdSpeed.com End -->
      </ServingCode>
    </Zone>
  </Zones>
</Ad>

AS.Ad.getStats

Returns the stats for this ad. Limit 50 calls/day
Parameters
  • ad (Required)
    The ad identification
  • token (Required)
    The authentication MD5 hash generated from concatenating [Ad ID][Ad Name]
  • metric (Required)
    The type of metric can be "impressions", "clicks" or "revenue"
  • period (Required)
    The breakdown period can be "hourly", "daily", or "monthly"
Sample Request
Sample Response
<StatRows generated="Sun, 29 Jan 12 20:25:57 -0500" title="Report: Monthly  for [Ad] Sample Image Ad">
  <StatRow>
    <Monthly>January 2012</Monthly>
    <Unique_Impression>1,546</Unique_Impression>
    <Gross_Impression>3,185</Gross_Impression>
    <Unique_over_Gross_Impression>48.54%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>December 2011</Monthly>
    <Unique_Impression>1,770</Unique_Impression>
    <Gross_Impression>3,522</Gross_Impression>
    <Unique_over_Gross_Impression>50.26%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>November 2011</Monthly>
    <Unique_Impression>1,585</Unique_Impression>
    <Gross_Impression>3,274</Gross_Impression>
    <Unique_over_Gross_Impression>48.41%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>October 2011</Monthly>
    <Unique_Impression>1,615</Unique_Impression>
    <Gross_Impression>3,222</Gross_Impression>
    <Unique_over_Gross_Impression>50.12%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>September 2011</Monthly>
    <Unique_Impression>1,755</Unique_Impression>
    <Gross_Impression>3,382</Gross_Impression>
    <Unique_over_Gross_Impression>51.89%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>August 2011</Monthly>
    <Unique_Impression>1,747</Unique_Impression>
    <Gross_Impression>3,468</Gross_Impression>
    <Unique_over_Gross_Impression>50.37%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>July 2011</Monthly>
    <Unique_Impression>1,661</Unique_Impression>
    <Gross_Impression>3,358</Gross_Impression>
    <Unique_over_Gross_Impression>49.46%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>June 2011</Monthly>
    <Unique_Impression>1,597</Unique_Impression>
    <Gross_Impression>3,238</Gross_Impression>
    <Unique_over_Gross_Impression>49.32%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>May 2011</Monthly>
    <Unique_Impression>1,797</Unique_Impression>
    <Gross_Impression>3,482</Gross_Impression>
    <Unique_over_Gross_Impression>51.61%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>April 2011</Monthly>
    <Unique_Impression>1,720</Unique_Impression>
    <Gross_Impression>3,439</Gross_Impression>
    <Unique_over_Gross_Impression>50.01%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>March 2011</Monthly>
    <Unique_Impression>1,705</Unique_Impression>
    <Gross_Impression>3,350</Gross_Impression>
    <Unique_over_Gross_Impression>50.90%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>February 2011</Monthly>
    <Unique_Impression>1,522</Unique_Impression>
    <Gross_Impression>3,008</Gross_Impression>
    <Unique_over_Gross_Impression>50.60%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>Total</Monthly>
    <Unique_Impression>20,020</Unique_Impression>
    <Gross_Impression>39,928</Gross_Impression>
    <Unique_over_Gross_Impression>50.14%</Unique_over_Gross_Impression>
  </StatRow>
  <StatRow>
    <Monthly>Average</Monthly>
    <Unique_Impression>1,668</Unique_Impression>
    <Gross_Impression>3,327</Gross_Impression>
    <Unique_over_Gross_Impression>50.14%</Unique_over_Gross_Impression>
  </StatRow>
</StatRows>

Other Articles in AdSpeed API

Documentation about building applications with AdSpeed API
Search Help Center
There was a problem with your submission. Please correct the following items:

    Cannot find an answer for your question? Ask our Customer Care team

    Related Articles

    • Website i
      "Documentation for API methods to manage one or multiple websites. API Version1.2.7 (build 20110606). Documentation was last modified on Sun, ..."
    • Zone i
      "Documentation for API methods to manage one or multiple zones. API Version1.2.7 (build 20110606). Documentation was last modified on Sun, ..."
    • Publisher i
      "Documentation for API methods to manage a publisher account. API Version1.2.7 (build 20110606). Documentation was last modified on Sun, 29 ..."
    • Advertiser i
      "Documentation for API methods to manage one or multiple advertisers. API Version1.2.7 (build 20110606). Documentation was last modified on Sun, ..."

    Have questions? Contact Us

    Testimonials for our Ad Servers

    • I am extremely pleased with AdSpeed. Their technology has made our business shine with improved profits, mostly due to their unique ad server and amazing support. There is no other company I would even consider to compare to AdSpeed.

      Markus S.
      CEO, Dream Ware Enterprise

    • That was fast and works exactly right! Thanks again for your superb support!

      Dr Tom Bailey
      Aquarium Fish