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.
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!"
}
])
If you want your new articles indexed immediately, ping our service:
/api/1/ping.json?token=******
This will return a 200 OK status code.
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.