<p>If you analyze POST request you will see this:</p>

<p><a href="https://i.sstatic.net/ZrZ3s.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZrZ3s.png" alt="enter image description here"></a></p>

<p>To get items by id you need to create custom request and add criteria[id]=(int id here) e.x. use <a href="https://coderwall.com/p/-fdgoq/chrome-developer-tools-adds-copy-as-curl" rel="nofollow noreferrer">this</a></p>

<p>It is most likely related to the way how <code>ElementCriteriaModel</code> works (99% sure) :</p>

<pre><code>craft.entries({
    id: 123, // search by ID*
    search: 'search query'
})
</code></pre>

<p><a href="https://craftcms.com/docs/templating/craft.entries#id" rel="nofollow noreferrer">search by ID*</a></p>

<p><code>craft.entries</code> returns <code>ElementCriteriaModel</code> - <a href="https://craftcms.com/docs/templating/craft.entries" rel="nofollow noreferrer">Source</a></p>

<p>You won't be able to use default CP search form to get entries by ID</p>

CC BY-SA 3.0
2016-10-26T11:34:56.447Z
2016-10-26T11:47:58.853Z
2016-10-26T11:47:58.853Z
Krzysztof Boduch
<p>Unless I'm missing something, it seems like it is impossible to search by ID in the CP (and therefore via ElementCriteriaModel's search).</p>

<p>I know you can make it sortable using <code>modifyEntrySortableAttributes</code>, but it still doesn't make it searchable.</p>

<p>I've also tried id::"123", which doesn't work.</p>

<p>Any way to do this?</p>

<search>
Search by ID in the CP
# Search by ID in the CP

(Asked by: username_0 on 2016-10-26)

Unless I'm missing something, it seems like it is impossible to search by ID in the CP (and therefore via ElementCriteriaModel's search).

I know you can make it sortable using `modifyEntrySortableAttributes`, but it still doesn't make it searchable.

I've also tried id::"123", which doesn't work.

Any way to do this?

**Tags:** search

---

## 1 answers

### Answer by username_1 on 2016-10-26. Score: 2

If you analyze POST request you will see this:

To get items by id you need to create custom request and add criteria[id]=(int id here) e.x. use this
It is most likely related to the way how ElementCriteriaModel works (99% sure) :
craft.entries({
    id: 123, // search by ID*
    search: 'search query'
})

search by ID*
craft.entries returns ElementCriteriaModel - Source
You won't be able to use default CP search form to get entries by ID


---

