Catalog of Life Local JSON API
Resolving an ID number:
-
URL: /id/<id>
-
Method: GET
-
Query parameters: none
-
Result: single JSON object, including:
- ID number
- full taxon name
- rank
- authority
- array of children
- array of synonyms
- higher taxa
-
Example:
/id/1209232
Looking up a specific taxon name:
-
URL: /find
-
Method: GET
-
Query parameters:
-
query: the taxon name to find (required)
-
rank: the rank of the taxon (optional, alternative to fromRank and toRank if the latter two are equal)
-
fromRank: the highest rank to consider (optional, defaults to 'kingdom')
-
toRank: the lowest rank to consider (optional, defaults to 'subForm')
-
prefix: consider taxon records whose epithets start with the specified query instead of exactly matching it? (optional, defaults to false, indicating an exact match)
-
matchCase: match taxon record epithets case sensitive against the query? (optional, defaults to true, indicating a case sensitive match)
-
synonyms: consider taxon records flagged as synonyms? (optional, defaults to false, restricting results to valid taxa only)
-
includeHigher: include higher taxa of lookup results? (optional, defaults to false, only returning the ID number of the parent taxon record in results)
-
expandLinked: include higher taxa, children, and synonyms as objects rather than plain ID numbers? (optional, defaults to false, only returning ID numbers for taxon records linked to results)
-
Result: JSON array of objects, each object including:
- ID number
- full taxon name
- rank
- authority
- array of children (as ID numbers or objects, as indicated by the value of expandLinked)
- array of synonyms (as ID numbers or objects, as indicated by the value of expandLinked)
- higher taxa (if includeHigher is set to true, as ID numbers or objects, as indicated by the value of expandLinked)
-
Example:
/find?query=Cephalotes&prefix=true&matchCase=true&includeHigher=true&expandLinked=false
Searching for a taxon name (via full text index):
-
URL: /search
-
Method: GET
-
Query parameters:
-
query: the taxon name to find (required)
-
prefix: consider taxon records whose epithets start with the specified query instead of exactly matching it? (optional, defaults to false, indicating an exact match)
-
matchCase: match taxon record epithets case sensitive against the query? (optional, defaults to true, indicating a case sensitive match)
-
synonyms: consider taxon records flagged as synonyms? (optional, defaults to false, restricting results to valid taxa only)
-
includeHigher: include higher taxa of lookup results? (optional, defaults to false, only returning the ID number of the parent taxon record in results)
-
expandLinked: include higher taxa, children, and synonyms as objects rather than plain ID numbers? (optional, defaults to false, only returning ID numbers for taxon records linked to results)
-
Result: JSON array of objects, each object including:
- ID number
- full taxon name
- rank
- authority
- array of children (as ID numbers or objects, as indicated by the value of expandLinked)
- array of synonyms (as ID numbers or objects, as indicated by the value of expandLinked)
- higher taxa (if includeHigher is set to true, as ID numbers or objects, as indicated by the value of expandLinked)
-
Example:
/search?query=Cephalotes&prefix=true&matchCase=true&includeHigher=true&expandLinked=false