LiveJournal provides user content in a variety of machine-readable formats.
You may like to create a page for your site listing these.
Using the $LJ::BLOCKED_BOT_URI config variable, you
can direct automated bots, spiders, data-miners, etc., to that page — you
could also include information there on the rate limits you decide to
set for your site.
Note: The examples below use user subdomains.
If you do not have the $LJ::ONLY_USER_VHOSTS
variable set, the URIs will follow the users/USERNAME, and community/USERNAME format.
E.g. http://www.livejournal.com/users/exampleusername/data/foaf instead of
http://exampleusername.livejournal.com/data/foaf.
A variety of user data in standard XML formats are available, namely:
![[o]](/img/link.png)
A user's recent entries syndicated using the Really Simple Syndication (2.0) XML format. It is available with public entries only at:
http://exampleusername.livejournal.com/data/rss
If you want security-restricted posts included and you have access to view them,
you may request the auth-required version of the feed using HTTP Digest auth, using:
http://exampleusername.livejournal.com/data/rss?auth=digest
Other optional feed URL arguments (use &arg=value if
the URL already contains a question mark):
Filter on entries with a specific tag: ?=tagname
Filter on multiple tags: ?tag=tag1,tag2
Filter on a single entry: ?itemid=xxxx
![[o]](/img/link.png)
A user's recent entries syndicated using the Atom (1.0) XML format. The optional RSS feed arguments can also be used with Atom feeds. Available at the URL with or without auth:
http://exampleusername.livejournal.com/data/atom
http://exampleusername.livejournal.com/data/atom?auth=digest
![[o]](/img/link.png)
A user's information page using the Friend of a Friend XML format. Available at the URL:
http://exampleusername.livejournal.com/data/foaf
![[o]](/img/link.png)
A list of user's subscribed syndicated feed accounts using the OPML 1.0 XML format. Available at the URL:
http://www.livejournal.com/tools/opml.bml?user=exampleusername
![[o]](/img/link.png)
You need to have installed the optional Text::vCard Perl module for this. The remote user's profile information in the vCard format. Available at the URL:
http://www.livejournal.com/tools/vcard.bml
A user's userpic data in a machine-readable
(Atom
) format.
Available at the URL:
http://exampleusername.livejournal.com/data/userpics
Interests of a user or community, in a line separated format. Available at the URL:
http://www.livejournal.com/misc/interestdata.bml?user=exampleusername
The <intid> is the interest ID.
The <intcount> is the total number of accounts listing the interest.
The <interest> field shows the name of the interest.
An HTTP interface to the S2 style system for downloading a layer or
uploading an existing layer. The Content-type value used
in server responses and client layer uploads is: application/x-danga-s2-layer.
For more information please see the S2 Manual
.
Available at the URI:
http://www.livejournal.com/interface/s2/layerid
A REST-like interface for pinging LiveJournal's feed crawler
to re-fetch an external syndication URL. Do a POST to this URL with a “feed” parameter equal to the URL.
Also permitted are multiple feed parameters, if you are not sure the LiveJournal installation is indexing your Atom versus RSS, etc.
At most, 3 are currently accepted.
A positive acknowledgment from the API does not promise to go and fetch it straightaway. Just that it will be considered.
If it would be violating rate-limits, the LiveJournal installation does not have to go and fetch it.
Available at the URL:
http://www.livejournal.com/misc/feedping.bml
Command-line example:
$curl-d''feed=http://www.example.com/my.rsshttp://www.livejournal.com/misc/feedping.bmlThanks! We'll get to it soon.
You should encourage users to use these resources instead of “screen-scraping” user pages.
Other, LiveJournal.com-specific, Resources:
A line-separated list of usernames which are friends or friends-of a user. Available at the URL:
http://www.livejournal.com/misc/fdata.bml?user=exampleusername
By default fdata.bml returns only personal journals, not communities.
You need to pass a different argument for it to return communities:
http://www.livejournal.com/misc/fdata.bml?comm=1&user=communityname
Before the data was cached, creating fdata.bml was an expensive operation,
and was not a public interface developers were made aware of. Now the data is cached, it is just for historic reasons
that it has not moved into a public SVN repository.
fdata.bml may be considered a best effort type of system.
It is not designed to be be effective on users/communities with excessively large groups of friends (say, larger than 2500).
For a live stream of all Six Apart
(including LiveJournal.com
) posts, see:
http://updates.sixapart.com/