Geochron REST API Documentation
The Geochron REST Search Service accepts GET string variables which determine search criteria.


The target URL for the Geochron REST Search Service is:

https://www.geochron.org/restsearchservice

Usage of GET Variables:


polygon
This field allows a polygon to be provided in order to constrain results geographically. The polygon must be provided in a closed format of comma-delimited coordinate pairs.
Example:
-109.35 36.7875,-105.525 40.725,-104.5125 37.0125,-107.1 35.4375,-109.35 36.7875
north
Northern bound of a geographic envelope used to constrain results geographically.
If a northern bound is provided, an east, south, and west value must also be provided.
east
Eastern bound of a geographic envelope used to constrain results geographically.
If an eastern bound is provided, a south, west, and north value must also be provided.
south
Southern bound of a geographic envelope used to constrain results geographically.
If a southern bound is provided, a west, north, and east value must also be provided.
west
Western bound of a geographic envelope used to constrain results geographically.
If a western bound is provided, a north, east, and south value must also be provided.
minage
Minimum age of the sample.
maxage
Maximum age of the sample.
age
Age of the sample.
ageoffset
When age is provided, the is the age offset. i.e. 123 +- .5 where .5 is the age offset.
uniqueid
Unique identifier of sample.
sampleid
Sample ID assigned by analyst.
collector
Name of person who collected sample.
sampledescription
Description of sample provided by analyst.
collectionmethod
Method by which sample was collected.
samplecomment
Comment provided by analyst.
primarylocationname
Name of location where sample was collected.
primarylocationtype
Type of location.
locationdescription
Description of location where sample was collected.
locality
Locality where sample was collected.
localitydescription
Description of Locality.
country
Country where sample was collected.
province
Province where sample was collected.
searchtype
Desired type of search query. Possible values are "count", "rowdata", and "distinctitems"

count: returns count of results from query.
rowdata: returns table of results from query in the format of "outputtype" below.
outputtype
Desired output type from query. Possible values are "html", "csv", "xml", "json", "jsonp" and "staticmap".

html: returns HTML table of results from query.
csv: returns CSV table of results from query.
xml: returns XML document of results from query.
json: returns JSON document of results from query.
jsonp: returns JSON string wrapped in a Javascript function call defined by "jsonpfunction" below:
staticmap: returns map image of results from query.

Please note: When a searchtype of "count" is set, "html", "csv", and "staticmap" will return a plaintext integer count of samples from the query.
jsonfunction
Desired Javascript function to be wrapped around JSON in the event that "outputtype" is set to "jsonp"
outputrows:start/end
These values determine which rows of query will be displayed. The first row is always 0 and the last row is always the count value minus 1 (n-1).

Important: A maximum of 50 rows are allowed to be displayed at a time. Any start/end values that exceed a difference of 50 will result in the start value and start value + 50 values being displayed. If start/end values are not provided, rows 0-49 will be displayed.
showcolumnnames
Control display of column names in CSV and HTML output modes. Possible values are yes and no. Default value is no.
Example 1:
Show html output for samples matching lab "Arizona Geochron". Show column Names in HTML.

HTTP Link:

https://www.geochron.org/restsearchservice?laboratory=Arizona%20Geochron&searchtype=rowdata&outputtype=html&showcolumnnames=yes
Example 3:
Show static map of samples between 0 and .5 Ma in the western United States.

HTTP Link:

https://www.geochron.org/restsearchservice?north=49&east=-100&south=23&west=-124&minage=0&maxage=.5&ageunit=ma&outputtype=staticmap