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.1


Version 3.0 is [here]
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.

Global Parameters (available for all api, where applicable):

Limit Limit the number of specimen returned on large requests (&limit=100). Default is 10,000.
Offset Used to paginate large requests when paired with the limit argument (?limit=100&offset=300 would return records 301-400)
Ndjson Results will be formatted in ndjson format for use with Elasticsearch (&ndjson=true)

There are the different ways to access the api, documented below...
  Specimens
  Specimens (with Geolocation)
  Taxa
  Distinct Taxa
  Images
  Taxa Images
  Geolocales
  Geolocale Taxa
  Bioregions
  Bioregion Taxa



Specimens


Function: Query for a specific supset of specimens.

Parameters:

family Return only specimens of a specific family.
Subfamily Return only specimens of a specific subfamily.
Genus Return only specimens of a specific genus.
Species Return only specimens of a specific species.
Specimen Code The unique identifier of a particular specimen on Antweb (ex: specimenCode=inb0003695883)
Country This uses a wildcard so a query for ?country=land will return any country containing the word land (ex:. England | Ireland | ...)
Habitat This uses a wildcard so a query for ?habitat=sand will return any habitat containing the word sand (ex: habitat=sandstone)
Type (e.g. holotype), this is a wildcard
Georeferenced This is a boolean argument to filter for only geo referenced specimen (ex: 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 (ex: minDate=yyyy-mm-dd)
Max Date Query for specimen identified on or before a single date (ex: maxDate=yyyy-mm-dd)
Min Elevation This is measured in meters. Query on specimen found at or above a specific elevation (ex: minElevation=1200)
Max Elevation This is measured in meters. Query on specimen found at or below a specific elevation (ex: maxElevation=1200)
Museum Return only specimens of a specific museum (ex: museum=CASC)
Owned By Return only specimens of a specific Owner (ex: ownedby=NHMW, Vienna, Austria)
Located At Return only specimen of a specific location (ex: locatedat=JTLC)
Collected By Return only specimen collected by (ex: collectedby=J. Longino)
Life Stage/Sex Return specimens with life Stage/Sex notes that contain the value (ex: lifeStageSex=ergatogyne)
Caste Return only specimen of specified caste (ex: caste=[male | worker | queen])
Subcaste Return only specimen of specified subcaste (ex: subcaste=[minor | normal])
Fossil Return only specimen that are fossils (ex: fossil=[true | false])
Status Return only specimen that are of taxa that match the status (ex: status=[valid | morphotaxon | ...])
Valid Subfamily Return only specimen that are of taxa that are in valid subfamilies (ex: validSubfamily=true)
Valid Genus Return only specimen that are of taxa that are in valid genera (ex: validGenus=true)
Has Image Return only specimens that have images (ex: hasImage=true)
Geolocale Name Return only specimens that are on the given geolocale species list (ex: geolocaleName=Madagascar)

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)
Distinct You can select a list of distinct species, genus or subfamilies in the area. (?coord=latitude,longitude&r=radius&distinct=rank)

Examples:




Taxa


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

Parameters:

Taxon Name Antweb unique identifier for a particular taxon (&taxonName= )
Rank Query on a particular rank (&rank=[subfamily, genus, species, subspecies])
Subfamily Query on a particular subfamily
Genus Query on a particular genus
Species Query on a particular species
Subspecies Query on a particular subspecies
Status Taxon status (&status=[valid, morphotaxon, ...])

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




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)
Status Taxon status (&status=[valid, morphotaxon, ...])

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)
Specimen Code The unique identifier of a particular specimen on Antweb (?specimenCode=inb0003695883)

Examples:




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 (&taxonName= )
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.
Specimen Code The unique identifier of a particular specimen on Antweb (?specimenCode=inb0003695883)
Image ID Antweb specific unique identifier of a given image (&imageId= )
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)

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




Geolocales


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

Parameters:

Geolocale ID Antweb unique identifier for a particular geolocale (&geolocaleId= )
Geolocale Name Name of the particular geolocale (geolocaleName="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 (geolocaleId= )
Geolocale Name Query on the antweb unique name for geolocale (geolocaleName="California")
Geolocale Rank Query on the antweb unique geolocale rank (&georank=[region, subregion, country, adm1])
Region Query on the region (®ion=[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 (&taxonName= )
Rank Query on the taxon rank (&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:




Bioregions


Function: Query for Bioregions.

Parameters:

Bioregion Name Name of the particular bioregion (&bioregionName=[Afrotropical, Antarctica, Australasia, Indomalaya, Malagasy, Nearctic, Neotropical, Oceania, Palearctic])

Examples:




Bioregion Taxa


Function: Query for taxa (subfamily, genus, species, subspecies) found in given bioregion.

Parameters:

Bioregion Name Query on the antweb unique name for bioregion
Taxon Name Antweb unique identifier for a particular 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

Examples:




Unimaged Geolocale Taxa


Function: Query for taxa (subfamily, genus, species, subspecies) found in given geolocale that are not imaged.

Parameters:

Geolocale Name Query on the antweb unique name for geolocale
Rank Query on the taxon rank (subfamily, genus, species [will return species and subspecies], subspecies)
byCaste Show the castes that are not imaged. (&byCaste=1)

Examples: