How To Create An API? (10 Tutorials)


API IconBehind almost every successful web application, there is an easy-to-use & feature-rich API as they simply help the main application to spread into others & reached by more users.

Also, an API-enabled application can be easily developed further using the API itself.

In order to create an API for your web application, here are 10 tutorials to get you started. But before that, you may want to checkout the video: How To Design A Good API and Why it Matters by Google.



Create a REST API with PHP

Create REST API With PHP

A very detailed yet easy-to-implement tutorial on creating a REST API with PHP.

And, there is a follow-up article: "Making RESTful Requests in PHP" by the same author which can guide you as well.

How to Add an API to your Web Service (PHP)

Create API PHP

A detailed tutorial which describes the concepts like REST, SOAP & creates an API step-by-step with PHP.

Implement a Rest API with the Zend Framework

API With Zend

This example utilizes controllers in an MVC style application. Most of the stuff is handled by an instance of  Zend_Rest_Server so it shows implementing to our service.

Creating a Simple REST API With VB, PHP and MySQL


This article covers both creating an API with PHP where the data is stored in a MySQL database & reaching to the API with a VBScript file.

Create Your Own Custom API (PHP)

Create A Custom API

The tutorial describes a PHP API returning XML data in 6 steps:

  • Create Your Own Custom API
  • Developing the basic API layout
  • The Client
  • The Server
  • The Server Class
  • The "Test" Step

Towards RESTful PHP – 5 Basic Tips


Ok, this is not a tutorial but includes very handy tips that can be used when creating a REST API with PHP for the security & ease of usage of the API.



Creating Open Web APIs: Exploring REST and WOA in Rails 2.0

Creating Open Web APIs

As Rails automatically offers URL addressable resources for all the data in a Rails web application, every Rails application already has a ready-to-go RESTful API". The tutorial explains how to use it in detail.

How to Make an API for a Rails App?

Creating An API For Rails Application

The article describes the 2 options for creating an API:

  • HTTP Basic Auth
  • Using API key

and provides example codes o get you started.

Putting REST on Rails

Ruby on Rails And Rest

The tutorial uses the RESTful Rails Controller & creates a simple RESTful Rails application with a full test suite and HTTP method dispatching.




Create API With Asp.Net

A solid start to creating your own REST API with ASP.NET MVC.

Considering, depending on the type of the request you may want to sendXML or JSON data, the tutorial provides a class which can return both.


Other Information on APIs

There are also various frameworks for creating APIs easily like WSO2 WSF, Recess PHP framework, Tonic & more.

Books On Creating An API

  1. Reply web2000 July 14, 2009 at 6:39 AM

    Good post “how to create an api 10 tutorials.” Thanks!

  2. Reply Adam July 14, 2009 at 2:07 PM

    Really nice tutorial, thanks for sharing your knowledge.

  3. Reply Joost July 14, 2009 at 9:12 PM

    Ooooh very nice. Useful and not something you see discussed everyday.


  4. Reply Khan July 15, 2009 at 4:41 AM

    Agree with Joost, We have to keep all level of developers in mind – not just masses.

    Good Work!

  5. Reply Issa Qandil July 15, 2009 at 2:42 PM

    Very useful tutorials,

    Thanks for sharing

  6. Reply vamsi July 17, 2009 at 9:33 AM

    Cool !…will be using it in my site 🙂

  7. Reply ravi May 11, 2010 at 6:49 AM

    Cool very cool !…will be using it in my site as well as i will recommend to other to try it.

  8. Reply Srikanth October 9, 2010 at 3:24 PM

    Its awesome Post

  9. Reply adnan zulkarnain October 22, 2010 at 7:37 PM

    Thank.. usefull for me..

  10. Reply Robert Doroftei August 23, 2011 at 4:15 AM


    I’ve just launched the PHP-API project on

    I’ve tried to implement a skeleton upon which to build a fully functional system using a very easy to extend API (also the JavaScript connection with the API is implemented).

    In the future I will add the API-Key so some of the modules/methods will be called only if an API-key is provided and an IP checker for the API to be called only from a specific IP for a specific API-Key.


  11. Reply Arul September 3, 2011 at 7:22 AM

    Luracast Restler is an open source micro framework that can expose any php method as a RESTful api. Take a look at to learn more

  12. Reply Domainwright September 14, 2012 at 7:27 AM

    Thanks for the article, I need help in writing an API for my website and don’t know where to start, so thanks for this introduction.

  13. Reply Kathy J. Lowrey November 19, 2012 at 9:39 AM

    Its a great article. Thanks a lot for sharing.

    Anybody can tell me how to create how to create a SOAP API in CodeIgniter?

Leave a reply