AntWeb API

This is an attempt to make the antweb data available to the public in an accessible format.

There are 4 ways to query specimen: By taxonomy, by specimen code, by decimal coordinates and by days since entry into database.

NOTE: While this api is meant to be a firehose of sorts, there is a timeout set to prevent encumbering the server. Large requests may not be fulfilled.

Check out some examples below.

1. Get specimens by taxonomy rank and name.

A. You can query the specimen by asking for a particular taxonomic rank and name of that rank. So if you want all specimens of the genus Colobostruma your query would look like this:

B. If you do not specify a particular name of the rank you want, the API will return a list of distinct names for that rank. You can query for distinct subfamlies, genus or species. So if you want a list of disctinct subfamilies in the antweb database your query would look like this:

NOTE: Querying for name alone will yield no results.

C. If you would like to find all specimen of a particular species belonging to a particular genus you can enter a query like this:

If you only enter a genus or a species then the query will behave the same as using the rank and name method:

Is the same as:

2. Get particular specimen using its unique code.

Each specimen is given a unique id in the antweb database, if you have a specific specimen you would like to look up you can query for it like this:

For example, here is the query for specimen casent0104669:

This will return all of the meta data surrounding the specimen, as well as a list of URLs for any images of the specimen.

3. Get specimens by decimal coordinates.

You can pull a list of specimens by decimal coordinates. Your query would look like this:

The latidude and longitude must be separated by a comma.

You can also define a specific radius in kilometers that you'd like to cover:

The radius defaults at 5 km.

Here is the query for all specimen collected within a 2 km radius of the California Academy of Sciences.

4. Get latest specimens or images

You can pull a list of either the latest specimens or images that have been added to the database.

To get a list of the latest specimens, query for the number of days in the past you'd like to go. So if you'd like a list of specimens added in the last week, your query would look like this:

If you would like to get the images added in the last week, just add an argument that qualifies you are looking for images:

If you would like to find only images of a certain type add an argument for the type of image you are looking for.

There are four types of images:

So your query would look like this if you wanted only head shots from the last week:


1. Taxonomy sunburst visualization

2. What’s your ant name?

3. Discover which specimens were collected nearby - Note: you must view this example on a device with location services enabled.