1. Data Formats

LiveJournal provides user content in a variety of machine-readable formats. You should encourage users to use these resources instead of “screen-scraping” user pages. 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:

RSS[o]

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.lj-23-m.bulyon.local/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.lj-23-m.bulyon.local/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: ?tag=tagname

  • Filter on multiple tags: ?tag=tag1,tag2

  • Filter on a single entry: ?itemid=xxxx

Atom[o]

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.lj-23-m.bulyon.local/data/atom

http://exampleusername.lj-23-m.bulyon.local/data/atom?auth=digest

FOAF[o]

A user's profile page using the Friend of a Friend XML format. Available at the URL:

http://exampleusername.lj-23-m.bulyon.local/data/foaf

OPML[o]

A list of user's subscribed syndicated feed accounts using the OPML 1.0 XML format. Available at the URL:

http://www.lj-23-m.bulyon.local/tools/opml.bml?user=exampleusername

vCard[o]

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.lj-23-m.bulyon.local/tools/vcard.bml

Journal Comments

A user's recently received comments, in order of oldest first, using the RSS format. Available at the URL:

http://exampleusername.lj-23-m.bulyon.local/data/comments

Userpic Data

A user's userpic data in a machine-readable (Atom[o]) format. Available at the URL:

http://exampleusername.lj-23-m.bulyon.local/data/userpics

Interest-Data

Interests of a user or community, in a line separated format. Available at the URL:

http://www.lj-23-m.bulyon.local/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.

S2 Client Interface

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[o]. Available at the URI:

http://www.lj-23-m.bulyon.local/interface/s2/layerid

Ping Server

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.lj-23-m.bulyon.local/misc/feedping.bml

Command-line example:

$ curl -d 'feed=http://www.example.com/my.rss' http://www.lj-23-m.bulyon.local/misc/feedping.bml
    Thanks! We'll get to it soon.

Other Markup

Microformat Markup

User and community profile pages have hCard[o] microformat markup for username, name, userpic, location, birthday, and email.

The friend lists on profile pages have XFN[o] (XHTML Friends Network) microformat markup describing friends, communities a member is a part of, and members of a community.

Indexing Content

Users can enable a “Minimize your journal's inclusion in search engine results” option on their account. In addition to robots.txt protocol instructions and “noindexmeta tags on their HTML pages, this will add two similar directives to XML feeds, avoiding the need to fetch HTML just to find “noindex”.

The journal's RSS feed of entries will contain the word NOINDEX within the copyright tag. Similarly, a user's Atom recent entries and userpic data feeds contain:

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:idx="urn:atom-extension:indexing" idx:index="no">

Other, LiveJournal.com-specific, Resources:

Friend-Data

A line-separated list of usernames which are friends or friends-of a user. Available at the URL:

http://www.lj-23-m.bulyon.local/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.lj-23-m.bulyon.local/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).

Latest Entries

A feed of the latest entries posted to the site, in RSS format. Available at the URI:

http://www.livejournal.com/stats/latest-rss.bml

A HTML rendered version is at http://www.livejournal.com/stats/latest.bml

Latest Images

The latest LiveJournal images (from public entries), in XML format. Available at the URI:

http://www.livejournal.com/stats/latest-img.bml

Update Stream

A live Atom stream of all public Six Apart[o] (with LiveJournal.com[o]) entries.

Information: http://updates.sixapart.com/ Endpoint: http://updates.sixapart.com/atom-stream.xml

Relationship Update Stream

A live XFN-derived Atom stream of all public Six Apart[o] (with LiveJournal.com[o]) social relationship changes.

Information: http://updates.elsewhere.im/ Endpoint: http://updates.elsewhere.im/atom-stream.xml