# How to get data from page url's path?

**URL:** <https://forum.bubble.io/t/how-to-get-data-from-page-urls-path/167895>\
**Category:** Need help\
**Created:** [September 5, 2021, 5:12am UTC](https://forum.bubble.io/t/how-to-get-data-from-page-urls-path/167895 "2021-09-05T05:12:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anantpathak2614](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@anantpathak2614](https://forum.bubble.io/u/anantpathak2614)\
**Post date:** [September 5, 2021, 5:12am UTC](https://forum.bubble.io/t/how-to-get-data-from-page-urls-path/167895/1 "2021-09-05T05:12:41Z")

</div>

Hi, I have a use-case where I need to load the current user based on some id and that id should come from the current url’s path parameter. Also, this page is not being navigated from some other page and I don’t wish to use url parameter. For example, if I browse to the url:  
http://www.\<(mydomain)\>.io/\<(uniqueId)\> , I should be able to load the user from database on basis of this uniqueId. Can someone please help ?

---

<div class="post-metadata">

**Author:** ![cmarchan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cmarchan/32/253062_2.png) [@cmarchan](https://forum.bubble.io/u/cmarchan)\
**Post date:** [September 5, 2021, 5:29am UTC](https://forum.bubble.io/t/how-to-get-data-from-page-urls-path/167895/2 "2021-09-05T05:29:19Z")

</div>

Make the receiving page of type user and when using the go to page action send a user to that page of type user. Bubble will handle the rest.

---

<div class="post-metadata">

**Author:** ![anantpathak2614](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@anantpathak2614](https://forum.bubble.io/u/anantpathak2614)\
**Post date:** [September 5, 2021, 5:40am UTC](https://forum.bubble.io/t/how-to-get-data-from-page-urls-path/167895/3 "2021-09-05T05:40:05Z")

</div>

Sorry, didn’t get this point:  
Where should I send the user from ? I just want to query the user by an id extracted from the url path.

---

<div class="post-metadata">

**Author:** ![cmarchan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cmarchan/32/253062_2.png) [@cmarchan](https://forum.bubble.io/u/cmarchan)\
**Post date:** [September 5, 2021, 7:43am UTC](https://forum.bubble.io/t/how-to-get-data-from-page-urls-path/167895/4 "2021-09-05T07:43:01Z")

</div>

Example in a text element …. complete it with the url parameter name 😀

In a group of type user this would read the url parameter and load it onto the group (provided that the url parameter contains the user’s unique id )

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/c/2/c2aae7f6c429186eec83c46dc8d0e3a85b2bbf9f.png)

---

<div class="post-metadata">

**Author:** ![anantpathak2614](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@anantpathak2614](https://forum.bubble.io/u/anantpathak2614)\
**Post date:** [September 5, 2021, 9:22am UTC](https://forum.bubble.io/t/how-to-get-data-from-page-urls-path/167895/5 "2021-09-05T09:22:39Z")

</div>

I understand that, but in my case I dont want to get this uniqueId from parameter, but from the url path. For example, if url is: [www.domain.com/userid](http://www.domain.com/userid), then I should get the data from DB with this userId.

---

<div class="post-metadata">

**Author:** ![alanpieczonka](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/alanpieczonka/32/99909_2.png) [@alanpieczonka](https://forum.bubble.io/u/alanpieczonka)\
**Post date:** [September 5, 2021, 9:41am UTC](https://forum.bubble.io/t/how-to-get-data-from-page-urls-path/167895/6 "2021-09-05T09:41:16Z")

</div>

Hi @anantpathak2614,  
if you make the receiving page of type user like @cmarchan advised you, you should be able to get the result you want. Just make sure that your Privacy Rules allow viewing other users’ data.  
If you want to make the URL more friendly, you can use slugs for that

[![](https://img.youtube.com/vi/jWrIV4YR5Oo/maxresdefault.jpg "How to Setup Page Slugs | Bubble Tutorial") ](https://www.youtube.com/watch?v=jWrIV4YR5Oo)

---

<div class="post-metadata">

**Author:** ![gavin1](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@gavin1](https://forum.bubble.io/u/gavin1)\
**Post date:** [November 1, 2021, 2:51pm UTC](https://forum.bubble.io/t/how-to-get-data-from-page-urls-path/167895/7 "2021-11-01T14:51:13Z")

</div>

Trying to do something similar. I want to update a page type by pulling from the URL.

I can get the thing in a text element as described above, but how do I update the page type?

E.g. I have a page with a type ‘blog’. I have a URL of [mybubbledomain.com/blog?blog-title](http://mybubbledomain.com/blog?blog-title)

I want to populate the page type with the blog that has the title ‘blog-title’. Not sure what I am missing, but I can’t work out how to do that.

PS. A user could land on this page from a variety of places including external to my bubbleapp, so I can’t use the Go to Page action and send the data from there.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [November 14, 2021, 5:13am UTC](https://forum.bubble.io/t/how-to-get-data-from-page-urls-path/167895/8 "2021-11-14T05:13:26Z")

</div>

This topic was automatically closed after 70 days. New replies are no longer allowed.
