scientific-skills/database-lookup/references/ncbi-gene.md
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/
API key optional but recommended. Without key: 3 req/sec. With key: 10 req/sec.
Free key from: https://www.ncbi.nlm.nih.gov/account/settings/
Pass as: &api_key=YOUR_KEY
GET /esearch.fcgi?db=gene&term={query}&retmode=json&retmax={n}
Parameters:
db=gene (required)term — search query (e.g. BRCA1[gene]+AND+human[orgn])retmode=jsonretmax — max results (default 20)retstart — pagination offsetExample:
/esearch.fcgi?db=gene&term=BRCA1[gene]+AND+human[orgn]&retmode=json&retmax=5
GET /esummary.fcgi?db=gene&id={gene_ids}&retmode=json
Key response fields: name, description, chromosome, maplocation, otheraliases, nomenclaturesymbol, organism
Example:
/esummary.fcgi?db=gene&id=672&retmode=json
GET /efetch.fcgi?db=gene&id={gene_ids}&rettype=gene_table&retmode=text
GET /elink.fcgi?dbfrom=gene&db={target_db}&id={gene_id}&retmode=json
Target databases: biosystems (pathways), pubmed, omim, nuccore, protein
Example — gene to pathways:
/elink.fcgi?dbfrom=gene&db=biosystems&id=672&retmode=json
usehistory=y with eSearch, then retrieve via query_key and WebEnv