The Cloud API Marketplace

Mashape is the Cloud API Management and Marketplace where developers can discover, distribute, and consume private and public APIs; as well as offer free or monetized APIs.

Table of Contents

  1. Consuming Free APIs
  2. Consuming Paid (or Freemium) APIs
  3. Generating Code Snippets

Consuming Free APIs

Free APIs ready to be consumed Fig. 1 Free APIs are free to consume!

To consume an API you need to run a query against an "Endpoint". An Endpoint is the end of a communication channel which you can query with the required or optional parameters, and data. Imagine this as a list of all possible actions that can be performed with an API. An endpoint will process this information and respond with success (or error) code and a response object.

Some APIs might require you to authenticate your requests. Here at Mashape we support different types of authentication. When consuming APIs you might be required to authenticate but not to worry, it's very simple to do that: Simply provide any identification detail you are might be given by the provider.

URL Parameters
URL Parameters are used to define variables in the URL when performing a request. They will appear as curly braces….. in the endpoint URL, which is a powerful way for users to perform certain actions on your endpoint.

Request Headers
Sometimes you want to pass specific headers to the API; in this situation, you might be requested to specify a certain header that will be sent to the resulting API. This is done automagically by Mashape.

Request Payload
A payload might be specified to create or alter a resource. Whether it is a form-encoded payload or based on the model, there is a field for all occurrences.

Application (X-Mashape-Key)
When consuming APIs you might want to use different Applications. This dropdown will allow you to pick the application you want to run the request with. Please check the article on Applications to understand what they allow you to do.

Consuming Paid APIs

Unlike Free APIs, when you subscribe to a paid API you will need to have your credit card ready to go. You can easily decide to consume a Paid API by assigning a different application from the drop down menu. This is a good way to not mix-up your usage analytics. If an API is labelled as “Freemium,” it means you will need to subscribe to a Basic plan before you’re able to consume the API.

Generating Code Snippets

You can generate code snippets for an API request on the fly. View your options from the left hand side of the documentation. Simply pick any of the languages available and the UNIREST library will auto-generate the request for you. UNIREST is the Universal REST Library developed by our team of awesome engineers at Mashape. Now you can consume REST APIs quickly!

More information about UNIREST can be found here