Skill Tracer
Skills › Scientific Agent Skills › database-lookup › nist.md

nist.md

107 lines · skills/database-lookup/references/nist.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# NIST Data APIs
2

NIST Data APIs

Raw lines 1 to 2
3## Overview
4
5NIST provides several scientific databases. REST API availability varies by dataset.
6

Overview

NIST provides several scientific databases. REST API availability varies by dataset.

Raw lines 3 to 6
7## 1. NIST CODATA Fundamental Physical Constants
8

1. NIST CODATA Fundamental Physical Constants

Raw lines 7 to 8
9### Base URL
10```
11https://physics.nist.gov/cgi-bin/cuu
12```
14**No formal REST API.** Data is served via CGI scripts returning HTML. The constants can be accessed programmatically via structured URLs but responses are HTML, not JSON/XML.
16**Workaround — machine-readable ASCII:**
17```
18https://physics.nist.gov/cuu/Constants/Table/allascii.txt
19```
20Returns a fixed-width ASCII table (with header lines), not a tab-delimited file, of all fundamental constants with values, uncertainties, and units.
22**Individual constant lookup:**
23```
24https://physics.nist.gov/cgi-bin/cuu/Value?{constant_key}
25```
26Example keys: `bohrrada0` (Bohr radius), `c` (speed of light), `h` (Planck constant), `e` (electron charge), `me` (electron mass), `na` (Avogadro number), `k` (Boltzmann constant).
28Example:
29```
30https://physics.nist.gov/cgi-bin/cuu/Value?h
31```
32Returns HTML page. Parse the value from the page content.
34**No API key required. No rate limits documented.**

Base URL

https://physics.nist.gov/cgi-bin/cuu

No formal REST API. Data is served via CGI scripts returning HTML. The constants can be accessed programmatically via structured URLs but responses are HTML, not JSON/XML.

Workaround — machine-readable ASCII:

https://physics.nist.gov/cuu/Constants/Table/allascii.txt

Returns a fixed-width ASCII table (with header lines), not a tab-delimited file, of all fundamental constants with values, uncertainties, and units.

Individual constant lookup:

https://physics.nist.gov/cgi-bin/cuu/Value?{constant_key}

Example keys: bohrrada0 (Bohr radius), c (speed of light), h (Planck constant), e (electron charge), me (electron mass), na (Avogadro number), k (Boltzmann constant).

Example:

https://physics.nist.gov/cgi-bin/cuu/Value?h

Returns HTML page. Parse the value from the page content.

No API key required. No rate limits documented.

Raw lines 9 to 35
Runs code bin/cuu :11
Runs code bin/cuu/Value :24
36## 2. NIST Atomic Spectra Database (ASD)

2. NIST Atomic Spectra Database (ASD)

Raw lines 36 to 37
38### Base URL
39```
40https://physics.nist.gov/cgi-bin/ASD
41```
43**No formal REST API.** Queries are CGI-based, returning HTML. However, machine-readable output is available via specific parameters.
45**Spectral lines query:**
46```
47https://physics.nist.gov/cgi-bin/ASD/lines1.pl?spectra={element}&low_w={min_wavelength}&upp_w={max_wavelength}&unit={unit}&format={format}
48```
50| Parameter | Type | Description |
51|------------|--------|-------------|
52| `spectra` | string | Element symbol or ion (e.g., `H`, `Fe`, `He+I`, `O+II`). |
53| `low_w` | float | Lower wavelength bound. |
54| `upp_w` | float | Upper wavelength bound. |
55| `unit` | int | `0` = Angstroms, `1` = nm, `2` = um. |
56| `format` | int | `0` = HTML, `1` = ASCII, `2` = CSV, `3` = tab-delimited. |
57| `line_out` | int | `0` = all, `1` = only observed, `2` = only Ritz. |
58| `show_obs_wl` | int | `1` = show observed wavelengths. |
59| `show_calc_wl` | int | `1` = show Ritz wavelengths. |
60| `A_out` | int | `1` = include transition probabilities. |
62**Example — Hydrogen lines 3000-7000 Angstroms as CSV:**
63```
64https://physics.nist.gov/cgi-bin/ASD/lines1.pl?spectra=H&low_w=3000&upp_w=7000&unit=0&format=2&line_out=0&show_obs_wl=1&A_out=1
65```
67**Energy levels query:**
68```
69https://physics.nist.gov/cgi-bin/ASD/energy1.pl?spectrum={element}&units={units}&format={format}
70```
72**No API key required. No formal rate limits but automated bulk queries are discouraged.**

