Tapir

Do you have a blog made out of static pages? Do you want to add search to it? Look no further and let Tapir handle it! Enter your feed url and you'll get a token you can use with our API to easily get search on your blog.

Your RSS feed

Your E-mail

For if we ever need to contact you. Don't worry, tapirs hate spam too.
click here!

How to use the Tapir on your website

Indexing

We will index the RSS feed you supplied roughly every 15 minutes. Any articles that we haven't already indexed will be added to the index. Note that we can only index what's in your feed, if old articles are not in the feed they won't show up in search results.

Search API

You can access the search API on this url, using the token we'll provide to you and the search query:

http://www.tapirgo.com/api/1/search.json?token=******&query=*****

This will return the search results for your query in JSON format like this:

[
  {
    "_score": 0.71860904,
    "link": "http://tapirgo.com",
    "title": "Tapir",
    "published_on": "2011-05-05T15:13:22Z",
    "content": "hello tapir",
    "summary":"hello, summary!"
  }
]

To get a JSONP response (useful when fetching results using javascript), you can give a callback method:

/api/1/search.json?token=******&query=*****&callback=myCallback

And it will return the result as an argument to a function you have to provide:

myCallback([
  {
    "_score": 0.71860904,
    "link": "http://tapirgo.com",
    "title": "Tapir",
    "published_on": "2011-05-05T15:13:22Z",
    "content": "hello tapir",
    "summary":"hello, summary!"
  }
])

Ping API

If you want your new articles indexed immediately, ping our service:

/api/1/ping.json?token=******

This will return a 200 OK status code.

Push API

If you want to push articles manually, you can push your content. This will either create a new record or update the old one (based on the link parameter)

(POST) /api/1/push_article?secret=******

with the following post parameters

article[link]
article[title]
article[summary]
article[content]
article[published_on]

Or in JSON format

(POST) /api/1/push_article.json?secret=******
{
 "summary": "hello, summary!",
 "link": "http://tapirgo.com/one",
 "title": "Tapir",
 "content": "hello tapir",
 "published_on": "2011-05-07T15:49:51Z"
}

This will return:
A 200 OK status code if the article was created or updated.
A 401 will be returned if the secret was invalid.
A 422 if there was a problem with the data.

JQuery plugin

A JQuery plugin can be found on github.

An example of the plugin can be found here.