Current View: All Antweb
Change View
Cite this page

Citing AntWeb

X

To cite this page, please use the following:

· For print: . Accessed

· For web:



AntWeb API Version 3 (beta)

Version 2 is [here]

AntWeb.org is the world's largest online database of images, specimen records, and natural history information on ants. It is community driven and open to contribution from anyone with specimen records, natural history comments, or images.

This API allows for programatic access to the Antweb database, making the antweb data available to the public in an Json format.

NOTE: To prevent encumbering the server. Large requests may not be fulfilled. Using limits and offsets is encouraged.

There are different ways to use the api, documented below...
  Specimens
  Specimens (with Geolocation)
  Taxa
  Distinct Taxa
  Recent Images
  Taxa Images
  Geolocales



Specimens


Function: Query for a specific supset of specimens.

Parameters:

Subfamily Return only specimens of a specific subfamily.
Genus Return only specimens of a specific genus.
Species Return only specimens of a specific species.
Code The unique identifier of a particular specimen on Antweb (?code=inb0003695883)
Country This uses a wildcard so a query for ?country=land will return any country containing the word land (e.g. England, Ireland etc)
Habitat This uses a wildcard so a query for ?habitat=sand will return any habitat containing the word sand (e.g. sandstone)
Type (e.g. holotype), this is a wildcard
Georeferenced This is a boolean argument to filter for only geo referenced specimen (?georeferenced=true)
Bbox This is a bounded box of decimal coordinates in the format ?bbox=x1,y1,x2,y2
Min Date Query for specimen identified on or after a single date (?minDate=yyyy-mm-dd)
Max Date Query for specimen identified on or before a single date (?maxDate=yyyy-mm-dd)
Min Elevation This is measured in meters. Query on specimen found at or above a specific elevation (?minElevation=1200)
Max Elevation This is measured in meters. Query on specimen found at or below a specific elevation (?maxElevation=1200)
Museum Return only specimens of a specific museum (museum=CASC)
Owned By Return only specimens of a specific Owner (ownedby=NHMW, Vienna, Austria)
Located At Return only specimen of a specific location (locatedat=JTLC)
Collected By Return only specimen collected by (collectedby=J. Longino)
Limit Limit the number of specimen returned on large requests (limit=100)
Offset Used to paginate large requests when paired with the limit argument (?limit=100&offset=300 would return records 301-400)

Examples:




Specimens (by Geolocation)


Function: Query for specimen near a coordinate point.

Parameters:

Coords Return a list of specimens by decimal coordinates. (?coords=lat,lon)
Radius Define a specific radius in kilometers (if radius is not defined it will default to 5km). (?coord=latitude,longitude&radius=3)
Limit Limit the number of specimen returned on large requests (?limit=100)
Offset Used to paginate large requests when paired with the limit argument (?limit=100&offset=300 would return records 301-400)
Distinct You can select a list of distinct species, genus or subfamilies in the area. (?coord=latitude,longitude&r=radius&distinct=rank)

Examples:




Distinct Taxa


Function: Query for a list of distinct names for a taxonomic rank.

Parameters:

Rank Return a list of unique names for a given rank. (?rank=genus)
Country This uses a wildcard so a query for ?country=land will return any country containing the word land (e.g. England, Ireland etc)
Habitat This uses a wildcard so a query for ?habitat=sand will return any habitat containing the word sand (e.g. sandstone)
Min Date Query for specimen identified on or after a single date (?minDate=yyyy-mm-dd)
Max Date Query for specimen identified on or before a single date (?maxDate=yyyy-mm-dd)
Min Elevation This is measured in meters. Query on specimen found at or above a specific elevation (?minElevation=1200)
Max Elevation This is measured in meters. Query on specimen found at or below a specific elevation (?maxElevation=1200)
Limit Limit the number of specimen returned on large requests (?limit=100)
Offset Used to paginate large requests when paired with the limit argument (?limit=100&offset=300 would return records 301-400)

Examples:




Images


Function: Query for images in the antweb database.

Parameters:

Since Return a list of images recently added to antweb, measured in days. (?since=7 returns all images added in the last 7 days)
Shot Type Specify which images you would like to see. H = head shots, D = dorsal shots, P = profile shots and L = labels. (?since=7&shotType=h returns all head shots added in the last 7 days)
Code The unique identifier of a particular specimen on Antweb (?code=inb0003695883)
Limit Limit the number of specimen returned on large requests (?limit=100)
Offset Used to paginate large requests when paired with the limit argument (?limit=100&offset=300 would return records 301-400)

Examples:




Taxa


Function: Query for taxa (subfamily, genus, species, subspecies).

Parameters:

Taxon Name Antweb unique identifier for a particular taxon
Subfamily Query on a particular subfamily
Genus Query on a particular genus
Species Query on a particular species

Examples:
   http://api.antweb.org/v3/taxa?taxonName=myrmicinaecrematogaster modiglianii
   http://api.antweb.org/v3/taxa?subfamily=myrmicinae&rank=subfamily
   http://api.antweb.org/v3/taxa?genus=camponotus&rank=genus




Taxa Images


Function: Query for images of specified taxa.

Parameters:

Taxon Name Show all images of taxa using Antweb specific unique identifier for a given taxon
Subfamily Query for images for a given subfamily.
Genus Query for images for a given genus.
Species Query for images for a given species.
Subspecies Query for images for a given subspecies.
Code The unique identifier of a particular specimen on Antweb (?code=inb0003695883)
UID Antweb specific unique identifier of a given image.
Shot Type Specify which images you would like to see. H = head shots, D = dorsal shots, P = profile shots and L = labels. (?since=7&shotType=h returns all head shots added in the last 7 days)
Limit Limit the number of specimen returned on large requests (?limit=100)
Offset Used to paginate large requests when paired with the limit argument (?limit=100&offset=300 would return records 301-400)

Examples:
   http://api.antweb.org/v3/taxaImages?taxonName=myrmicinaecataulacus oberthueri
   http://api.antweb.org/v3/taxaImages?subfamily=Myrmicinae&limit=500
   http://api.antweb.org/v3/taxaImages?genus=Cataulacus&limit=50
   http://api.antweb.org/v3/taxaImages?species=oberthueri&limit=50
   http://api.antweb.org/v3/taxaImages?imageId=22777
   http://api.antweb.org/v3/taxaImages?code=casent0435930




Geolocales


Function: Query for Geolocales (Region, subregion, country, adm1).

Parameters:

ID Antweb unique identifier for a particular geolocale
Name Name of the particular geolocale (name="California")
Parent The name of the geolocale's parent (parent=United States)
Georank Query according to georank (region, subregion, country, adm1 [state/province], adm2 [county]) (georank=adm1)

Examples:




Geolocale Taxa


Function: Query for taxa (subfamily, genus, species, subspecies) found in given geolocations (region, subregion, country, adm1, adm2).

Parameters:

Geolocale ID Antweb unique identifier for a particular geolocale
Geolocale Name Query on the antweb unique name for geolocale
Geolocale Rank Query on the antweb unique geolocale rank
Region Query on the region (Africa, Americas, Asia, Europe, Oceania, Antarctica_region)
Subregion Query on the subregion
Country Query on the country
Adm1 Query on the adm1
Taxon Name Antweb unique identifier for a particular taxon
Taxon Rank Query on the taxon rank (subfamily, genus, species [will return species and subspecies], subspecies)
Subfamily Query on a particular subfamily
Genus Query on a particular genus
Species Query on a particular species
Status Query on a particular taxon status (valid, morphotaxon, ...)

Examples: