<p>it is because you do a text search and the &quot;word&quot; Q9UJL9 appears in multiple entries. If you want an id search, specifically say so and for that the query syntax is <code>id:Q9UJL9</code>. You will want to follow a redirect, and there are some rare cases where that might still lead to more than one entry if the id was made secondary and attached to multiple entries. e.g. P00001.</p>

CC BY-SA 4.0
2021-01-23T22:02:30.507Z
This is perfect thanks a mil I totally get it now.
Slowat_Kela
CC BY-SA 4.0
2021-01-23T15:06:36.280Z
2021-01-23T15:06:36.280Z
Jerven
<p>Can some explain why when I run a REST API query on UniProt for one ID ('Q9UJL9'), the results for three IDs are returned?</p>
<p>The query I'm using is:</p>
<p><a href="https://www.uniprot.org/uniprot/?query=Q9UJL9&amp;sort=score&amp;columns=id,go(molecular%20function)&amp;format=tab" rel="nofollow noreferrer">https://www.uniprot.org/uniprot/?query=Q9UJL9&amp;sort=score&amp;columns=id,go(molecular%20function)&amp;format=tab</a></p>
<p>(I didn't hyperlink it since you need to see the query to see where I'm going wrong).</p>
<p>When I run the query above, the output is:</p>
<pre><code>Entry   Gene ontology (molecular function)
Q9UJL9  DNA-binding transcription factor activity, RNA polymerase II-specific [GO:0000981]; DNA-binding transcription repressor activity, RNA polymerase II-specific [GO:0001227]; metal ion binding [GO:0046872]; RNA polymerase II transcription regulatory region sequence-specific DNA binding [GO:0000977]
Q8WWY3  identical protein binding [GO:0042802]; ribonucleoprotein complex binding [GO:0043021]; RNA binding [GO:0003723]; snRNP binding [GO:0070990]; U4atac snRNA binding [GO:0030622]; U4 snRNA binding [GO:0030621]
Q6A162  structural molecule activity [GO:0005198]
</code></pre>
<p>I checked the uniprot page of the query I want (Q9UJL9), the other items are interactors (along with many others) but not synonyms/linked (it seems, e.g my query is a zinc finger, one of the linked records, Q6A162, is a keratin protein).</p>

CC BY-SA 4.0
2021-01-22T15:35:05.577Z
It makes sense as the search searches for all instances: if you google yourself you are likely to find photos of your colleagues, because their appear in the same page as your name, same thing here.
If you already know your protein an alternative is to get https://www.uniprot.org/uniprot/Q9UJL9.txt and grep out the `DR   GO; ` entries, but that is as convoluted.
Matteo Ferla
<uniprot><api>
Why is the UniProt REST API returning multiple results, when I am only providing one ID to be checked?
# Why is the UniProt REST API returning multiple results, when I am only providing one ID to be checked?

(Asked by: username_0 on 2021-01-22)

Can some explain why when I run a REST API query on UniProt for one ID ('Q9UJL9'), the results for three IDs are returned?
The query I'm using is:
https://www.uniprot.org/uniprot/?query=Q9UJL9&sort=score&columns=id,go(molecular%20function)&format=tab
(I didn't hyperlink it since you need to see the query to see where I'm going wrong).
When I run the query above, the output is:
Entry   Gene ontology (molecular function)
Q9UJL9  DNA-binding transcription factor activity, RNA polymerase II-specific [GO:0000981]; DNA-binding transcription repressor activity, RNA polymerase II-specific [GO:0001227]; metal ion binding [GO:0046872]; RNA polymerase II transcription regulatory region sequence-specific DNA binding [GO:0000977]
Q8WWY3  identical protein binding [GO:0042802]; ribonucleoprotein complex binding [GO:0043021]; RNA binding [GO:0003723]; snRNP binding [GO:0070990]; U4atac snRNA binding [GO:0030622]; U4 snRNA binding [GO:0030621]
Q6A162  structural molecule activity [GO:0005198]

I checked the uniprot page of the query I want (Q9UJL9), the other items are interactors (along with many others) but not synonyms/linked (it seems, e.g my query is a zinc finger, one of the linked records, Q6A162, is a keratin protein).

**Tags:** uniprot, api
> **Comments:**
> **username_1**: It makes sense as the search searches for all instances: if you google yourself you are likely to find photos of your colleagues, because their appear in the same page as your name, same thing here. If you already know your protein an alternative is to get https://www.uniprot.org/uniprot/Q9UJL9.txt and grep out the `DR   GO; ` entries, but that is as convoluted.  

---

## 1 answers

### Answer by username_2 on 2021-01-23. Score: 3 | Accepted answer

it is because you do a text search and the "word" Q9UJL9 appears in multiple entries. If you want an id search, specifically say so and for that the query syntax is `id:Q9UJL9`. You will want to follow a redirect, and there are some rare cases where that might still lead to more than one entry if the id was made secondary and attached to multiple entries. e.g. P00001.

> **Comments:**
> **username_0**: This is perfect thanks a mil I totally get it now.  

---

