I am looking at NCBI’s api page and I cannot seem to find any endpoint that returns the cDNA by transcript id.
In fact NCBI nuccore has a webpage for this. and if I want to i can scrape the part coming after ORIGIN. however I guess they do not want this (which I really disagree).
Then the question is, where is their REST api that clearly states how to fetch cDNA by transcript id?
I think this is more suited to what I actually wanted. A GET request with single id would return what I wanted. However these ids are UIDs (gene id) for NCBI. I wonder whether it is possible to submit transcript ids (for instance NM_XYZ) and receive similar input? I was not able to locate any specs that refer to transcript ids in the help page you linked.
OMG I just replaced id with 'NM_014491.4', guessing it would return empty string because it is a RefSeq id, not a gene id, but it worked!
I have no idea whether they intended that, because obviously it is not stated in their docs, but I guess I am happy with it. Thank you!
PS: For those who want to do something similar:
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=NM_014491.4&rettype=fasta&retmode=text
so the
id
can be BOTHgene id
orRefSeq
, and does not seem to require API key, perfect.