Sloan Digital Sky Survey
SkyServer DR12  
Not logged in Login Help
 

DR12 Help
 Start Here
 FAQ
 Glossary
 Cooking with Sloan
 Tool User Guides
 Contact Help Desk
 
 Searching SDSS-III
 SQL Tutorial
 SQL in SkyServer
 About the Database
 Table Descriptions
 Sample SQL Queries
 Schema Browser
 Searching Advice
 Query Limits
 
 Details of the Data
 Algorithms
 Data Publications
 API/Tools
API and Tools for Programmer's Reference

This page gives quick access to the webservices and links of the tools, which can be called programatically.
First section covers the description of Webservices REST-api and small usage examples.
Second section provides quick links to the tools, showing examples how to construct their URLs.

REST web services

    Table 1: List of REST web services
    WebservicesShort Description
    Image Cutout Returns color images at given location. There are two resources /getJpeg and /getJpegCodec
    VO ServicesServices to search databases using IVOA standards and protocols. /conesearch, /SIAP, /SDSSFields
    Search Returns specific database results. There are three services availble /radial, /rectangular and /sql
    Advanced SearchEquivalent to search tools, there are three services /imagingquery, /spectroquery, /irspectraquery
    Cross-id Upload your own objects for cross-identification

    Web services described above can used either as an authenticated user or anonymous users.
    If user wants to use her own authentication tokens following header parameters needs to be set.
    There are common for all the services listed below.
    Header NamesValues
    X-Auth-Token Keystone token. If omitted, the query will be executed anonymously.

Tools

Note that these web services and tools are the called when the corresponding Skyserver web applications are executed by the user.
You can see the parameters that where used in these cases by reviewing the User History page (if you are already logged-in with Sciserver).


REST Web Services


Image Cutout

There are two resources available under this service.

1. GET or POST /getJpeg

PrametersExpected Values
RaRight Ascention in degrees
DecDeclination in degrees
scaleScale of image in arsec per pixel, 0.4 is default
heightin pixels
widthin pixels
opta string of characters for overlays on image (details below). This is an optional parameter

Code Effect on image
GGrid
LLabel
PPhotoObjs
SSpecObjs
TTargetObjs
OOutline
BBoundingBox
FFields
MMasks
QPlates
IInvertImage

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/ImgCutout/getjpeg?ra=184.9511&dec=-0.8754&scale=0.4&height=512&width=512&opt=GO 

2. GET or POST /getJpegCodec

PrametersExpected Values
RSDSS Run number
CSDSS Camcol number
FSDSS Field number
ZSDSS Zoom number
Example:
http://skyserver.sdss.org/dr12/SkyserverWS/ImgCutout/getJpegCodec?R=1140&C=1&F=120&Z=12

VO Webservices

Following web services are developed on standards and protocols given by International Virtual Observatory Alliance. These services we are supporting as is.

1. Cone Search


GET or POST /conesearch
PrametersExpected Values
RaRight Ascention in degrees
DecDeclination in degrees
srRadius in arcminutes

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/ConeSearch/ConeSearchService?ra=145&dec=34&sr=1

2. SDSS Fields Search


GET or POST /sdssfields This webservices has four resources as below
2.1 /FieldArray
PrametersExpected Values
raRight Ascention in degrees
decDeclination in degrees
radiusRadius in arcminutes
formatoutput file format. E.g. csv,html,xml,json

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/SDSSFields/FieldArray?ra=132&dec=12&radius=10&format=json
2.2 /FieldArrayRect
PrametersExpected Values
raRight Ascention in degrees one corner
decDeclination in degrees one corner
draRight Ascention in degrees other corner
ddecDeclination in degrees other corner
formatoutput file format. E.g. csv,html,xml,json

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/SDSSFields/FieldArrayRect?ra=132&dec=12&dra=0.1&ddec=0.1&format=json

3. SIAP


