Get alexa rank for practicehabits.net with powershell |
http://data.alexa.com/data?cli=10&url=practicehabits.net
# Description: Get alexa rank for a specific $domain
# Created by: Tuyen Dang
# Created on: 20160319
# Last modified by:
# Last modified on:
# History:
$domain = "practicehabits.net"
$LogDir = "C:\Temp\"
$url = "http://data.alexa.com/data?cli=10&url=" + $domain
# $start_time = Get-Date
$TodayLong = $todaylong = get-date -Format yyyyMMddHHmmss
$output = $LogDir + "alexa-" + $domain + "-" + $TodayLong + ".xml"
Invoke-WebRequest -Uri $url -OutFile $output
# Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"
# End of script
Result
<?xml version="1.0" encoding="UTF-8"?>
<!-- Need more Alexa data? Find our APIs here: https://aws.amazon.com/alexa/ -->
<ALEXA VER="0.9" URL="practicehabits.net/" HOME="0" AID="=" IDN="practicehabits.net/">
<SD>
<POPULARITY URL="practicehabits.net/" TEXT="910023" SOURCE="panel"/>
<REACH RANK="1218397"/>
<RANK DELTA="-6994944"/>
<COUNTRY CODE="VN" NAME="Vietnam" RANK="13934"/>
</SD>
</ALEXA>