Hatena Haiku RESTful APIs enable your application to create (post / associate), retrieve, or delete entries, keywords, favorites, stars, and so on, from Hatena Haiku, on behalf of your users. This document describes how to use these API.
We may discontinue or change Hatena Haiku APIs, or its availability to you at any time.
Hatena reserves the right to limit, close, or remove, either temporarily or indefinitely, any user's account when the user exeeds the ordinary use of the service. Applications MUST send their own name in the HTTP
User-Agent: header field.
Sometimes in this document we refer to Version 1.1 of Hatena Haiku. Version 1.1 of the service is available at the formal domain (i.e. h.hatena.com and h.hatena.ne.jp) from Feburary 14, 2011, as well as at the beta-testing domain (i.e. h1beta.hatena.com and h1beta.hatena.ne.jp).
Most of read-only APIs can be used without authentication.
The APIs support OAuth-based user authentication. You can obtain Consumer Keys for the OAuth access from the Access Hatena services with OAuth section in your User Settings. There is a tutorial document はてなサービスにおける OAuth (available only in Japanese at the time of writing, but sample codes are also included there).
HTTP Basic Authentication is supported by Hatena Haiku but is now DEPRECATED in favor of OAuth.
Please input "Hatena ID" for ID, and "API password" for password (...@h.hatena.com).
ATTENTION: Hatena Haiku API use not Hatena password but "API password" for password.
Hatena Haiku APIs presently supports the following data formats: JSON, JSONP, XML. You can get it by specifying .json, .json?callback=cb, .xml respectively. See detailed documentation and examples for APIs.
A timeline is a list of zero or more entries. Following APIs provide access to various kind of timelines:
|Name||Corresponding page in the Web site|
|Hatena Haiku Top page|
|Entries page for a keyword|
|Entries page for a user|
|Antenna page for a user|
|Album page for a keyword or the entire service|
Following APIs can be used to post, retrieve, or delete entries and stars:
|Post a new entry|
|Retrieve an entry|
|Delete an entry|
|Add a star to the entry|
|Delete a star from the entry|
Following APIs can be used to retrieve or operates on users and keywords:
|Retrieve user's data|
|Retrieve keyword's data|
|Retrieve list of hot keywords|
|Search for keywords|
|Mark two keywords as related|
|Unmark two related keywords|
Following APIs can be used to retrieve list of favorite users and keywords, and to add or remove favorite users and keywords:
|Retrieve the list of favorite users of a user|
|Retrieve the list of fan (or favorited) users of a user|
|Add a user to the favorites|
|Remove a user from the favorites|
|Retrieve the list of favorite keywords of a user|
|Add a keyword to the favorites|
|Remove a keyword from the favorites|
Hatena Haiku RESTful APIs are partially compatible with Twitter APIs. Following features are also available in Twitter APIs:
Following APIs are extended for Hatena Haiku specific features such as keywords: