We provide access to our data via a set of Web services APIs. 


Chances are that you are willing to use the data we host in new ways, such as combining it with information from other domains, you are not limited by our out of the box systems and tools.


Most of our APIs use REST conventions and support JSON as data format.


You can see the list of available service calls at https://api.ala.org.au/ 


We are also working on enabling Swagger as an API documentation tool. Go to the list below for details

Examples

The following examples use curl to demonstrate the use of the ALA API.


Occurrence Search

The call below uses the Biocache occurrence search service to look for occurrences of the term Macropus rufus (commonly known as Red Kangaroo). The  unusual page Size of 1 is used only to limit the output for this example.


curl https://biocache.ala.org.au/ws/occurrences/search?q=Macropus+rufus&pageSize=1


The output should look similar to the one below.

{    
"pageSize": 1,
"startIndex": 0,    
"totalRecords": 47776,    
"sort""score",    
"dir""asc",    
"status""OK",    
"occurrences": [{       
        "uuid""54cb0ab1-8534-4fc1-8ad4-5ac90f1b3e7e",        
        "raw_catalogNumber""OPM634754-1",        
        "taxonConceptID""urn:lsid:biodiversity.org.au:afd.taxon:e6aff6af-ff36-4ad5-95f2-2dfdcca8caff",        
        "eventDate": 1342706400000,        "occurrenceYear": 1325336400000,        
        "scientificName""Osphranter rufus",        
        "vernacularName""Red Kangaroo",        
        "taxonRank""species",        
        "taxonRankID": 7000,        
        "country""Australia",        
        "kingdom""Animalia",    
        "phylum""Chordata",        
        "classs""Mammalia",        
        "order""Diprotodontia",        
        "family""Macropodidae",        
        "genus""Osphranter",        
        "genusGuid""urn:lsid:biodiversity.org.au:afd.taxon:288b19b6-1b3a-4746-aecd-5b2127aa2855",        
        "species""Osphranter rufus",        
        "speciesGuid""urn:lsid:biodiversity.org.au:afd.taxon:e6aff6af-ff36-4ad5-95f2-2dfdcca8caff",        
        "stateProvince""South Australia",        
        "decimalLatitude": -31.375,        
        "decimalLongitude": 140.58,        
        "coordinateUncertaintyInMeters": 5000,        
        "year": 2012,        "month""07",        
        "basisOfRecord""HumanObservation",        
        "left": 104117,        
        "right": 104117,        
        "lga""Unincorporated SA",        
        "dataProviderUid""dp32",        
        "dataProviderName""South Australia, Department for Environment and Water",        
        "dataResourceUid""dr365",        
        "dataResourceName""SA Fauna (BDBSA)",        
        "assertions": [            
                "decimalLatLongConverted",            
                "countryInferredByCoordinates"        
        ],        
        "speciesGroups": [            
                "Animals",            
                "Mammals"       
         ],        
        "geospatialKosher""true",        
        "taxonomicKosher""true",        
        "collector""JENNINGS S. Scott | ARNOLD C. Christine",        
        "collectors": [            
                "Jennings, S. Scott|Arnold, C. Christine"        
        ],        
        "raw_scientificName""Macropus rufus",        
        "raw_basisOfRecord""HumanObservation",        
        "raw_vernacularName""Red Kangaroo",        
        "latLong""-31.375,140.58",        
        "point1""-31,141",        
        "point01""-31.4,140.6",        
        "point001""-31.38,140.58",        
        "point0001""-31.375,140.58",        
        "point00001""-31.375,140.58",        
        "namesLsid""Osphranter rufus|urn:lsid:biodiversity.org.au:afd.taxon:e6aff6af-ff36-4ad5-95f2-2dfdcca8caff|Red Kangaroo|Animalia|Macropodidae",        
        "miscStringProperties": {            
                "identification_qualifier_s""Not provided",            
                "occurrence_status_s""present"        
        },        
        "miscIntProperties": {            
                "occurrence_decade_i": 2010        
        }    
}],    
"facetResults": [],    
"query""?q=Macropus%20rufus",   
 "urlParameters""?q=Macropus%20rufus",   
 "queryTitle""<span class='lsid' id='urn:lsid:biodiversity.org.au:afd.taxon:e6aff6af-ff36-4ad5-95f2-2dfdcca8caff'>SPECIES: Osphranter rufus</span>",    
"activeFacetMap": {}
}


Map Occurrence

Using the same search criteria as above, using the map density service we can generate an image with the occurrences for Red Kangaroos. 


curl -o map.png https://biocache.ala.org.au/ws/density/map?q=Macropus+rufus


The command above will generate a file map.png that will resemble the image below.

If you want to see more examples and want to see some client code, go to biocache-tests GitHub project.