# National Archives NSDAP membership records (microfilm publication A3340, MFKL and MFOK)

## Facts

- Provider: U.S. National Archives and Records Administration (NARA)
- License: US Government work (public domain)
- Records: 5447 roll prefixes (3171 under A3340-MFKL, 2276 under A3340-MFOK, counted from delimiter listings of each series folder). About 3000 frames per roll, so roughly 16 million frames
- Format: JSON, TIFF (in sampled files)
- Stored at: Amazon S3, s3://nara-nsdap (us-east-2)
- Access: public, readable without an account
- Category: Urban & Civic
- Source: https://registry.opendata.aws/nara-nsdap/
- Page: https://scigantic.com/archive/e01223a9-4de8-54e6-a682-1d472a7ff06f
- Keywords: Urban & Civic, AWS Open Data

## About

Scanned microfilm of NSDAP membership card files (National Archives microfilm publication A3340, portions MFKL and MFOK): about 5,400 rolls, roughly 3,000 uncompressed grayscale TIFF frames per roll (about 16 million frames, ~240 TB), a combined PDF per roll, and one metadata JSON per roll carrying per-frame OCR text (plain strings, not Textract block JSON; absent for some frames). Records about named individuals. Bucket nara-nsdap (us-east-2), folders A3340-MFKL/ and A3340-MFOK/. US Government work.

## Load the data

```python
# Task: summarize one NSDAP microfilm roll from its metadata JSON without touching the 16 MB TIFFs
import os, glob, json, collections
root = os.path.expanduser("~/archive")
roll = "A3340-MFOK-A0001"
path = glob.glob(os.path.join(root, "A3340-MFOK", roll, "*.json"))[0]   # one json per roll, named <naId>.json
d = json.load(open(path))
rec = d["_source"]["record"]
objs = rec["digitalObjects"]
imgs = [o for o in objs if o["objectType"].startswith("Image")]
with_text = [o for o in imgs if o.get("extractedText")]   # key is ABSENT when no OCR, never ""
print(rec["title"], "naId", rec["naId"], "level", rec["levelOfDescription"])
print("objects", len(objs), collections.Counter(o["objectType"] for o in objs))
print("images with OCR", len(with_text), "of", len(imgs))
print("image bytes", sum(o["objectFileSize"] for o in imgs) / 1e9, "GB")
lens = sorted(len(o["extractedText"]) for o in with_text)
print("OCR chars min/median/max", lens[0], lens[len(lens) // 2], lens[-1])
print("first image file", imgs[0]["objectFilename"], os.path.exists(os.path.join(root, "A3340-MFOK", roll, imgs[0]["objectFilename"])))
```

Written for a Scigantic notebook, where /mnt/archive (SCIGANTIC_MOUNT_PATH) is the mounted dataset.

## Data structure

File types in sampled files: JSON, TIFF

| Field | Type |
| --- | --- |
| `_source.record.naId` | int, National Archives Identifier of the roll (file unit); equals the JSON filename, e.g. 597027523 |
| `_source.record.title` | string, 'A3340-MFOK: Number A0001'; this is the roll label only, not a name range |
| `_source.record.levelOfDescription` | string, always 'fileUnit' in the 4 rolls checked |
| `_source.record.digitalObjects[]` | list of objects, one per TIFF plus one trailing PDF entry; length ~roll TIFF count + 1 |
| `digitalObjects[].objectFilename` | string, e.g. A3340-MFOK-A0001-00001.tif; matches the S3 key within the roll folder; 5-digit frame number from 00001 |
| `digitalObjects[].objectId` | string of digits, per-frame NAID, consecutive within a roll (naId+1, +2, ...) |
| `digitalObjects[].objectType` | string, 'Image (TIFF)' or 'Portable Document File (PDF)' |
| `digitalObjects[].objectFileSize` | int bytes; PDF entry is off by a few bytes from the S3 object size (e.g. 376392256 vs 376392250) |
| `digitalObjects[].objectUrl` | string, catalog.archives.gov/medialz/... or s3.amazonaws.com/NARAprodstorage/lz/... URL of the NARA original, NOT this… |
| `digitalObjects[].extractedText` | string, OCR text with newline-separated lines, 2 to ~11,200 chars (median 220 to 810 per roll); key ABSENT (not empty)… |
| `_source.record.ancestors[]` | list of objects (series, record group 242 'National Archives Collection of Foreign Records Seized'), each with title… |
| `_source.record.physicalOccurrences[].mediaOccurrences[].containerId` | string, 'Reel A0001'; the roll id |

Files:

```text
Bucket root holds two folders, one per microfilm series portion: A3340-MFKL/ (Zentralkartei, alphabetical central membership card file) and A3340-MFOK/ (Ortsgruppenkartei, geographic local-group card file). Each folder holds one subfolder per microfilm roll, named A3340-<series>-<letter><4 digits> (letter = alphabetical section A-T for MFKL, A-Z for MFOK). Every roll folder is flat: one TIFF per film frame, one combined PDF, one metadata JSON.

A3340-MFKL/   (3171 roll prefixes)
  A3340-MFKL-A0001/
    581244230.json              (roll metadata + per-frame OCR text, ~0.6-3.3 MB; filename = the roll's National Archives ID)
    A3340-MFKL-A0001.pdf        (all frames combined, 0.12-0.38 GB typical)
    A3340-MFKL-A0001-00001.tif  (one frame, ~12-18 MB, uncompressed 8-bit grayscale)
    ...-03022.tif
A3340-MFOK/   (2276 roll prefixes), same roll layout

There is no Textract JSON, no per-frame sidecar and no index file: OCR lives inside the one roll JSON as a string per frame.
```

Example file: `A3340-MFOK/A3340-MFOK-A0001/A3340-MFOK-A0001-00001.tif is frame 1 of roll A0001 of the Ortsgruppenkartei: 3528 x 4552 px, 1 band uint8, 300 ppi, no compression, 16,060,018 bytes. The roll's A3340-MFOK-A0001/597027523.json lists it as digitalObjects[0] with objectFilename, objectId, objectFileSize, o`

## Open it

- In a hosted notebook with the data mounted: https://scigantic.com/archive/e01223a9-4de8-54e6-a682-1d472a7ff06f
- Full record as JSON (schema card included): https://api.scigantic.com/api/archives/e01223a9-4de8-54e6-a682-1d472a7ff06f
- Over MCP: `get_schema_card` with id `e01223a9-4de8-54e6-a682-1d472a7ff06f` at https://api.scigantic.com/mcp

## Related topics

- [Urban & Civic datasets](https://scigantic.com/topics/urban-and-civic)
