In general, any parameter listed on the HTML search
form can be specified in a GET request. If you are parsing
the results, it would be easier and probably faster, to request
the search results in CSV or VOTable format using the "outputformat" parameter.
Mission search examples:
Search the HST archive for observations within the specified radius
(in arcminutes), centered on the given RA and Dec values (in decimal
degrees), allow a maximum of 1000 records, and output the default columns
as comma-separated values:
(Try it)
http://archive.stsci.edu/hst/search.php?RA=53.084&DEC=-27.873&radius=100.
&max_records=1000&outputformat=CSV&action=Search
Search the HST archive for pep_id 9293, allow a maximum of 1000 records, and output results
as comma-separated values:
(Try it)
http://archive.stsci.edu/hst/search.php?sci_pep_id=9293
&max_records=1000&outputformat=CSV&action=Search
Search HST as above, but return results in VOTable format
(Try it)
http://archive.stsci.edu/hst/search.php?sci_pep_id=9293
&max_records=1000&outputformat=VOTable&action=Search
Search HUT database for observations of M81 and return only columns for target name and data id:
(Try it)
http://archive.stsci.edu/hut/search.php?action=Search&target=m+81
&selectedColumnsCsv=hut_target_name,hut_data_id
Search the ACS Pointings table for the target "M 81", output format = "CSV",
and more than 11 exposures in the U band:
(Try it)
http://archive.stsci.edu/pointings/search.php?pnt_ucount=%3C11&target=m+81
&primary=ACS&outputformat=CSV&action=Search+Pointings
Notes:
Be sure to include "action=Search" (with capital S) in the mission searches,
but not for SCS or SIAP requests.
Parameter order is not important.
Use a comma separated list for selected columns with the
selectedColumnsCsv parameter. Don't use selectedColumnsList as
seen from the search form.
Parameters such as resolver=don'tresolve should probably
be encoded to be resolve=don%27tresolve. It seems to work without it
though. (See PHP command called urlencode).
There is currently a 300 second execution time limit on archive.stsci.edu
which can cause large search requests to abort. Contact MAST if you run
into this problem.
MAST missions can also be searched using the
NVO Simple Cone Search protocol (SCS).
The base url is the same as for MAST mission searches
(i.e., http://archive.stsci.edu/[data_set]/search.php)
without the "action=Search" parameter.
The search radius parameter "SR" must be included in the URL
for the cgi script to recognize a simple cone search is being requested.
Besides the search radius in decimal degrees, RA and DEC parameters are also
required to perform a cone search. The results are returned in VOTable format.
The SCS protocol can be used with any MAST mission and the
general MAST parameters can be included as well.
Examples:
This example will return about 50 HST observations (in VOTable format) at RA,Dec = 53.084,-27.873
and a search radius = 0.01 degrees
http://archive.stsci.edu/hst/search.php?RA=53.084&DEC=-27.873&SR=0.01
Same as above except use a larger search radius (0.02) but only allow a maximum of
100 records to be returned
http://archive.stsci.edu/hst/search.php?RA=53.084&DEC=-27.873&SR=0.02&max_records=100
To find all high level science products at the same coordinates:
http://archive.stsci.edu/hlsp/search.php?RA=53.084&DEC=-27.873&SR=0.01
MAST missions can also be searched using the
NVO Simple Image Access protocol (SIAP).
The base URL is
http://archive.stsci.edu/siap/search.php
followed by the SIAP parameters.
Like the Simple Cone search, the base url is similiar to that for mission searches however
only missions with image data are searchable.
By default, up to 300 entries will
be returned but specifying max_records=nnn can override the default.
Adding the parameter "representative=y" will return only "representative"
images as defined for the MAST scrapbook tool.
Currently the list of instruments, and
High Level Science Products (HLSPs) that can be queried using the SIAP include:
WFPC - HST Wide Field Planetary Camera
WFPC2 - HST Wide Field Planetary Camera 2
NICMOS - HST Near Infrared Camera and Multi Object Spectrometer
STIS - Space Telescope Imaging Spectrograph
FOC - HST Faint Object Camera
ACS - HST Advance Camera Survey
UIT - Ultraviolet Imageing Telescope
UDF - HLSP Ultra Deep Field
HDF - HLSP Hubble Deep Field
HDF_SOUTH - HLSP Hubble Deep Field South
GOODS - HLSP The Great Observatories Origins Deep Survey
TNO - HLSP trans-Neptunian objects
HELIX - HLSP HST Helix Observations
MAOZ_ATLAS - HLSP HST Atlas of Ultraviolet Images of Nearby Galaxies
SIAP Examples:
Search for MAST images at RA+151.0, Dec=+69.0 and a search area of 0.5 degrees:
http://archive.stsci.edu/siap/search.php?POS=151.0,69.0&SIZE=0.5
Find WFPC2 observations at RA,Dec = 53.084,-27.873, format = GIF,
and a rectangular search area 0,05 degrees wide:
http://archive.stsci.edu/siap/search.php?POS=53.08,-27.873
&SIZE=0.05&FORMAT=gif&ID=wfpc2
Find "representative" WFPC2 observations as above:
http://archive.stsci.edu/siap/search.php?representative=y&POS=53.08,-27.873
&SIZE=0.05&FORMAT=gif&ID=wfpc2