# Get data from url

**URL:** <https://community.glideapps.com/t/get-data-from-url/35456>\
**Category:** Ask for Help\
**Created:** [December 3, 2021, 9:22am UTC](https://community.glideapps.com/t/get-data-from-url/35456 "2021-12-03T09:22:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [December 3, 2021, 9:22am UTC](https://community.glideapps.com/t/get-data-from-url/35456/1 "2021-12-03T09:22:58Z")

</div>

Hi Gliders,

I have a url from a NFT website, from which i want to pull data from. Can someone help me how can i do so? example URL : [https://niftys.com/nft/0x39ceaa47306381b6d79ad46af0f36bc5332386f2/64766](https://niftys.com/nft/0x39ceaa47306381b6d79ad46af0f36bc5332386f2/64766)

i wants to be able to pull the image, avatar number, avatar attributes.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 3, 2021, 10:11am UTC](https://community.glideapps.com/t/get-data-from-url/35456/2 "2021-12-03T10:11:59Z")

</div>

Unless they have an API, you can’t really do this using computed columns.

If you’re using Google Sheets, you may find some luck with IMPORTXML as long as you can extract the right xpath: [IMPORTXML - Docs Editors Help](https://support.google.com/docs/answer/3093342?hl=en)

However if you constantly need to update this then IMPORTXML might not scale very well.

---

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [December 3, 2021, 8:51pm UTC](https://community.glideapps.com/t/get-data-from-url/35456/3 "2021-12-03T20:51:30Z")

</div>

Hi Thinh,

thank for the reply. i was wondering if there was a way to show the image from the url, like when i paste it in discord or whatsapp, it comes up with an image

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 4, 2021, 12:44am UTC](https://community.glideapps.com/t/get-data-from-url/35456/4 "2021-12-04T00:44:47Z")

</div>

You would have to extract the image from the URL first using the methods I mentioned above before being able to display it in Glide, assuming you’re using something like a card list to display the URL and its associated info.

---

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [December 4, 2021, 12:47am UTC](https://community.glideapps.com/t/get-data-from-url/35456/5 "2021-12-04T00:47:29Z")

</div>

but i still need API?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 4, 2021, 12:52am UTC](https://community.glideapps.com/t/get-data-from-url/35456/6 "2021-12-04T00:52:34Z")

</div>

Try IMPORTXML first, or maybe a JS snippet that loads the URL’s HTML and find the img tags. Just an idea, I’m not sure the JS snippet will work due to CORS problems.

---

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [December 4, 2021, 12:54am UTC](https://community.glideapps.com/t/get-data-from-url/35456/7 "2021-12-04T00:54:44Z")

</div>

unfortunately i started with glide sheets. is there a way to add google sheets now?

---

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [December 4, 2021, 12:58am UTC](https://community.glideapps.com/t/get-data-from-url/35456/8 "2021-12-04T00:58:50Z")

</div>

i have another option. i am able to get data like the below. Is there a way for me to split them in to my labeled text boxes 🙂 I have coloums label with the attribute name (eg: hair style)

user will copy paste data into one text box, and then glide needs to auto fill my columns accordingly.

Background White  
Hair Style Short Messy  
Hair Color Black  
Facial Hair Goatee  
Top Tan Blazer with Off-White Shirt and Tan Tie  
Bottom Khaki Slacks  
Footwear Redbrown Leather Workboot with Brown Sole  
Ring  
Headwear  
Glasses Black Books  
Piercings  
Accessories Black Smartphone

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 4, 2021, 1:05am UTC](https://community.glideapps.com/t/get-data-from-url/35456/9 "2021-12-04T01:05:19Z")

</div>

I’m not sure what you need here. If you can add some screenshots we might be able to help.

---

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [December 4, 2021, 1:10am UTC](https://community.glideapps.com/t/get-data-from-url/35456/10 "2021-12-04T01:10:20Z")

</div>

1. User will copy data from the website like shown below:  

2. Paste in box shown below:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/8/9804d5b6a381eba7795ee01c69dc42dd63981648.png)

3. I need to use glide to split the game into the correct boxes:

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 4, 2021, 1:13am UTC](https://community.glideapps.com/t/get-data-from-url/35456/11 "2021-12-04T01:13:49Z")

</div>

Sounds like you can split the text and use calculated columns to get each field separately, but you still need users to press a button to load them to the right fields as shown in your second screenshot.

This is also assuming the data follows the perfect format for every single URL, which I assume might not be the case.

---

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [December 4, 2021, 1:15am UTC](https://community.glideapps.com/t/get-data-from-url/35456/12 "2021-12-04T01:15:37Z")

</div>

users will copy and paste date from the external website.

can you let me know which calculated columns i need to use ?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 4, 2021, 1:18am UTC](https://community.glideapps.com/t/get-data-from-url/35456/13 "2021-12-04T01:18:03Z")

</div>

Originally I was thinking you can use a new line character to split it, but you also have “titles” like Matrix Avatar or Attributes in there, and you might not know in advance how many attributes are there to split the correct way.

At the end of the day, if you have to ask users to do that I think it’s bad UX. We don’t have a good way to do this now.

---

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [December 4, 2021, 1:41pm UTC](https://community.glideapps.com/t/get-data-from-url/35456/14 "2021-12-04T13:41:31Z")

</div>

Hi Thinh,

this is dara will copy paste, see below:

Background White  
Hair Style Short Pixie  
Hair Color Black  
Facial Hair  
Top Gray Oxford with Buttons  
Bottom Gray Slacks  
Footwear Black Suede Chelseas with Brown Sole  
Ring  
Headwear  
Glasses  
Piercings  
Accessories

How can i split this text. What is the symbol i need to type into split text, to split for every new line

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 4, 2021, 1:46pm UTC](https://community.glideapps.com/t/get-data-from-url/35456/15 "2021-12-04T13:46:24Z")

</div>

Just use a CRLF (carriage return line feed) - ie. the enter key

---

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [December 4, 2021, 1:59pm UTC](https://community.glideapps.com/t/get-data-from-url/35456/16 "2021-12-04T13:59:51Z")

</div>

Hi Darren,

I managed to split the pasted text into a array using split text. How do now remove the ‘titles’ eg: Background, hair style , hair color etc?

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/0/1064055308656485222d2284e9bd417e2673f075.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 4, 2021, 2:03pm UTC](https://community.glideapps.com/t/get-data-from-url/35456/17 "2021-12-04T14:03:33Z")

</div>

If you are confident that the order of the elements will always be the same, then you should be able to use one of the Array Plugins to remove the elements that you don’t need.

I’d suggest maybe the [Array Slice](https://www.glideapps.com/plugins/slice-array) plugin.

---

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [December 5, 2021, 4:58pm UTC](https://community.glideapps.com/t/get-data-from-url/35456/18 "2021-12-05T16:58:15Z")

</div>

Hey Darren,

Do you have any idea how i can generate a link preview, example: when i paste a url on discord or whatsapp, it shows a image thumbnail in the chat without having to click it

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [December 5, 2021, 11:33pm UTC](https://community.glideapps.com/t/get-data-from-url/35456/19 "2021-12-05T23:33:39Z")

</div>

How will you “paste” it in the app though, I mean which component for the entry and which component to “show” that URL? It will probably not be possible anyway, but I just want to know more about what you’re trying to do.

---

<div class="post-metadata">

**Author:** ![Amal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/amal/32/15421_2.png) [@Amal](https://community.glideapps.com/u/Amal)\
**Post date:** [December 6, 2021, 6:20am UTC](https://community.glideapps.com/t/get-data-from-url/35456/20 "2021-12-06T06:20:40Z")

</div>

The app is used to check the rarity of the NFT. users will copy their NFT url and paste it into the app and they should be able to see a preview of it, similar when you paste into FB or discord : sample below :

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/6/c631f63eba5e6211213561eaf1fd838d81f4bdbd.png)

[Next page](https://community.glideapps.com/t/get-data-from-url/35456.md?page=2)