GET or POST /siap Simple Image Access Protocol is a virtual Observatory protocol, web service gives options to get SDSS images data
3.1 /getSIAPinfoAll
Siap search for all bands. It outputs all fields (images) included in the Region of Interest.
PrametersExpected Values
POSPosition (string with comma seperation) in Right Ascention, Declination in degrees
SIZESize in degrees

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/SIAP/getAllSIAPInfoSIAP/getSIAP?POS=132,12&SIZE=0.1&FORMAT=image/jpeg
3.2 /getSIAP
Get the image access via SIAP.
PrametersExpected Values
POSPosition (string with comma seperation) in Right Ascention, Declination in degrees
SIZESize in degrees
FORMATformat , one of the following values: 'METADATA', 'ALL','GRAPHIC','image/fits', or 'image/jpeg' (string)

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/SIAP/getSIAP?POS=132,12&SIZE=0.1&FORMAT=metadata&bandpass=i
3.3 /getSIAPinfo
Siap search by band name. It outputs all fields (images) included in the Region of Interes
PrametersExpected Values
POSPosition (string with comma seperation) in Right Ascention, Declination in degrees
SIZESize in degrees
FORMATone of the following values: 'METADATA', 'ALL','GRAPHIC', 'image/fits', or 'image/jpeg' (string)
BANDPASS band name, any combination of 'u', 'g', 'r', 'i', 'z' or '*' to get them all in addition to the jpeg mosaic (string)

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/SIAP/getSIAPInfo?POS=132,12&SIZE=0.01&FORMAT=metadata&bandpass=i

Search

1. Radial Search


GET or POST /radialSearch
PrametersExpected Values
RaRight Ascention in degrees
DecDeclination in degrees
radiusRadius in arcminutes
formatoutput file format. E.g. csv,html,xml
whichwaySpecify Equitorial or Galactic
ubandSpecify comma seperated range e.g 0,20. This is an optional parameter for SDSS U band.
gbandSpecify comma seperated range e.g 0,20. This is an optional parameter for SDSS G band.
rbandSpecify comma seperated range e.g 0,20. This is an optional parameter for SDSS R band.
ibandSpecify comma seperated range e.g 0,20. This is an optional parameter for SDSS I band.
zbandSpecify comma seperated range e.g 0,20. This is an optional parameter for SDSS Z band.
whichqueryimaging or spectra

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/SearchTools/RadialSearch?ra=258.2&dec=64&radius=4.1&whichway=equitorial&limit=10&format=json&fp=none&uband=0,17&gband=0,15&whichquery=imaging

2. Rectangular Search


GET or POST /radialSearch
PrametersExpected Values
min_raRight Ascention in degrees in one corner
min_decDeclination in degrees in one corner
max_raRight Ascention in degrees in other corner
max_decDeclination in degrees in other corner
radiusRadius in arcminutes
formatoutput file format. E.g. csv,html,xml,json
searchtypeSpecify Equitorial or Galactic
ubandSpecify comma seperated range e.g 0,20. This is an optional parameter for SDSS U band.
gbandSpecify comma seperated range e.g 0,20. This is an optional parameter for SDSS G band.
rbandSpecify comma seperated range e.g 0,20. This is an optional parameter for SDSS R band.
ibandSpecify comma seperated range e.g 0,20. This is an optional parameter for SDSS I band.
zbandSpecify comma seperated range e.g 0,20. This is an optional parameter for SDSS Z band.
whichqueryimaging or irspectra
limitnumber of output rows

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/SearchTools/RectangularSearch?min_ra=250.2&max_ra=250.5&min_dec=35.1&max_dec=35.5&searchtype=equitorial&limit=10&format=json&whichquery=irspectra

3. SQL Search


GET or POST /sqlSearch
PrametersExpected Values
cmdSQL query
formatoutput file format. E.g. csv,html,xml,json
searchtypeSpecify Equitorial or Galactic
whichqueryimaging or irspectra
limitnumber of output rows

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/SearchTools/SqlSearch?cmd=select%20top%2010%20ra,dec%20from%20Frame&format=csv

Advanced Search

1. ImagingQuery Search


