Documentation sections
On this page
Read an archive in any language
An Atlas archive is deliberately boring to read: a ZIP of Zstandard-compressed JSON Lines. You need nothing more than a ZIP reader, a Zstandard decoder, and a JSON parser: all available in every major language. There is no required SDK.
The four steps
- Open the ZIP and read
manifest.jsonfirst to see which datasets are present. - List the parts for a dataset: every
<dataset>/part-*.jsonl.zstfile. - Decompress and parse each part with
zstd -d, then read it line by line as JSON. - Join on
pageIdto assemble a full picture of any page across datasets.
Example (Python)
import zipfile, subprocess, json
def read_dataset(archive, name):
with zipfile.ZipFile(archive) as z:
parts = sorted(n for n in z.namelist()
if n.startswith(f"{name}/") and n.endswith(".zst"))
rows = []
for part in parts:
out = subprocess.run(["zstd", "-d", "-", "--stdout"],
input=z.read(part), capture_output=True)
rows += [json.loads(l) for l in out.stdout.decode().splitlines() if l.strip()]
return rows
pages = read_dataset("crawl.atls", "page_metadata")
responses = read_dataset("crawl.atls", "responses")
# join page_metadata to responses on pageId for status codes
resp = {r["pageId"]: r for r in responses}
for p in pages:
status = resp.get(p["pageId"], {}).get("statusCode")
print(status, p["url"], p.get("core", {}).get("title"))
Use the canonical (long) dataset folder names, page_metadata, navigation, responses, and join on pageId, not URL. The same approach works in any language: unzip, zstd decode, parse JSON Lines.
Resolving a blob
Records reference raw bodies by a blob reference like sha256/ab/cd/abcd…ef. To resolve it, read the ZIP entry blobs/<ref>.zst and Zstandard-decode it:
def read_blob(z, ref): # ref e.g. "sha256/ab/cd/abcd…ef"
data = z.read(f"blobs/{ref}.zst")
return subprocess.run(["zstd", "-d", "-", "--stdout"],
input=data, capture_output=True).stdout
That is the whole contract. Because the schemas travel inside the archive, you can also validate any record against the JSON Schema in the archive’s schemas/ folder without looking anything up externally.
Next: Recipes: common queries against an archive · Back to the Atlas docs index