Allele Frequency Net Database logo

API documentation

Introduction

The Allele Frequency Net Database (AFND) API provides an access to a comprehensive, freely available repository of immune gene frequencies across worldwide populations. Through this API, users can query allele, haplotype, and genotype frequency data, enabling seamless integration of AFND resources into analytical pipelines, applications, and research workflows. The API is designed to support efficient data retrieval while promoting data sharing and collaboration within the scientific community.

How to use the API

1 Choose an available endpoint An endpoint is a specific API address used to request a particular type of information from AFND.
Select the type of information you want to retrieve, such as HLA allele frequencies.
2 Add search criteria
Add an allele, country, region, population, or another available filter to the end of the endpoint to refine your search.
3 Integrate the API
Use the API endpoint in your own application, script, or data analysis workflow to retrieve AFND data programmatically.

Available endpoints

Choose the type of information you want to retrieve.

HLA

Allele frequency search

Search HLA allele frequencies by allele, locus, country, region and population, etc.

View endpoint
HLA

Haplotype frequency search

Search HLA haplotype frequencies by allele, locus, country, region and population, etc.

View endpoint
HLA

Rare alleles search

Search for rare HLA alleles available in the database.

View endpoint
KIR

Allele / gene frequency search

Search KIR allele and gene frequency information.

View endpoint
KIR

Genotype frequency search

Search KIR genotype frequency data.

View endpoint
MIC

Allele frequency search

Search MIC allele frequency data.

View endpoint
Cytokine

Polymorphism frequency search

Search Cytokine polymorphism frequency data.

View endpoint

HLA

Allele frequency search endpoint

GET

https://www.allelefrequencies.net/api/hla/allele-frequencies/search

To add search criteria, append a ? to the end of the endpoint and add a parameter from the table below. Use & to add additional parameters.

Search criteria

ParameterDescriptionValue(s)Example
alleleAllele nameA*01:01allele=A*01:01
locusLocus name{A, B, C, DPA1, DPB1, ...}locus=A
countryCountry{Albania, Algeria, American Samoa, ...}country=Albania
geographicalRegionGeographical region{Asia, Australia, Europe, ...}geographicalRegion=Europe
ethnicityEthnicity{Amerindian, Black, Caucasian, ...}ethnicity=Amerindian
populationStandardPopulation standard{goldOnly, goldAndSilver}populationStandard=goldOnly
showFrequenciesShow only positives or negatives frequencies{positives, negatives}showFrequencies=positives
datasetSource of data{Literature, Proceedings of IHWs, Unpublished}dataset=Literature
typeStudyType of study{Anthropology, Blood Donor, Bone Marrow Registry, ...}typeStudy=Anthropology Study
sortBySort by{allele, alleleFrequencyDesc, population, populationFrequencyDesc}sortBy=alleleFrequencyDesc

Examples

Search populations with the A*01:01 allele:

https://www.allelefrequencies.net/api/hla/allele-frequencies/search?allele=A*01:01

Search populations with the B*07 allele in Europe:

https://www.allelefrequencies.net/api/hla/allele-frequencies/search?allele=B*07&geographicalRegion=Europe

Click the Run button to test the endpoint and view the returned data in the Demo response section.

You can copy any example, modify its parameters to create your own query, and use it as a starting point for integrating the API into your application, script, or data analysis workflow.

Demo response (Up to 50 records are displayed here for preview).
Run an example to display the API response.