This method returns the taxonomic information from the Unipept Taxonomy, for a given NCBI taxon identifier.

Request

The taxonomy method can be used by doing a HTTP POST-request (preferred) or GET-request to http://api.unipept.ugent.be/api/v1/taxonomy. Parameters can be included in the request body (POST) or in the query string (GET). The only required parameter is input[], which takes one or more taxon identifiers.

input

input[] is a required parameter that takes one or more taxon identifiers. Unipept will return the taxonomic information for the given taxa. To pass multiple taxon identifiers, simply add multiple input[] parameters (see example).

extra

extra is an optional parameter and can either be true or false. When not set explicitly, the parameter defaults to false. When the parameter is set to true, Unipept will return the complete lineage for each taxon. See the response section for an overview of the information fields returned.

names

names is an optional parameter and can either be true or false. When not set explicitly, the parameter defaults to false. When both names and extra are set to true, Unipept will return the names of all ranks in the lineage of each organism. Setting only names to true will not result in additional information fields being returned. . See the response section for an overview of the information fields returned.

Performance penalty

Setting names to true has a performance penalty inferred from additional database queries. Do not use this parameter unless the extra information fields are needed.

Response

The organisms associated with the given taxon identifiers are returned as a list of JSON objects. By default, each object contains the following information fields extracted from the UniProt entry and NCBI taxonomy:

  • taxon_id: the NCBI taxon id of the organism
  • taxon_name: the name of the organism
  • taxon_rank: the taxonomic rank of the organism

When the extra parameter is set to true, objects contain additional information about the lineage of the organims extracted from the NCBI taxonomy. The taxon id of each rank in the lineage is specified using the following information fields:

  • superkingdom_id
  • kingdom_id
  • subkingdom_id
  • superphylum_id
  • phylum_id
  • subphylum_id
  • superclass_id
  • class_id
  • subclass_id
  • infraclass_id
  • superorder_id
  • order_id
  • suborder_id
  • infraorder_id
  • parvorder_id
  • superfamily_id
  • family_id
  • subfamily_id
  • tribe_id
  • subtribe_id
  • genus_id
  • subgenus_id
  • species_group_id
  • species_subgroup_id
  • species_id
  • subspecies_id
  • varietas_id
  • forma_id

When both the names and extra parameters are set to true, objects also contain the names for each rank in the lineage using the following information fields:

  • superkingdom_name
  • kingdom_name
  • subkingdom_name
  • superphylum_name
  • phylum_name
  • subphylum_name
  • superclass_name
  • class_name
  • subclass_name
  • infraclass_name
  • superorder_name
  • order_name
  • suborder_name
  • infraorder_name
  • parvorder_name
  • superfamily_name
  • family_name
  • subfamily_name
  • tribe_name
  • subtribe_name
  • genus_name
  • subgenus_name
  • species_group_name
  • species_subgroup_name
  • species_name
  • subspecies_name
  • varietas_name
  • forma_name

Parameters

Name Description
input[]
required

Taxon identifier to search for. Add multiple parameters to search for multiple taxon identifiers.

Value: String
extra
optional

Return additional lineage information fields if true.

Value: Must be true or false (default)
names
optional

Return names of ranks in the lineage if true.

Value: Must be true or false (default)

Examples

Example Retrieve taxonomic information for a given taxon identifier

This example retrieves taxonomic information for the organism Bacteroides fragilis (taxon id 817).

POST
$ curl -X POST -H 'Accept: application/json' api.unipept.ugent.be/api/v1/taxonomy \
-d 'input[]=817'
GET
http://api.unipept.ugent.be/api/v1/taxonomy.json?input[]=817

Response

[
  {
    taxon_id: 817,
    taxon_name: 'Bacteroides fragilis',
    taxon_rank: 'species'
  }
]

Example Retrieve taxonomic information for a given list of taxon identifiers

This example retrieves taxonomic information for the organism Bacteroides fragilis (taxon id 817) and Bacteroides intestinalis (taxon id 329854).

POST
$ curl -X POST -H 'Accept: application/json' api.unipept.ugent.be/api/v1/taxonomy \
-d 'input[]=817' \
-d 'input[]=329854'
GET
http://api.unipept.ugent.be/api/v1/taxonomy.json?input[]=817&input[]=329854

