Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Alexa/Amazon API (https://www.warriorforum.com/programming/1079699-alexa-amazon-api.html)

rodneybrooksjr 2nd June 2015 02:23 AM

Alexa/Amazon API
 
I would like to be able to get the Alexa rank from specific sites and sort them by the most popular. What coding language do I need to learn to be able to do this?

emptee 2nd June 2015 03:29 AM

Re: Alexa/Amazon API
 
Quote:

Originally Posted by rodneybrooksjr (Post 10092589)
I would like to be able to get the Alexa rank from specific sites and sort them by the most popular. What coding language do I need to learn to be able to do this?

Anything really...

freddyDev 2nd June 2015 05:31 AM

Re: Alexa/Amazon API
 
You should first know how to,

1) Make API request (requesting to fetch the alexa ranking for a page)
2) Parse the results returned by the server (the results will be in xml or REST format. You should know how to parse it)

You can learn how to work with api's from Learn | Codecademy

Once you are comfortable with at least one or two api then try applying the same knowledge to Alexa API

rodneybrooksjr 2nd June 2015 11:36 AM

Re: Alexa/Amazon API
 
Quote:

Originally Posted by emptee (Post 10092689)
Anything really...

I know HTML and a little bit of PHP. When I was in school, I even created a web browser in VB but I still haven’t found somebody teaching what I am trying to do. Maybe I am saying it wrong.

rodneybrooksjr 2nd June 2015 11:43 AM

Re: Alexa/Amazon API
 
Quote:

Originally Posted by freddyDev (Post 10092881)
You should first know how to,

1) Make API request (requesting to fetch the alexa ranking for a page)
2) Parse the results returned by the server (the results will be in xml or REST format. You should know how to parse it)

You can learn how to work with api's from Learn | Codecademy

Once you are comfortable with at least one or two api then try applying the same knowledge to Alexa API

Thanks for the link! So, do you know how to do what I am trying to do? I think it is going to be awhile. I never heard of REST but using that website, I can learn!

emptee 2nd June 2015 03:40 PM

Re: Alexa/Amazon API
 
Quote:

Originally Posted by rodneybrooksjr (Post 10093423)
I know HTML and a little bit of PHP. When I was in school, I even created a web browser in VB but I still haven’t found somebody teaching what I am trying to do. Maybe I am saying it wrong.

Gotcha - either VB or PHP should do the trick nicely..

Make a request that looks something like this:

http://xml.alexa.com/data?cli=10&dat...rriorforum.com

You'll get back an XML document looking something like this:


<?xml version="1.0" encoding="UTF-8"?>

<ALEXA VER="0.9" URL="warriorforum.com/" HOME="0" AID="=" IDN="warriorforum.com/">
<RLS PREFIX="http://" more="0">
<RL HREF="digitalpoint.com/" TITLE="Digital Point Solutions"/>
<RL HREF="warriorpro.com/" TITLE="Warriorpro"/>
<RL HREF="squidoo.com/" TITLE="Squidoo"/>
<RL HREF="iranjava.net/" TITLE="Iranjava.net"/>
<RL HREF="getresponse.com/" TITLE="GetResponse Email Marketing"/>
<RL HREF="ezinearticles.com/" TITLE="EzineArticles.com"/>
<RL HREF="clickbank.com/" TITLE="Digital Products Retailer: Affiliate Program &amp; Sell Online - ClickBank"/>
<RL HREF="aweber.com/" TITLE="AWeber Systems"/>
<RL HREF="angelasdiscountmarket.com/" TITLE="Angelas Discount Market"/>
<RL HREF="www.webpronews.com/" TITLE="WebProNews"/>
</RLS>
<SD TITLE="A" FLAGS="" HOST="warriorforum.com">
<TITLE TEXT="The Warrior Forum"/>
<OWNER NAME="Internet Warriors"/>
</SD>
<SD>
<POPULARITY URL="warriorforum.com/" TEXT="1047" SOURCE="panel"/>
<REACH RANK="1095"/>
<RANK DELTA="+200"/>
<COUNTRY CODE="IN" NAME="India" RANK="520"/>
</SD>
</ALEXA>

Then just parse out the rank (1047 in this case).

If you're using VB.NET, webrequest can make the request, XMLDocument can be used to parse.. for PHP, you can use CURL or simply file_get_contents to get the XML, parsing.. I don't know, I haven't parsed XML in PHP (I'm a JSON kinda guy..). A quick google for php + parse XML should give you the info you need :)

Cheers,
Michael

rodneybrooksjr 4th June 2015 05:41 AM

Re: Alexa/Amazon API
 
Quote:

Originally Posted by emptee (Post 10093789)
Gotcha - either VB or PHP should do the trick nicely..

Make a request that looks something like this:

http://xml.alexa.com/data?cli=10&dat...rriorforum.com

You'll get back an XML document looking something like this:


<?xml version="1.0" encoding="UTF-8"?>

<ALEXA VER="0.9" URL="warriorforum.com/" HOME="0" AID="=" IDN="warriorforum.com/">
<RLS PREFIX="http://" more="0">
<RL HREF="digitalpoint.com/" TITLE="Digital Point Solutions"/>
<RL HREF="warriorpro.com/" TITLE="Warriorpro"/>
<RL HREF="squidoo.com/" TITLE="Squidoo"/>
<RL HREF="iranjava.net/" TITLE="Iranjava.net"/>
<RL HREF="getresponse.com/" TITLE="GetResponse Email Marketing"/>
<RL HREF="ezinearticles.com/" TITLE="EzineArticles.com"/>
<RL HREF="clickbank.com/" TITLE="Digital Products Retailer: Affiliate Program &amp; Sell Online - ClickBank"/>
<RL HREF="aweber.com/" TITLE="AWeber Systems"/>
<RL HREF="angelasdiscountmarket.com/" TITLE="Angelas Discount Market"/>
<RL HREF="www.webpronews.com/" TITLE="WebProNews"/>
</RLS>
<SD TITLE="A" FLAGS="" HOST="warriorforum.com">
<TITLE TEXT="The Warrior Forum"/>
<OWNER NAME="Internet Warriors"/>
</SD>
<SD>
<POPULARITY URL="warriorforum.com/" TEXT="1047" SOURCE="panel"/>
<REACH RANK="1095"/>
<RANK DELTA="+200"/>
<COUNTRY CODE="IN" NAME="India" RANK="520"/>
</SD>
</ALEXA>

Then just parse out the rank (1047 in this case).

If you're using VB.NET, webrequest can make the request, XMLDocument can be used to parse.. for PHP, you can use CURL or simply file_get_contents to get the XML, parsing.. I don't know, I haven't parsed XML in PHP (I'm a JSON kinda guy..). A quick google for php + parse XML should give you the info you need :)

Cheers,
Michael

:) Thanks, Michael, by you posting that code, I got a better picture! So far, I know I need a database, Alexa data that updates and a way to sort it by the lowest number but I don’t think I am asking the right questions so here is a link that better explains.

http://rodneybrooksjr.com/opportunities/list/

As you can see the height on Alexa’s widget is taller than the banner. I just want the actual number. You showed me with the link but don’t you have to sign up with AWS, I did and I clicked on RDS. I don’t know if that is the right one, could you please tell me the steps I need to take to accomplish what I am trying to do.


All times are GMT -6. The time now is 12:01 PM.