• Using Compete.com API in your Website

    Posted on March 9th, 2009 Artur Sonnenhohl 3 comments

    Compete.com is a company that provides web analytics, visitors, keywords driving traffic and more. Some of the results that compete.com offers are just for paying users other no.

    In this post i will show you how can you use the api from Compete.com in your website, like i did in my http://whois.gwebtools.com/compete.com.

    1 step: Register for a developer user account.

    Register Compete Screen

    Register Compete Screen

    2 step: Register your application to get your personal API key.

    Register App

    Register App

    3 step: Start coding using your API key.

    Sample Call

    http://api.compete.com/fast-cgi/MI?d=google.com&ver=3&apikey=1234567890&size=large

    Sample Result

    <ci>
    <dmn>
    <nm>google.com</nm>
    <trust caption=”Trust”>
    <val>green</val>
    <link>http://toolbar.compete.com/trustgreen/google.com</link>
    <icon>http://home.compete.com.edgesuite.net/site_media/images/icons/trust_green_53.gif</icon>
    </trust>
    <rank caption=”Profile”>
    <val>2</val>
    <link>http://toolbar.compete.com/siteprofile/google.com</link>
    <icon>http://home.compete.com.edgesuite.net/site_media/images/icons/profile_3_53.gif</icon>
    </rank>
    <metrics caption=”Profile”>
    <val>
    <mth>12</mth>
    <yr>2006</yr>
    <uv>
    <ranking>2</ranking>
    <count>115,120,111</count>
    </uv>
    </val>
    <link>http://toolbar.compete.com/siteprofile/google.com</link>
    <icon>http://home.compete.com.edgesuite.net/site_media/images/icons/profile_3_53.gif</icon>
    </metrics>
    <deals caption=”Deals”>
    <val>1</val>
    <link>http://toolbar.compete.com/deals/google.com</link>
    <icon>http://home.compete.com.edgesuite.net/site_media/images/icons/deals_on_53.gif</icon>
    </deals>
    </dmn>
    </ci>

    How to parse it?

    You can develop your on xml parser, but if you use PHP or .NET it is really not necessary you can use the scripts that Compete.com provides to you.

    .NET wrapper

    PHP5 wrapper

    PHP5 wrapper in the PEAR repository

    More info access developer zone from Compete.com

     

    3 responses to “Using Compete.com API in your Website”

    1. Whoa… this site is pretty awesome :) your layout is really well designed, and your blogs are (judging from what i’ve read) very interesting. heehee… consider yourself favorited. :-P

    2. Wow this was probably one of the best blurbs I’ve had the chance to read on the topic so far. I don’t understand where you learn all your info but up! I’m gunna send a few folks to this site to check this out. Amazing, simply awesome. I am just getting into crafting articles myself, nothing close to your writing potential (lol) but I’d love for you to check out my stuff sometime! bowfelx series 7 treadmill

    3. Thank you so much for this article, This is just what I needed this morning.

    Leave a reply