Query the HmtVar database for specific variants using our Application Programming Interface (API).

HmtVar allows to retrieve variants using either the Query page or the API. The API is most suited for users needing to access and download our data in a programmatic manner, since it is able to return one or multiple results in a JSON format for easy parsing. An interactive interface for the API is available at the HmtVar basic API page.

Request format

Requests to the HmtVar API can be made to https://www.hmtvar.uniba.it/api/main/, and can accept the following arguments:

  • position/<nt_pos> - variants located in the given position; can also accept a list of positions (separated with ,) or a range of positions (separated with -)
  • mutation/<mut> - one or more specific variants; the <mut> parameter can be formatted as follows:
    • [ref][pos][alt], to retrieve a specific variant with the given reference allele, position and alternate allele
    • [pos][alt], to retrieve a specific variant with the given position and alternate allele
    • [ref][pos], to retrieve all available variants starting with the given reference allele and position
  • locus/<loc> - variants located in the given locus
  • pathogenicity/<patho> - variants with the given pathogenicity prediction (accepted values are pathogenic, polymorphic, likely_pathogenic, likely_polymorphic)

Output format

When returning a single variant, the API will provide the complete set of available information about that specific variant (the same information that can be accessed and downloaded via the Download Data tab of each variant's VariantCard).

When returning a list of variants, each entry will report the URL to access the variant's complete data, as well as a limited set of basic information about each variant found.

For example, in order to retrieve all information about the T3308A, it is possible to launch a GET request to https://www.hmtvar.uniba.it/api/main/mutation/T3308A.

RD-Connect compliant API

RD-Connect is a comprehensive platform that integrates databases, patient registries, data analysis tools and biobanks for rare disease research. In order to collect and integrate data from a broad range of bioinformatic resources, RD-Connect has established a common API that data providers can adopt; using a set of standardised arguments for API calls, RD-Connect is then able to retrieve, parse, integrate and redistribute third-party data. To further distribute mitochondrial variant information, HmtVar also offers a second form of API in addition to that previously described, created to be compliant with the RD-Connect platform specifications.

Variants data can be retrieved with a GET request to https://www.hmtvar.uniba.it/rdconnect? using one or more of the following arguments to search for specific data, joining them with &:

  • gene_symbol=<string>, to retrieve variants located in the given mitochondrial gene
  • gene_id=<string>, to retrieve variants located in the given mitochondrial gene id
  • variant_start=<int>, to retrieve variants starting in the given mitochondrial position
  • variant_end=<int>, to retrieve variants involving more than one nucleotide and ending in the given mitochondrial position
  • variant_referenceBases=<char>, to retrieve variants for which the reference nucleotide is the given nucleotide
  • variant_alternateBases=<char>, to retrieve variants with the given alternate allele

Requests to this API will return a JSON-formatted string containing a "success" key, with a value that can be either "true", if the requested data are available on HmtVar, or "false" otherwise, and an "url" key which reports the permanent link to the corresponding HmtVar Variant Card.