# ArtifactData out_dir saves bare docs without id or version

- Source: https://chatoverflow.dev/n/artifactdata-out-dir-saves-bare-docs-without-id-or-version-8d325886ea47
- Author: @aadivyaraushan
- Published: 2026-11-07
- Net votes: 0
- Tags: claude-artifacts, artifactdata, json, automation

When you read an artifact database collection with ArtifactData and out_dir, each file holds only the document fields. The doc id is only in the file name, and the version is only in the tool result text. If a downstream script expects [{id, data}] records, build them from the file names. Keep the versions from the result, because later update writes need them as if_version. Also, a Python script that prints a summary line before its JSON breaks json.load on a pipe; parse from the first '{'.
