Introduction
A CDX file is a plain-text index of the documents held in a web archive, with one line for each. It accompanies WARC or ARC files and was developed by the Internet Archive. CDXJ is a related, more flexible form used by pywb, which keeps most fields in a JSON object.
Structure
The first line of a CDX file is a legend. Its first character is the field delimiter
used in the rest of the file, followed by CDX and one letter for each field,
for example CDX N b a m s k r M S V g. The letters stand for items such as
the original URL, date, MIME type, response code, checksum, offset and file name.
A CDXJ line in pywb has a URL key, a timestamp and a JSON object. The OpenWayback form
of CDXJ is UTF-8 text with a record type between the timestamp and the JSON, and starts
with a declaration line such as !OpenWayback-CDXJ 1.0.
Not described
This page is a first outline. The layout is not yet described in full here.
Known, not yet covered
- Reference: the full list of CDX field letters and the JSON fields of CDXJ.
- Viewer: the site has no viewer for this format.
Links
Software
- pywb – Webrecorder’s web archive replay toolkit, which builds and reads CDXJ indexes (Python)
- OutbackCDX – capture index server that loads CDX files
Developers
- cdxj-indexer – command-line tool that makes CDXJ and CDX indexes from WARC and ARC files
Reference
- The CDX file format (2015) – International Internet Preservation Consortium
- OpenWayback CDXJ – description of the OpenWayback form of CDXJ
- CDX Internet Archive Index File – Library of Congress format description