Question: NCBI E-utilities API function esearch not working
0
gravatar for mavershang
18 days ago by
mavershang50
United States
mavershang50 wrote:

Hi there. I have a old code to retrieve xml of a SRX using NCBI E-utilities API. For example, using the url as below (you can remove api_key part)

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=sra&retmax=10000&term=ERX2021050&api_key=blablablabla

I am pretty sure it works in the past. But now it pops error saying the url doesn't work. I checked NCBI E-util books but did not find answer. Any suggestion?

Thanks

ncbi • 91 views
ADD COMMENTlink modified 18 days ago by Pierre Lindenbaum131k • written 18 days ago by mavershang50

Working for me

<eSearchResult>
<Count>1</Count>
<RetMax>1</RetMax>
<RetStart>0</RetStart>
<IdList>
<Id>4071266</Id>
</IdList>
<TranslationSet/>
<TranslationStack>
<TermSet>
<Term>ERX2021050[All Fields]</Term>
<Field>All Fields</Field>
<Count>1</Count>
<Explode>N</Explode>
</TermSet>
<OP>GROUP</OP>
</TranslationStack>
<QueryTranslation>ERX2021050[All Fields]</QueryTranslation>
</eSearchResult>
ADD REPLYlink written 18 days ago by genomax91k

This is actually what I get and it doesn't have any style information. It suppose to have much more fields

ADD REPLYlink written 18 days ago by mavershang50

it doesn't have any style information

what do you mean ?

ADD REPLYlink written 18 days ago by Pierre Lindenbaum131k

For example, this url display the full xml

https://www.ncbi.nlm.nih.gov/sra/ERX2021050[accn]?report=FullXml

Esearch used to return the same xml.

ADD REPLYlink modified 18 days ago • written 18 days ago by mavershang50
1
gravatar for Pierre Lindenbaum
18 days ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum131k wrote:

The NCBI doesn't work like that.

First you use esearch to get a list of identifiers : here you have only one identifier

(...)
<IdList>
<Id>4071266</Id>
</IdList>
(...)

and then use efetch with this/those identifier(s).

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=sra&id=4071266

ADD COMMENTlink modified 18 days ago • written 18 days ago by Pierre Lindenbaum131k

Thank you. I misinterpret it. The error is actually due to the default SSL/TLS protocolType change in my code. Now it's working.

ADD REPLYlink modified 18 days ago • written 18 days ago by mavershang50
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1937 users visited in the last hour