Use Alexa as a data source

Resources

Data Source Type REST/URL
Authentication: Signed Authentication
Amazon Web Services (AWS) Access Key ID and Secret Access Key
API Documentation: AWS Alexa API Documentation
Klip Gallery: Save time and add pre-built Klips with the Klip Gallery!

Klip Gallery: Alexa

Step-by-Step

Create a new data source using Alexa

To create a data source using Alexa, you need to accomplish the following tasks:

  • Start the data source creation process.
  • Find your AWS Access Key ID and Secret Access Key.
  • Write your query and enter it into Klipfolio.

Note: This guide assumes that you already have an active Alexa account.

Step 1: Start the data source creation process

To create a data source using Alexa, go to the Connector Gallery page in Klipfolio and select Alexa.

Step 2: Find your AWS Access Key ID and Secret Access Key

Location Action
  1. To find your Alexa Access Key ID and Secret Access Key,
  2. In the console, click on your Company Name and select Security Credentials from the drop down menu.
  1. On the Security Credentials page, select Access Keys (Access Key ID and Secret Access Key).
  2. Copy your Access Key ID and, if you saved it when you generated your Access Keys, copy your Secret Access Key.
  3. Or, to generate new Access Keys, click Create New Access Key.
  1. In the dialog box, copy your Access Key ID and Secret Access Key into Klipfolio.
  2. Download your key file for future reference.

Step 3: Write your query and enter it in Klipfolio

Alexa offers a variety of query options, which can be made by referencing the Resource Center or through the AWS Alexa API Documentation.

Alexa queries require signed authentication, also known as hashed queries. For a detailed breakdown of signed authentication, see Signed Authentication Builder (Hash Helper).

Notes on query construction

  • Both the Request and Signature sections of the query must be entered alphabetically. For example, in the example query below, Signature Version follows Signature Method.
  • Lines beginning with capital letters come before lines beginning with lower case letters. For example, AWSAccessKeyID= comes before Action=
  • Pay attention to Klipfolio's method of adding new lines in the signature. For example, .appendNewLine().
  • Make sure that there are NO SPACES in your query.

Here is a sample query to get you started:

Alexa Rank

http://awis.amazonaws.com/?AWSAccessKeyId=YOUR-ACCESS-KEY&Action=CHOOSE AN ACTION FROM ALEXA&ResponseGroup=THE RELATED RESPONSE GROUP FROM THE ACTION&SignatureMethod=HmacSHA1&SignatureVersion=2&Timestamp={date.addMinutes(10).tz('UTC').format("yyyy-MM-dd'T'HH'%3A'mm'%3A'ss'Z'");}&Url=ANY URL&Signature={hash.append("GET").appendNewLine().append("awis.amazonaws.comREPEAT THE ENDPOINT LIKE IN BEGINNING OF QUERY").appendNewLine().append("/").appendNewLine().append("AWSAccessKeyId=YOUR-ACCESS-KEY&Action=UrlInfo&ResponseGroup=Rank&SignatureMethod=HmacSHA1&SignatureVersion=2&Timestamp="+date.addMinutes(10).tz('UTC').format("yyyy-MM-dd'T'HH'%3A'mm'%3A'ss'Z'")+"&Url=YOUR WEBSITE").encodeHmacSha1("YOUR-SECRET-ACCESS-KEY").encodeBase64().encodeURL().printDigest();}

After completing your query:

  1. At Data Format, select XML from the drop-down list.
  2. At Method, select GET.
  3. Click Get Resource.
  4. If you are satisfied with the data returned, click Continue.


Now that you know how to write an Alexa query, use the Alexa API documentation to create your own.

Related links