BYTETOOLS

KEGG REST API

Free KEGG REST API with no key: metabolic pathways, genes, compounds, drugs and reactions across thousands of organisms. Returns tab-separated plain text. Tested example included.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the KEGG REST API?

The KEGG REST API is a free, key-free interface to the Kyoto Encyclopedia of Genes and Genomes. It serves metabolic and signalling pathway maps, orthology groups, genes across thousands of sequenced organisms, chemical compounds, drugs and reactions — as tab-separated plain text rather than JSON.

KEGG is the standard reference for metabolic and signalling pathways, and pathway enrichment analysis in nearly every field of biology ends up querying it. The database spans pathways, orthology groups, over 68 million genes across thousands of genomes, plus compounds, drugs, enzymes and reactions, all cross-linked by stable identifiers.

The API is deliberately minimal and predates the JSON era: every response is tab-separated plain text, and the interface is built from a small set of verbs — `info`, `list`, `find`, `get`, `conv` and `link` — combined with database names. That means no JSON parser will help you and you write a small text splitter instead, but the grammar is easy to learn and completely consistent. Be aware that KEGG's licensing is restrictive: academic use of the website is free, but commercial and bulk use requires a paid licence from Pathway Solutions.

Quick facts

Base URL
https://rest.kegg.jp
Authentication
No API key. However, KEGG's terms allow free academic use only — commercial use, and bulk downloading in general, require a paid licence. Check the terms before building a product on it.
Rate limit
Roughly 3 requests per second. Batch requests accept up to 10 identifiers at once, separated by plus signs.
Pricing
Free for academic use. Commercial use requires a licence from Pathway Solutions.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the KEGG REST API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Fetch KEGG database statistics and release info

GET https://rest.kegg.jp/info/kegg

curl
curl 'https://rest.kegg.jp/info/kegg'
JavaScript (fetch)
const res = await fetch("https://rest.kegg.jp/info/kegg");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://rest.kegg.jp/info/kegg", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
kegg	KEGG (Kyoto Encyclopedia of Genes and Genomes)
	pathway        587  2026/08/20
	brite          205  2026/08/20
	module         573  2026/08/20
	ko          28,430  2026/08/20
	genes   68,489,433  2026/08/20
	  ag         4,448  2026/08/12
	  vg       708,619  2026/08/20
	  vp           377  2023/08/31
	genome      11,949  2026/08/20
	vtax        14,648  2026/07/14
	vgenome        359  2024/09

Parameters

ParameterTypeRequiredDescription
operationpath segmentRequiredThe verb: `info`, `list`, `find`, `get`, `conv` or `link`. info
databasepath segmentRequiredTarget database: `kegg`, `pathway`, `ko`, `genome`, `compound`, `drug`, `reaction`, `enzyme`, or an organism code such as `hsa` for human. kegg
entriespath segmentOptionalUp to 10 identifiers joined with `+` for a batch `get`. hsa:7157
formatpath segmentOptionalOn `get`, an optional output format such as `aaseq`, `ntseq`, `mol`, `image` or `json`. aaseq

Response fields

(tab-separated text)text/plain
Every response is plain text with tab-separated columns and one record per line. There is no JSON envelope — split on tabs and newlines.
database name and descriptioncolumn
For `info`, the first line names the database and gives its full title.
entry countscolumn
Per-sub-database record counts with the date each was last updated — a quick way to check data freshness.
identifierscolumn
For `list` and `find`, the first column is the KEGG identifier in `database:id` form, such as `hsa:7157`.

What you can build with the KEGG REST API

  • Run pathway enrichment analysis on a gene list
  • Map gene identifiers between KEGG, NCBI and UniProt with the conv operation
  • Look up which pathways a compound or drug participates in
  • Retrieve amino acid or nucleotide sequences for genes in a specific organism

Common errors and how to fix them

400

Malformed operation or database name.

Fix: The grammar is strict: operation first, then database, then optional arguments — all as path segments, never query parameters.

404

Unknown identifier.

Fix: KEGG ids are prefixed by database, so a human gene is `hsa:7157`, not a bare number.

403

Blocked for exceeding the request rate or bulk downloading.

Fix: Keep to about 3 requests per second, batch up to 10 entries per `get`, and cache aggressively. Bulk download requires a licence.

KEGG REST API — frequently asked questions

Is the KEGG API free?

The API needs no key and is free for academic use, but KEGG's terms restrict commercial use and bulk downloading — those require a paid licence from Pathway Solutions. Check the licensing before building a commercial product on it.

Why does KEGG return plain text instead of JSON?

The API predates JSON conventions and has stayed deliberately stable. Responses are tab-separated with one record per line, so parsing is a simple split rather than a JSON decode. A few `get` operations do offer a JSON format option.

How do I convert gene IDs to KEGG identifiers?

Use the `conv` operation, which maps between KEGG identifiers and NCBI GeneID, NCBI ProteinID or UniProt accessions in either direction — for example converting an entire organism's genes to UniProt in one call.

What do KEGG identifier prefixes mean?

Every id is namespaced by its database: `hsa:` for human genes, `ko:` for orthology groups, `cpd:` for compounds, `map:` for pathway maps, `dr:` for drugs. The three-letter organism codes come from the genome list.

Tools that pair with this API

KEGG REST is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.