Base URL

https://physics.nist.gov/cgi-bin/ASD

No formal REST API. Queries are CGI-based, returning HTML. However, machine-readable output is available via specific parameters.

Spectral lines query:

https://physics.nist.gov/cgi-bin/ASD/lines1.pl?spectra={element}&low_w={min_wavelength}&upp_w={max_wavelength}&unit={unit}&format={format}
ParameterTypeDescription
spectrastringElement symbol or ion (e.g., H, Fe, He+I, O+II).
low_wfloatLower wavelength bound.
upp_wfloatUpper wavelength bound.
unitint0 = Angstroms, 1 = nm, 2 = um.
formatint0 = HTML, 1 = ASCII, 2 = CSV, 3 = tab-delimited.
line_outint0 = all, 1 = only observed, 2 = only Ritz.
show_obs_wlint1 = show observed wavelengths.
show_calc_wlint1 = show Ritz wavelengths.
A_outint1 = include transition probabilities.

Example — Hydrogen lines 3000-7000 Angstroms as CSV:

https://physics.nist.gov/cgi-bin/ASD/lines1.pl?spectra=H&low_w=3000&upp_w=7000&unit=0&format=2&line_out=0&show_obs_wl=1&A_out=1

Energy levels query:

https://physics.nist.gov/cgi-bin/ASD/energy1.pl?spectrum={element}&units={units}&format={format}

No API key required. No formal rate limits but automated bulk queries are discouraged.

Raw lines 38 to 73
Runs code bin/ASD :40
Runs code bin/ASD/lines1.pl :47
Runs code bin/ASD/energy1.pl :69
74## 3. NIST Chemistry WebBook

3. NIST Chemistry WebBook

Raw lines 74 to 75
76### Base URL
77```
78https://webbook.nist.gov/cgi/cbook.cgi
79```
81**No formal REST API.** CGI-based with HTML output. Structured URLs can be used.
83**Search by name:**
84```
85https://webbook.nist.gov/cgi/cbook.cgi?Name={compound}&Units=SI
86```
88**Search by CAS number:**
89```
90https://webbook.nist.gov/cgi/cbook.cgi?ID={cas_number}&Units=SI
91```
93**Search by formula:**
94```
95https://webbook.nist.gov/cgi/cbook.cgi?Formula={formula}&Units=SI
96```
98**JCAMP-DX spectra (machine-readable):**
99```
100https://webbook.nist.gov/cgi/cbook.cgi?JCAMP=C{cas_no_dashes}&Index=0&Type=IR
101```
103Choose a spectrum index from the compound page; not every compound has an IR spectrum. The water request `?JCAMP=C7732185&Index=0&Type=IR` returned JCAMP-DX in the 2026-09-30 public probe.

Base URL

https://webbook.nist.gov/cgi/cbook.cgi

No formal REST API. CGI-based with HTML output. Structured URLs can be used.

Search by name:

https://webbook.nist.gov/cgi/cbook.cgi?Name={compound}&Units=SI

Search by CAS number:

https://webbook.nist.gov/cgi/cbook.cgi?ID={cas_number}&Units=SI

Search by formula:

https://webbook.nist.gov/cgi/cbook.cgi?Formula={formula}&Units=SI

JCAMP-DX spectra (machine-readable):

https://webbook.nist.gov/cgi/cbook.cgi?JCAMP=C{cas_no_dashes}&Index=0&Type=IR

Choose a spectrum index from the compound page; not every compound has an IR spectrum. The water request ?JCAMP=C7732185&Index=0&Type=IR returned JCAMP-DX in the 2026-09-30 public probe.

Raw lines 76 to 104
105## Summary
107NIST databases generally do **not** offer modern REST/JSON APIs. Data access is primarily through CGI endpoints returning HTML or delimited text. For programmatic use, the ASCII/CSV output options from ASD are the most practical. No authentication is required for any NIST endpoint.

Summary

NIST databases generally do not offer modern REST/JSON APIs. Data access is primarily through CGI endpoints returning HTML or delimited text. For programmatic use, the ASCII/CSV output options from ASD are the most practical. No authentication is required for any NIST endpoint.

Raw lines 105 to 107