Skip to main content

Powershell: How to get alexa rank for a specific domain

Get alexa rank for practicehabits.net with powershell
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>

Popular posts from this blog

IIS: Delete cached files on server running IIS

Delete cached files on server running IIS When changing css, javascript files, check to delete if IIS still caches old files in the default folder C:\inetpub\temp\IIS Temporary Compressed Files\<sitename>\$^_gzip_D^\ Apply to: IIS 8.5

Linux command: du - disk usage

Where have all my storage gone? du summarize disk usage of the set of FILEs, recursively for directories.

ManageEngine ServiceDesk Plus - Reset password

Let's reset the default administrator's password to 'admin'