NCBI E-utilities API function esearch not working
1
0
Entering edit mode
4.2 years ago
mavershang ▴ 60

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 • 1.8k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

it doesn't have any style information

what do you mean ?

ADD REPLY
0
Entering edit mode

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 REPLY
1
Entering edit mode
4.2 years ago

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 COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1309 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6