GET or POST /ImagingQuery Get the query results on Imaging data from SDSS database.
1.1 /Cone
Conical search on the imaging data.
PrametersExpected Values
limitlimit the number of rows in result
formatresult format
ra, decsky cordinates to search
radiussearch radius in arcmin
u,g,r,i,zmagnitudes of the objects in the SDSS
ug,gr,ri,izmagnitudes of the objects in the SDSS
objTypeTo select star or galaxy
magTypemagnitudes of the objects in the SDSS
imgparams imaging parameters
specparamsspectroscopy parameters
flagsobject flags

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/ImagingQuery/Cone?limit=50&format=csv&imgparams=minimal&specparams=none&ra=10&dec=0.2&radius=5.0&magType=model
1.2 /NoPosition
Search imaging data with no positional constraints.
PrametersExpected Values
limitlimit the number of rows in result
formatresult format
u,g,r,i,zmagnitudes of the objects in the SDSS
ug,gr,ri,izmagnitudes of the objects in the SDSS
objTypeTo select star or galaxy
magTypemagnitudes of the objects in the SDSS
imgparams imaging parameters
specparamsspectroscopy parameters
flagsobject flags

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/ImagingQuery/NoPosition?format=html&limit=30&izMin=3&izMax=4&riMin=&riMax=&flagsonlist=BRIGHT,EDGE&magType=model&uMin=0
1.3 /Proximity
Only POST method. Proximity query searches objects based on user input coordinates.
PrametersExpected Values
limitlimit the number of rows in result
formatresult format
u,g,r,i,zmagnitudes of the objects in the SDSS
ug,gr,ri,izmagnitudes of the objects in the SDSS
objTypeTo select star or galaxy
magTypemagnitudes of the objects in the SDSS
imgparams imaging parameters
specparamsspectroscopy parameters
flagsobject flags
radecTextareacomma separated values of (RA,Dec) coordinates of the objects in the first 2 columns. The optional third column is search radius. Column names should be included in the first row.

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/ImagingQuery/Proximity?searchtool=Imaging&limit=50&format=html&imgparams=minimal&specparams=none&raMin=10&decMin=0.20&raMax=10.2&decMax=0.22&positionType=proximity&radecTextarea=ra%2Cdec%2Csep%0D%0A256.443154%2C58.0255%2C1.0%0D%0A29.94136%2C0.08930%2C1.0%0D%0A&searchNearBy=nearest&radiusDefault=1.0
1.4 /Rectangular
PrametersExpected Values
limitlimit the number of rows in result
formatresult format
raMin,raMax,decMin,decMaxsky cordinates to search
radiussearch radius in arcmin
u,g,r,i,zmagnitudes of the objects in the SDSS
ug,gr,ri,izmagnitudes of the objects in the SDSS
objTypeTo select star or galaxy
magTypemagnitudes of the objects in the SDSS
imgparams imaging parameters
specparamsspectroscopy parameters
flagsobject flags

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/ImagingQuery/Rectangular?limit=50&raMin=258&raMax=258.2&decMin=64&decMax=64.1&imgparams=typical,minimal&magType=model&format=csv

2. Spectroquery Search