Response

[
  {
    taxon_id: 817,
    taxon_name: 'Bacteroides fragilis',
    taxon_rank: 'species'
  },
  {
    taxon_id: 329854,
    taxon_name: 'Bacteroides intestinalis',
    taxon_rank: 'species'
  }
]

Example Retrieve taxonomic information for a given taxon identifier including its complete lineage

This example retrieves taxonomic information for the organism Bacteroides fragilis (taxon id 817), including its complete lineage.

POST
$ curl -X POST -H 'Accept: application/json' api.unipept.ugent.be/api/v1/taxonomy \
-d 'input[]=817' \
-d 'extra=true'
GET
http://api.unipept.ugent.be/api/v1/taxonomy.json?input[]=817&extra=true

Response

[
  {
    taxon_id: 817,
    taxon_name: 'Bacteroides fragilis',
    taxon_rank: 'species',
    superkingdom_id: 2,
    kingdom_id: null,
    subkingdom_id: null,
    superphylum_id: 68336,
    phylum_id: 976,
    subphylum_id: null,
    superclass_id: null,
    class_id: 200643,
    subclass_id: null,
    infraclass_id: null,
    superorder_id: null,
    order_id: 171549,
    suborder_id: null,
    infraorder_id: null,
    parvorder_id: null,
    superfamily_id: null,
    family_id: 815,
    subfamily_id: null,
    tribe_id: null,
    subtribe_id: null,
    genus_id: 816,
    subgenus_id: null,
    species_group_id: null,
    species_subgroup_id: null,
    species_id: 817,
    subspecies_id: null,
    varietas_id: null,
    forma_id: null
  }
]

Example Retrieve taxonomic information for a given taxon identifier including its complete lineage and names

This example retrieves taxonomic information or the organism Bacteroides fragilis (taxon id 817), including its complete lineage with names.

POST
$ curl -X POST -H 'Accept: application/json' api.unipept.ugent.be/api/v1/taxonomy \
-d 'input[]=817' \
-d 'extra=true' \
-d 'names=true'
GET
http://api.unipept.ugent.be/api/v1/taxonomy.json?input[]=817&extra=true&names=true

Response

[
  {
    taxon_id: 817,
    taxon_name: 'Bacteroides fragilis',
    taxon_rank: 'species',
    superkingdom_id: 2,
    superkingdom_name: 'Bacteria',
    kingdom_id: null,
    kingdom_name: '',
    subkingdom_id: null,
    subkingdom_name: '',
    superphylum_id: 68336,
    superphylum_name: 'Bacteroidetes/Chlorobi group',
    phylum_id: 976,
    phylum_name: 'Bacteroidetes',
    subphylum_id: null,
    subphylum_name: '',
    superclass_id: null,
    superclass_name: '',
    class_id: 200643,
    class_name: 'Bacteroidia',
    subclass_id: null,
    subclass_name: '',
    infraclass_id: null,
    infraclass_name: '',
    superorder_id: null,
    superorder_name: '',
    order_id: 171549,
    order_name: 'Bacteroidales',
    suborder_id: null,
    suborder_name: '',
    infraorder_id: null,
    infraorder_name: '',
    parvorder_id: null,
    parvorder_name: '',
    superfamily_id: null,
    superfamily_name: '',
    family_id: 815,
    family_name: 'Bacteroidaceae',
    subfamily_id: null,
    subfamily_name: '',
    tribe_id: null,
    tribe_name: '',
    subtribe_id: null,
    subtribe_name: '',
    genus_id: 816,
    genus_name: 'Bacteroides',
    subgenus_id: null,
    subgenus_name: '',
    species_group_id: null,
    species_group_name: '',
    species_subgroup_id: null,
    species_subgroup_name: '',
    species_id: 817,
    species_name: 'Bacteroides fragilis',
    subspecies_id: null,
    subspecies_name: '',
    varietas_id: null,
    varietas_name: '',
    forma_id: null,
    forma_name: ''
  }
]

Try it

Use the API explorer form below to call the taxonomy method on live data and see the response.

Request


Response