December 4, 2016

Testing the RESTful-API

This article describes how you can test the functionality with a REST-Client. All you need is a valid API-KEY you can request via our contact form.

Get your FREE API-KEY NOW!

RESTful API Clients & Plugins

There are a couple of tools, plugins and applications available in the web for free. We recommend one of those:

Testing the hyScore.io REST-API with Postman

Settings – Header

  • Go to Headers tab
  • Set the METHOD to POST
  • Type in the API-Endpoint : https://api.hyscore.io/v2/
  • Set your x-api-key – it is a unique token to get access to the API endpoint which will be provided individually
  • Set the Authorization to Basic Og==

It should look like the example below:

Postman Example Configuration 1

Settings – Body

It should look like this:

Postman Example Configuration Body

Click on “Send”

Response

If everything was configured correctly, the request was sent successfully to the API-endpoint. You should receive a Status: 200 OK as shown in our example below:

Postman Example

You’ll receive a response as JSON which you can use for any purpose.

  • “url”: shows the full url you send to the API to get analyzed.
  • “text”: is the text / article we detected on the related url.
  •  “tld”: is the Top Level Domain (TLD) of the analyzed url
  • “category”: the main category of the website

Postman JSON Response

In the response the url and text is followed by the extracted and weighted keywords. Simple rule: as higher the weight than more valuable the keyword or keyword phrase.

Postman JSON Response

We differenciate several types in the response, such as…

  • Keyword
  • Settlement
  • Software
  • EthnicGroup
  • Organisation
  • etc.

A full list of types is provided in the RESTful-API documentation.

In the response you’ll also find …

  • “uuid”: This is the usedID or string you’ve sent with the initial request. It is just looped back, so that you can e.g. enrich a user profil with the set of high weighted keywords.
  • “language”: this is the language we detected for the given url.

Postman JSON Response

Testing the hyScore.io API with RESTed – MAC OSX Client

Download the RESTed – MAC OSX Client in Apple App Store.

Settings

  • Add in the Header Section “x-api-key” and input your unique API-Key.
  • Add the Header Field “Authorization” with value “Basic Og==”
  • In the Parameter section add “url” as Parameter Name and in the Value the “<URL”> auf the website you want to analyze.
  • You can add a UUID if mandatory and a “numberOfKeywords” (Default is “5”).

RESTed client

 

Don’t hesitate to contact us if you’ve any questions!