GET or POST /SpectroQuery Similar to Imaging Query search one can do search on the spectral data. They are divided in four sub positional services. Cone,Rectangular,Proximity,NoPosition etc.
2.1 /Cone
Conical search on the imaging data, main input parameters are ra, dec and radius.
PrametersExpected Values
ra, decsky cordinates to search
radiussearch radius in arcmin
limitlimit the number of rows in result
formatresult format
u,g,r,i,zmagnitudes of the objects in the SDSS
ug,gr,ri,izmagnitudes of the objects in the SDSS
objTypeTo select star or galaxy
magTypemagnitudes of the objects in the SDSS
imgparams imaging parameters
specparamsspectroscopy parameters
flagsobject flags

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/SpectroQuery/ConeSpectro?radius=5.0&dec=0.2&ra=10&uMin=0&uMax=20&objType=doGalaxy,doStar&limit=50&format=csv&specparams=minimal&imgparams=none&redshiftMin=&zWarning=on&redshiftMax=&priFlagsOnList=ignore&priFlagsOffList=ignore&secFlagsOnList=ignore&secFlagsOffList=ignore&magType=model&gMin=&rMin=&iMin=&zMin=&gMax=&rMax=&iMax=&zMax=&ugMin=&grMin=&riMin=&izMin=&ugMax=&grMax=&riMax=&izMax=&minQA=&flagsOnList=ignore&flagsOffList=ignore
2.2 /NoPosition
Search imaging data with no positional constraints.
PrametersExpected Values
limitlimit the number of rows in result
formatresult format
u,g,r,i,zmagnitudes of the objects in the SDSS
ug,gr,ri,izmagnitudes of the objects in the SDSS
objTypeTo select star or galaxy
magTypemagnitudes of the objects in the SDSS
imgparams imaging parameters
specparamsspectroscopy parameters
flagsobject flags

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/SpectroQuery/NoPositionSpectro?limit=30&izMin=3&izMax=4&riMin=&riMax=&flagsonlist=BRIGHT,EDGE&magType=model&uMin=0&format=html
2.3 /Proximity
POST method only Proximity query searches data on user input data.
PrametersExpected Values
limitlimit the number of rows in result
formatresult format
u,g,r,i,zmagnitudes of the objects in the SDSS
ug,gr,ri,izmagnitudes of the objects in the SDSS
objTypeTo select star or galaxy
magTypemagnitudes of the objects in the SDSS
imgparams imaging parameters
specparamsspectroscopy parameters
flagsobject flags

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/SpectroQuery/ProximitySpectro?searchtool=Spectro&limit=50&format=html&imgparams=minimal&specparams=minimal&raMin=10&decMin=0.20&raMax=10.2&decMax=0.22&positionType=proximity&radecTextarea=ra%2Cdec%2Csep%0D%0A256.443154%2C58.0255%2C1.0%0D%0A29.94136%2C0.08930%2C1.0%0D%0A&searchNearBy=nearest&radiusDefault=1.0
2.4 /Rectangular
Rectangular search takes two corners of rectangular area.
PrametersExpected Values
raMin,raMax,decMin,decMaxsky cordinates to search
limitlimit the number of rows in result
formatresult format
u,g,r,i,zmagnitudes of the objects in the SDSS
ug,gr,ri,izmagnitudes of the objects in the SDSS
objTypeTo select star or galaxy
magTypemagnitudes of the objects in the SDSS
imgparams imaging parameters
specparamsspectroscopy parameters
flagsobject flags

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/SpectroQuery/RectangularSpectro?limit=50&raMin=258&raMax=258.2&decMin=64&decMax=64.1&imgparams=typical,minimal&magType=model&format=csv

3. IRSpectra query Search


