Skip Header

You are using a version of browser that may not display all the features of this website. Please consider upgrading your browser.

How can I (programmatically) obtain the number of results returned by my query?

Last modified June 2, 2017

If you are accessing UniProt programmatically, using our REST API and are just interested in the number of results returned by your query, but not in downloading or listing all the hits, you can check the X-Total-Results header like in the PERL code example Download all UniProt sequences for a given organism in FASTA format.

This returns the entry count, allowing you to count the hits without actually retrieving them.

See also:
REST API – Access the UniProt website programmatically