What is Atom?
Atom is an XML-based web feed format designed for content syndication. Similar to RSS, it provides a structured way for websites to share content updates in a standardized, machine-readable form.
Content syndication itself means distributing content, such as blog posts, news articles, or podcasts, via standardized formats. Feed readers, automation tools, and other applications regularly fetch these feeds to process and aggregate content, and present up-to-date information to users.
History and evolution
In the early 2000s, as RSS became popular, developers and publishers encountered issues with the format. While today many of these issues are ironed out, back when Atom was started people had to deal with inconsistent specifications, unclear rules about encoding and content types, and a lack of extensibility. The motivation behind Atom was to build a feed format that would clear up this confusion and add the missing features developers needed.
The goals of Atom included:
- A fully specified, unambiguous standard
- Clear data typing and extensibility
- A governance model open to community input
An important question before starting with Atom was why RSS couldn't be extended or updated to fix these issues. The reason is that at that time, the RSS specification was already frozen to ensure its stability. RSS was already 4 years old and went through multiple versions, and version 2.0 was the last one.
The first version, 0.2, was released in July 2003, and version 0.3 followed a couple months later in December 2003. Version 0.3 was added to several Google services, for example Blogger and Google News, which gave Atom its first boost of adoption.
In 2004 Atom was moved to the IETF standards body, and the format was officially standardized in RFC 4287 in December 2005. Since then, the specification has remained stable.
Today, Atom is well-established and supported by virtually all software that processes web feeds. While RSS remains more popular overall, Atom has a significant market share.
Key Improvements over RSS
The motivation for Atom was to create a new format that's technically superior to RSS, and it fulfills this promise in several areas.
- Clear Specification: Atom provides a more precise and explicit specification, reducing potential ambiguities in implementation. Developers have clear guidelines on data types, element definitions, and proper use of attributes, resulting in fewer interoperability issues.
- Internationalization (Unicode): Atom mandates Unicode encoding for all textual content. This ensures proper representation of international characters and makes it suitable for global content distribution.
- Improved metadata: Atom supports more detailed metadata for entries. It requires an ID for every entry, while in RSS IDs are optional. It also has separate fields for summary and full content and distinguishes properly between plain text and HTML content. And it also allows more detailed metadata for most fields, for example authors can specify a name and email address where in RSS only an email address is possible.
A more detailed comparison of Atom and RSS format can be found in the What is RSS? article.
Technical specification
Atom feeds are XML documents structured around a <feed>
root element. Each feed contains metadata about the channel itself, along with multiple <entry>
elements that represent individual content items.
The <feed>
element
The <feed>
element describes the Atom feed as a whole. Required elements include:
<title>
: The feed's name (e.g., "My Awesome Blog").<id>
: A unique identifier for the feed, typically a permanent URI.<updated>
: The date and time the feed was last updated.
Optional elements include <author>
, <link>
, <category>
, <contributor>
, <rights>
, <subtitle>
, and more.
The <entry>
element
Each <entry>
represents an individual item, such as a blog post, news article, or podcast episode. Required elements include:
<title>
: The item's headline or title.<id>
: A unique identifier for the specific entry.<updated>
: The date and time this entry was last modified or published.
Optional elements include <author>
, <content>
, <summary>
, <link>
, <category>
, <contributor>
, <published>
, and others.
This is an example of an Atom feed, taken from Wikipedia:
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<subtitle>A subtitle.</subtitle>
<link href="http://example.org/feed/" rel="self" />
<link href="http://example.org/" />
<id>urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6</id>
<updated>2003-12-13T18:30:02Z</updated>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03" />
<link rel="alternate" type="text/html" href="http://example.org/2003/12/13/atom03.html" />
<link rel="edit" href="http://example.org/2003/12/13/atom03/edit" />
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<published>2003-11-09T17:23:02Z</published>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>This is the entry content.</p>
</div>
</content>
<author>
<name>John Doe</name>
<email>johndoe@example.com</email>
</author>
</entry>
</feed>
Extending the specification
Atom was explicitly designed for extensibility. Using XML namespaces, developers can create custom elements to add new features or metadata without breaking compatibility with existing software.
Elements from other namespaces, and unrecognized elements from the atom
namespace, are considered “foreign markup”. If an element is not expected to exist, it's deemed “unknown foreign markup”. When parsing Atom documents, software should ignore unknown foreign markup, which makes parsing more resilient.
Creating Atom feeds
Most modern content management systems (CMS) and blogging platforms automatically generate web feeds (RSS or Atom). Platforms like WordPress, Ghost, Blogger, and Substack typically provide feeds out of the box, usually available at predictable URLs like yourdomain.com/feed.atom
.
For custom applications or websites without built-in Atom support, developers can use libraries to programmatically generate valid feeds. JavaScript developers, for example, can use npm packages such as feed
(which supports Atom and RSS) to easily create feeds.
import { Feed } from "feed";
const feed = new Feed({
title: "Feed Title",
description: "This is my personal feed!",
id: "http://example.com/",
link: "http://example.com/"
});
feed.addItem({
title: post.title,
id: post.url,
link: post.url,
description: post.description,
content: post.content,
date: post.date
});
console.log(feed.atom1());
// Output: Atom 1.0
Common use-cases
News aggregation is one of the most common applications. Feed readers let users follow multiple news sources in a single interface with a chronological timeline, which gives readers control over their information diet. Products in this area are for example Feedly, Inoreader, and Lighthouse.
Content curation platforms and newsletters often pull from Atom and other web feeds to identify and aggregate content worth sharing.
Automation systems often use web feeds like Atom as a trigger mechanism. Services like IFTTT or Zapier can monitor feeds and initiate actions when new items appear. This enables workflows like automatically sharing new blog posts to social media.
Conclusion
Atom is a great technical improvement over RSS. Its standard is well-defined and allows for more metadata than the RSS specification. Even so, it's relatively simple and can be implemented by every software developer.
Besides that, for all intents and purposes it's quite similar to RSS. It is also a web feed format, and pretty much every software that supports RSS also supports Atom.
The same things that make RSS valuable also make Atom valuable. Particularly the open nature as web standard, a technology that everyone can use, which gives control to users rather than algorithms. There's no platform in the middle deciding which content gets seen and by whom.
With social media becoming ever more polarized, having such open alternatives has never been more important.