GET or POST /IRSpectraQuery/ Similar to Imaging Query search one can do search on the spectral data. They are divided in four sub positional services. Cone,Rectangular,Proximity,NoPosition etc.
3.1 /ConeIR
Conical search on the IR Spectra data, main input parameters are ra, dec and radius.
PrametersExpected Values
ra, decsky cordinates to search
radiussearch radius in arcmin
limitlimit the number of rows in result
formatresult format
j,h,k (min and max)IR magnitudes of the objects in the SDSS
jh,hk (min and max)IR colors
snr, vhelio, scatter (min and max)Observational Parameters
Temp,logg,feh,afe (min and max)Stellar Parameters
irspecparamsIR spectroscopy parameters
irTargetflagsAPOGEE_Target flags (on and off list)

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/IRSpectraQuery/ConeIR?limit=50&format=json&irspecparams=typical&ra=271.75&dec=-20.19&radius=5.0&Lcenter=10&Bcenter=0.2&lbRadius=5.0&jMin=&hMin=&kMin=&jMax=&hMax=&kMax=&jhMin=&hkMin=&jhMax=&hkMax=&snrMin=&vhelioMin=&scatterMin=&snrMax=&vhelioMax=&scatterMax=&tempMin=&loggMin=&fehMin=&afeMin=&tempMax=&loggMax=&fehMax=&afeMax=&irTargetFlagsOnList=ignore&irTargetFlagsOffList=ignore&irTargetFlags2OnList=ignore&irTargetFlags2OffList=ignore
3.2 /GalacticIR
Search IR Spectra with galactic coordinates.
PrametersExpected Values
LCenter, BcenterGalactic co-ordinates
lbRadiussearch radius in arcmin
limitlimit the number of rows in result
formatresult format
j,h,k (min and max)IR magnitudes of the objects in the SDSS
jh,hk (min and max)IR colors
snr, vhelio, scatter (min and max)Observational Parameters
Temp,logg,feh,afe (min and max)Stellar Parameters
irspecparamsIR spectroscopy parameters
irTargetflagsAPOGEE_Target flags (on and off list)

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/IRSpectraQuery/GalacticIRIRSpectraQuery/GalacticIR?limit=50&format=csv&irspecparams=typical&Lcenter=10&Bcenter=0.2&lbRadius=5.0&jMin=&hMin=&kMin=&jMax=&hMax=&kMax=&jhMin=&hkMin=&jhMax=&hkMax=&snrMin=&vhelioMin=&scatterMin=&snrMax=&vhelioMax=&scatterMax=&tempMin=&loggMin=&fehMin=&afeMin=&tempMax=&loggMax=&fehMax=&afeMax=&irTargetFlagsOnList=ignore&irTargetFlagsOffList=ignore&irTargetFlags2OnList=ignore&irTargetFlags2OffList=ignore
3.3 /NoPositionIR
No positional constraints.
PrametersExpected Values
limitlimit the number of rows in result
formatresult format
j,h,k (min and max)IR magnitudes of the objects in the SDSS
jh,hk (min and max)IR colors
snr, vhelio, scatter (min and max)Observational Parameters
Temp,logg,feh,afe (min and max)Stellar Parameters
irspecparamsIR spectroscopy parameters
irTargetflagsAPOGEE_Target flags (on and off list)

Example:
http://skyserver.sdss.org/dr12/SkyserverWS/IRSpectraQuery/NoPositionIR?limit=50&format=csv&irspecparams=typical&jMin=&hMin=&kMin=&jMax=&hMax=&kMax=&jhMin=&hkMin=&jhMax=&hkMax=&snrMin=&vhelioMin=&scatterMin=&snrMax=&vhelioMax=&scatterMax=&tempMin=&loggMin=&fehMin=&afeMin=&tempMax=&loggMax=&fehMax=&afeMax=&irTargetFlagsOnList=ignore&irTargetFlagsOffList=ignore&irTargetFlags2OnList=ignore&irTargetFlags2OffList=ignore

Cross-Identification


GET or POST /CrossIDsearch/

You can search for photometric (image) and/or spectroscopic objects using the same cross-id form. You may use POST or GET methods to this URL - the basic form is as follows.

The GET method (example for default crossid page):

        http://skyserver.sdss.org/dr12/SkyserverWS/SearchTools/CrossIdSearch?searchtool=CrossID&searchType=photo&photoScope=nearPrim&photoUpType=ra-dec&radius=0.5&firstcol=1&paste=++name++ra+++++++dec%0D%0A++A1+++195.2++++2.5%0D%0A++A2+++194.5++++2.6%0D%0A++A3+++193.6++++2.8%0D%0A++A4+++-90.1++++-90.051%0D%0A&upload=&uquery=SELECT+%0D%0A+++p.objID%2C+p.ra%2C+p.dec%2C+p.run%2C+p.rerun%2C+p.camcol%2C+p.field%2C%0D%0A+++dbo.fPhotoTypeN(p.type)+as+type%2C%0D%0A+++p.modelMag_u%2C+p.modelMag_g%2C+p.modelMag_r%2C+p.modelMag_i%2C+p.modelMag_z+%0D%0AFROM+%23x+x%2C+%23upload+u%2C+PhotoTag+p%0D%0AWHERE+u.up_id+%3D+x.up_id+and+x.objID%3Dp.objID+%0D%0AORDER+BY+x.up_id%0D%0A%09%09&format=html
	

