Code Monkey home page Code Monkey logo

alexa-web-information-service-api-samples's Introduction

Alexa Web Information Service Api Samples

This repo contains code samples in various languages to make signed requests to the Alexa Web Information Service API on AWS Marketplace.

The samples are designed to demonstrate how to make a request to Alexa Web Information Service using the API user credentials and API plan key that are provided after subscribing to the service. You may subscribe to Alexa Web Information Service at https://aws.amazon.com/marketplace/seller-profile?id=4a9dbf38-88b1-4e87-a459-271154a77d2e. (Note that you must have an AWS account with a valid credit card)

Alexa's Web Services can help you create innovative web solutions and services based on Alexa's vast repository of information about the web. Developers, researchers, web site owners, and merchants can incorporate information about web sites directly into their own web sites or services. Users can access web site traffic data, related links, and a wide variety of other functionality and data.

URL Information

The URL Information action gives developers direct access to information pertaining to web pages and sites on the web that Alexa Internet has gathered through its extensive web crawl and web usage analysis. Examples of information that can be accessed are site popularity and detailed usage/traffic stats.

Historical Web Traffic

The Historical Traffic action gives programmatic access to web site traffic rank, reach, and page views going back four years. Use this action to compare a web site’s popularity over time, identify trends, or display graphs of traffic.

Sites Linking In

The Sites Linking In action returns the sites linking to a specified web site.

License Summary

This sample code is made available under the MIT license.

alexa-web-information-service-api-samples's People

Contributors

lopezfj avatar rshalhoup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

alexa-web-information-service-api-samples's Issues

How to set credentials in Urlinfo.php for api call?

 protected function SetCredentials($awsCredentials) {
      $this->accessKeyId = $awsCredentials["AccessKeyId"];
      $this->secretAccessKey = $awsCredentials["SecretKey"];
      $this->sessionToken = $awsCredentials["SessionToken"];
      $this->expiration = $awsCredentials["Expiration"];
    }

I have access key and secret key but not Session Token and Expiration. Also, $awsCredentials point to $awsCredentials = $result->get('Credentials'); and I could not find its root to set credentials.

api query error

I try to make a query according to the documentation, I include my username and my api key and it throws the following error

BEGIN REQUEST++++++++++++++++++++++++++++++++++++
Request URL = https://awis.api.alexa.com/api?Action=urlInfo&ResponseGroup=Rank&Url=sfgate.com
Traceback (most recent call last):
File "awis.py", line 310, in
r = requests.get(request_url, headers=headers)
AttributeError: module 'botocore.vendored.requests' has no attribute 'get'

date range

How do you specify a date range with API?

Calling API by .NET result in error

Hi, I ran the project and got data successfully. I changed the API URL parameters but when I build and run it again, It causes this error:
The process cannot access the file alexa.credential because it is being used by another process. I closed Visual Studio solution and reopend it but nothing changed. What should I do?
Any help will be appreciated.

Hmmm....doesn't make sense

As I'm running PHP 7.2 and this is only tested to 7.1, I shouldn't complain about the myriad of warnings and errors, this one however confuses me: What is the point in having an API key if a username and password are required?

If I call the UrlInfo.php file just as the readme states, I get asked for a password, to which I hit enter and get:
Error executing "InitiateAuth" on "https://cognito-idp.us-east-1.amazonaws.com"; AWS HTTP error: Client error: POST https://cognito-idp.us-east-1.amazonaws.com` resulted in a 400 Bad Request response:
{"__type":"InvalidParameterException","message":"Missing required parameter PASSWORD"}
InvalidParameterException (client): Missing required parameter PASSWORD - {"__type":"InvalidParameterException","message":"Missing required parameter PASSWORD"}`

Also a note on the "works on 7.1" in the readme: while it may run, it most certainly doesn't "work". The code is still PHP5 style code. Would it take that much to update it? Is this service even used anymore?

Do I really need sophisticated preparation for making requests to AWIS as demonstrated by code samples?

I'm confused by the procedures required to call awis service, as demonstrated by code samples.

For example, AWIS java example shows that I need to authenticate using my username/password, get my access/secret keys, set up complicated headers (host, x-amz-date, x-amz-security-token, etc.), and compute hashes, before making request to awis.

But why is this necessary? Isn't it that only a simple x-api-key request header is required? (I tried, it worked.) What are the benefits for this complicated setup?

Sorry if the question sounds obvious/strange/whatever, because I'm not familiar with AWS in general. I'm only making request from machines in on-prem cluster, not from inside AWS.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.