Getting Started

What is Mashape?

Mashape is an API marketplace where developers can distribute, manage, and consume APIs. We're a team of API fanatics focused on making your life easier putting back on our shoulders all the burden of distributing, maintaining and consuming an API.

If you're an API Provider, we give you:

  • Distribution into the marketplace, where thousands of developers are ready to hack your API. It's time to get viral!
  • A social layer on top of your API, to bring developer's experience to the next level
  • Auto-generated client libraries in five different languages, because distribution also means to lower the barriers for the consumers
  • Add-ons marketplace: it's not just about having an API, it's also about selling it, setting API request limits, and more to come
  • Custom URLs for "Login" and "Sign up"
  • Soon in the next release:
    • Issues tab for submitting bugs
    • Support for existing authentications like OAuth
    • Easy "Versioning" of an API with real-time notifications to the existing consumers

If you are an API Consumer we give you:

  • An unified place to search and consume APIs.
  • Easy and readable documentations.
  • Standard way to consume APIs
  • A community of developer like you

If you know how to consume an API, then you know how to consume them all. You'll love it!

Why Mashape?

We believe that APIs are becoming one of the most powerful tools that services, components and devices have ever had. Developers today can create new apps on top of them, thus unleashing a great potential and contributing in creating an ecosystem around a service.

Personally when I think the word "API", for example I think of the Facebook's Graph API, or the Google APIs, and an infinite number of popular services. Mashape is targeted to all those million services and devices that need distribution and an easy way to manage APIs.
Also when I think about APIs, I think about standalone components: an API that pings a server, that resizes an image, that creates a QR code. Something that a developer could done in 1+ hours and sell it. Mashape fits well for this category of API providers, that are not companies but kick ass developers.

Having an API it's not just about returning a JSON or XML string, though. It's also about:

  • Writing a beautiful documentation others can understand, better with examples
  • Creating client libraries to lower the barriers and make the consumption process easier
  • Manage the burden of releasing a new version of an API, notifying developers and help them through the migration process
  • Billing, Requests Limit, and more

Mashape aims to be a place to do all this, trying to make life easier not only to API providers by giving them nice tools to deal with all these stuff above, but also to API consumers, that can finally have a place to easily consume services without getting stuck in thousand different documentations or client libraries. One format to read documentations, one standard to consume every API. Thus saving time, and being more productive focusing on what you're building.

How does it work?

Proxy

For every API we prepare an instance of our Open Source node.js proxy to intercept every call to your API.
Using our proxy we are able to add services on top of your API to make your life easier!

To get more deatils just go here: Configuring the proxy

Distribute an API

Any API that has a plain JSON response can be distributed into the marketplace. To make the billing and other add-ons secure we provide an open source proxy that connects your API with Mashape. For enterprise-class support you can drop an email at support@mashape.com.

So distributing an API into Mashape involves two steps:

  • Create an XML file that describes your API and its methods. We need it to create the documentation template and auto-generate the client libraries. Writing the XML file is easy, we have some tools to make it even easier and faster: an XML Schema and the XML Result Generator tool.
  • Configure on a simple wizard the proxy configuration.

This is a short overview, to start distributing an API please read Publish your API.

If you don't have an API yet, you can use our free & open source PHP Library to easily create it.

Consume an API

To consume an API search the right one and then open its profile. There you will find a documentation with examples, a short description of what it does and who's hacking on it. There are two modes to consume an API:

  • JSON: Make an HTTP request and read the JSON response.
  • Client Libraries: Consume the API using the auto-generated client libraries in your programming language. We currently support PHP, Ruby, Python, Java and Objective-C and plan to add new ones.
You can choose which mode to use in the API's profile.

REST

The entire Mashape API is set up to be as RESTful as possible and it attempts to conform to the design principles of Representational State Transfer (REST). Methods to retrieve data from the Mashape API require a GET request, while methods that submit, change, or destroy data require a POST, PUT or DELETE. The API presently supports only the JSON data format.

Being a simple REST API that runs over HTTP also means that it can be accessed by any application or device that has an internet connection and can speak HTTP.

Things you could build

Apart from listing existing services, you could create an API for:

  • Audio services

  • Document conversion

  • Email services

  • Financial services

  • Geolocalization services

  • Graph generation

  • Image services

  • News aggregators

  • Sms services

  • Statistical services

  • Text-to-speech services

  • Translation services

  • Video services

  • Whois services

  • Wrappers around existing services (Facebook, Twitter, etc)

And everything else that blows up from your mind!