What is APIfy?

APIfy converts data in existing HTML sites and wikipedia pages to JSON APIs.

APIs can be consumed from Ruby , Python , PHP, Node.js, iPhone, Android apps.

Javascript and Phonegap apps can use JSONP to consume API without a backend.

APIfy is built using ScrApify gem.

Getting started

Click Edit or Test to view existing APIs

View Tutorial to Create API

View Examples to Use APIs

How to create an API?

  1. Name your API
    Ex: IMDBMovie
  2. Enter URL to extract data
    Ex: http://www.imdb.com/chart/top
    Use :foo: in URL for dynamic parameters.
  3. Enter APIfy path for JSON API
    Ex: imdb_top250_movies
  4. Click to add attributes. Enter CSS selector or XPATH selector for each attribute
  5. Enter Unique Attribute to get each record
    Ex: rank is the unique attribute in /api/imdb_top_250_movies/:rank.json

Modify API

  1. HTML URL is the html page from which data is extracted
    Use :foo: in URL for dynamic parameters.
  2. API Path is the APIfy URL for the API
  3. Add/Edit attributes if you think something is broken.
    Attributes are selected using CSS selector or XPATH selector
  4. Unique Attribute is used to identify records
    Ex: rank is the unique attribute in /api/imdb_top_250_movies/:rank.json
  5. Locked APIs cannot be edited

CSS / XPath finder

Drag XCPath bookmarklet to browser toolbar to find CSS/XPath in any webpage

How to use this API?

This API can be used from:
  1. Ruby , Python , PHP webapps
  2. iPhone / Android mobile apps
  3. Javascript and Phonegap apps using JSONP
View Examples for more details

How to test this API?

Click Test API to directly test API from APIfy.

  1. Use Index API to get all records
    Ex: /api/imdb_top250_movies.json
  2. Use Show API to get one record using unique attribute
    Ex: /api/imdb_top250_movies/4.json
  3. JSON output will appear like this:
    {rank: 4, title: "Pulp Fiction", rating: 9.2}
  4. API can also be tested using curl or RESTClient