Tools


Get Frame

http://skyserver.sdss.org/dr12/en/get/frameByRCFZ.ashx?R=1140&C=1&F=120&Z=12 
where R is the Run, C is the CamCol and Z is the Zoom level (Z can be either 12, 25, 50 or 0 (for 100%)), or
 http://skyserver.sdss.org/dr12/en/get/frameById.ashx?id=1237650369404207104&zoom=12 
where id is the fieldId.


Get Scrolling Sky image

http://skyserver.sdss.org/dr12/en/tools/scroll/camcol.aspx?R=1140&C=1&Z=25 
Where R is the Run number , C is the CamCol and Z is the Zoom level. Z can be either 12, 25, 50 or 0 (for 100%).

Spectra Services

1. Get Spectra

http://skyserver.sdss.org/dr12/en/get/specByPF.ashx?P=299489402567026688&F=25  
where P is the Plate and F is the Fiber, or
http://skyserver.sdss.org/dr12/en/get/specById.ashx?ID=301889361622886400 
where ID is the SpecObjId.

2. Full Spectral Access

There is a comprehensive web site to access the details of spectra from the SDSS and other surveys (2dF). You can also upload your own spectra.

http://www.voservices.net/spectrum/

This site also has a Filter Profile service and a SOAP interface to the spectrum service described in its documentation page .


Finding Chart

The page, built on top of the Cutout service, creates a Finding Chart, centered on the specified location at a specified scale. Properly formatted finding charts can be sent to the printer. The printed image is always inverted for better looking prints.

You may jump directly to a particular location with the navigation tool using:

http://skyserver.sdss.org/dr12/en/tools/chart/image.aspx?ra=184.9511&dec=-0.8754&scale=0.4&height=512&width=512&opt=GO
where ra is Right Ascension in degrees, dec is Declination in degrees, height and width are in pixels,
scale is the scale of the image in arcsec per pixel, 0.4 is default
opt is a string of characters, as listed above for the cutout service.


Navigate

This page, built from the Cutout service provides easy navigation in the vicinity of a given point on the sky. One can move around by clicking on the frame of the image, or on individual objects. A short list of the basic properties and a magnified thumbnail \ image of the object nearest to the selected point is then displayed.

You may jump directly to a particular location with the navigation tool using:

http://skyserver.sdss.org/dr12/en/tools/chart/navi.aspx?ra=184.9511&dec=-0.8754&scale=0.4&opt=GO
where ra is Right Ascension in degrees, dec is declination in degrees,
scale is the scale of the image in arcsec per pixel, 0.4 is default
opt is a string of characters, as seen above.


Image List

This page, built from the Cutout service, can generate thumbnails of SDSS images based upon a user defined list of object positions. The images are linked to the other tools. The list can also be specified with a query. The page can be called via HTTP POST.
You will need a form such as the following :
<form action="http://skyserver.sdss.org/dr12/en/tools/chart/list.aspx"
method="post">
<TEXTAREA name="paste">
    ra     dec  
159.815 -0.655
161.051  0.152
161.739  0.893
164.090 -0.889
</TEXTAREA>
<input type="submit">
</form>
Basically you must post to the server a field called "paste" which contains the list of thumbnails you require.


Explore

The Explore Tool contains a summary of an object, and interactive links to further detailed properties, like its spectrum or neighbors, etc.
http://skyserver.sdss.org/dr12/en/tools/explore/obj.aspx?id=1237654386268439267
where id is the objId, or
http://skyserver.sdss.org/dr12/en/tools/explore/obj.aspx?ra=180.6&dec=0.2
where ra is Right Ascension in degrees, dec is declination in degrees, or
http://skyserver.sdss.org/dr12/en/tools/explore/obj.aspx?sid=299492151346096128
where sid is the SpecObjId, or
http://skyserver.sdss.org/dr12/en/tools/explore/obj.aspx?mjd=51630&plate=266&fiber=100
where mjd is the modified julian date, plate is the plate and fiber is the fiberid.