# Get the page uuid

**URL:** <https://forum.getkirby.com/t/get-the-page-uuid/26932>\
**Category:** Questions\
**Created:** [November 2, 2022, 8:09pm UTC](https://forum.getkirby.com/t/get-the-page-uuid/26932 "2022-11-02T20:09:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gareth\_Jones](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/gareth_jones/32/9981_2.png) [@Gareth\_Jones](https://forum.getkirby.com/u/Gareth_Jones)\
**Post date:** [November 2, 2022, 8:09pm UTC](https://forum.getkirby.com/t/get-the-page-uuid/26932/1 "2022-11-02T20:09:14Z")

</div>

I am trying to populate a pages field from a CSV file using the page title.

I can get the page slug like this:

```auto
 $species = $tree['Species'];
 $speciesPage = site()->find('species')->filterBy('template', 'species')->filterBy('title', $species)->first();

```

but the page fields now stores the uuid. I thought I might be able to do this:

$speciesPage-\>uuid();

but nothing returns

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [November 2, 2022, 8:19pm UTC](https://forum.getkirby.com/t/get-the-page-uuid/26932/2 "2022-11-02T20:19:49Z")

</div>

> [@Gareth\_Jones](#):
>
> `site()->find('species')->filterBy('template', 'species')`

That code doesn’t make sense, you probably mean

```auto
site()->find('species')->children()->filterBy('template', 'species')`

```

Or what are you trying to filter here?

---

<div class="post-metadata">

**Author:** ![Gareth\_Jones](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/gareth_jones/32/9981_2.png) [@Gareth\_Jones](https://forum.getkirby.com/u/Gareth_Jones)\
**Post date:** [November 2, 2022, 8:21pm UTC](https://forum.getkirby.com/t/get-the-page-uuid/26932/3 "2022-11-02T20:21:18Z")

</div>

I am trying to find the matching page using the page title as I need to use something that makes sense in the csv file.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [November 2, 2022, 8:22pm UTC](https://forum.getkirby.com/t/get-the-page-uuid/26932/4 "2022-11-02T20:22:57Z")

</div>

Well, yes, but you can only filter a collection, and you are trying to filter a single page.

---

<div class="post-metadata">

**Author:** ![Gareth\_Jones](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/gareth_jones/32/9981_2.png) [@Gareth\_Jones](https://forum.getkirby.com/u/Gareth_Jones)\
**Post date:** [November 2, 2022, 8:35pm UTC](https://forum.getkirby.com/t/get-the-page-uuid/26932/5 "2022-11-02T20:35:49Z")

</div>

Ah right, yes sorry - looping through the children works.

```auto

          $speciesPage = site()->find('species')->children();

          foreach ($speciesPage as $sp) {
            if ($sp->title() == $species) {
              $speciesPage = $sp->uuid();
              $speciesPage = (string)$speciesPage;
            }
          }

```
