Optical Spectra Data Access API

The Optical Spectrum View page, which plots the flux and displays information about a spectrum, can be accessed directly with the PLATEID, MJD, and FIBERID of the spectrum of interest:

e.g., https://dr16.sdss.org/optical/spectrum/view/?plateid=4055&mjd=55359&fiberid=596

This page loads the full plate (e.g. PLATEID=4055) for that mjd (e.g. MJD=55359), with the interactive spectrum view starting with the fiberid (e.g. FIBERID=596), or the first fiberid (FIBERID=1) if unspecified, and the ability to download the lite or full fits-format spectrum by clicking the filename (e.g. spec-4055-55359-0596.fits).

To download a spectrum directly using the API, use:

e.g., https://dr16.sdss.org/optical/spectrum/view/data/format=fits/spec=lite?plateid=4055&mjd=55359&fiberid=596

where 'FORMAT' should be replaced by either fits or csv; and SPEC should by replaced by either lite (default) or full.

Alternatively (faster), you may download lite or full version of the spectrum directly by using the URL of the flat file on the SAS:

e.g., https://dr16.sdss.org/sas/dr16/eboss/spectro/redux/v5_13_0/spectra/lite/4055/spec-4055-55359-0596.fits

The details of the file format are in the data model. More information on accessing these files can be found on the SDSS bulk data access pages.

Optical API Access Arguments

Should be replaced by the appropriate survey (currently either 'sdss' for DR8, 'boss' for DR9 through DR12, or 'eboss' for DR13 and later)
Should be replaced by the reduction number.
Should be replaced by the zero-padded, 4-digit plate number.
Should be replaced by the MJD number.
Should be replaced by the zero-padded, 4-digit fiber number.