Loading Search...

API Best Practices Blog

Build & Run a Web API for FREE »

With the proliferation of free, cloud services it's possible to build and run interesting mobile and web projects from end-to-end for free--including an awesome web API.

Here are 10 steps to building and running a web API for free.

1. Prepare

Get up to speed on APIs - from their economic and business model rationale to design best practices and principles to developer community practices.

 2. Design

Prioritize your resources (objects) in a Google spreadsheet and start to craft your URLs and HTTP methods. 
 

3. Build

Build your API quickly using Ruby on Rails scaffolding.  And here are some additional Rails API tips from @StefanSiebel.

Store your source code in GitHub.

 4. Deploy

After you create your Rails-based API, deploy it to Heroku.

5. Proxy

Use Apigee's Free service for API analytics, debugging and rate limiting.

6. Document

Document your API using GitHub pages.

7. Engage

Engage developers by embedding an API Console into your docs using Apigee To-Go.

8. Launch

Grab a domain name for your project from a DNS provider like GoDaddy.

Setup CNAME records for:

  • GitHub docs: dev.mydomain.com
  • Apigee proxy: api.mydomain.com

9. Promote

Use Twitter, Blogger and Facebook to promote your API.

10. Support

Support your community with GetSatisfaction and manage tickets with GitHub's Issues feature.

A couple of us (@earth2marsh & @landlessness) recently built an API with this set of products and had a lot of fun doing it. We'll talk more about that project in a future post.

Customers scraping your website? Time for an API. »

Sometimes opportunites are right under our nose.
 
I love Southwest Airlines.   But often you had to check in *exactly* 24 hours before a flight time to get better seating - else you were in the ‘B’ section.  So they introduced “EarlyBird” check-in, where for an extra $10 per flight they automatically check you in first.

Southwest is very good at observing and recognizing untapped customer value.

Web scraping: nuisance or untapped opportunity?
 
If you run a business on the web, you might experience web scraping.  Often legal and technical measures are put in place to stop it.
 
But before you try to stop scraping -  why are your customers doing it?
 
I'm working with a few companies who are re-architecting their website to be driven by web APIs.  While some use is nefarious,  these companies recognize web scraping might mean there is unlocked value in their web content!  By opening APIs, they are trying to provide legitimate access to the content with a business model.  And this is not a new idea

So look at the hoops customers jump through to get access to your data.  Also, is there valuable data that *isn’t* being accessed at all?  You might just find new revenue channels, additional distribution, or innovative partnerships.

And think about what your API needs to capitalize on this value.  You might need:

  • visibility over who is using the APIs.  Just as you wouldn’t launch a website without web analytics, you shouldn’t be running an API without the ability to see and analyze who is using it and how.
  • protection from XML specific attacks and misuse.
  • differentiated access (think Southwest - business select, earlybird…)
  • API scalability - what happens if your users increase by 10x? 100x?.
  • API monetiziation (getting that good seat is worth $10!) if that is your goal.

 (thanks to Mark Watson for the pic!)