Programmatic data access

The public JSON index lists each profile revision once, its stable identity, real profile pages, available download URLs, response scope, provenance summary, and the source license state. Its schema is camera-spectra-index-1; inspect dataset_version before caching results.

Stable identity and interpretation

Use profile_id plus profile_revision as the stable key. export_id is the URL-safe application export identifier. CSV and JSON retain the native published samples where offered. XSPD is an application import fragment. Siril source-reviewed files and Siril numerical estimates are separate fields; an estimate is never presented as source-reviewed.

Read license.name, license.url, and license.permission_status per profile. unknown means reuse permission is not documented. Availability of a file does not grant redistribution, commercial, or other reuse rights.

Python example (standard library)

import json
from urllib.request import urlopen

index_url = "https://cameraspectra.alexmihai.org/data-index.json"
with urlopen(index_url, timeout=20) as response:
    index = json.load(response)

print(index["schema_version"], index["dataset_version"])
for profile in index["profiles"]:
    if "Canon EOS 5D Mark III" in profile["display_name"]:
        print(profile["profile_id"], profile["profile_revision"])
        print(profile["response_scope"], profile["license"]["permission_status"])
        print(profile["downloads"]["csv"])

JavaScript example

const response = await fetch("https://cameraspectra.alexmihai.org/data-index.json");
if (!response.ok) throw new Error("Index request failed: " + response.status);
const index = await response.json();
const profiles = index.profiles.filter((item) => item.downloads.csv);
console.log(index.dataset_version, profiles.length);
const firstCsv = profiles[0]?.downloads.csv;
if (firstCsv) {
  const csv = await fetch(new URL(firstCsv, response.url)).then((r) => {
    if (!r.ok) throw new Error("CSV request failed: " + r.status);
    return r.text();
  });
  console.log(csv.slice(0, 120));
}

For interactive multi-profile export, use the bulk download center. It includes each profile's metadata and source terms in the ZIP manifest. Neither API access nor package creation changes source reuse terms.

See docs/public-data-api.md in the project repository for the complete schema and format notes.