# Web API get body content from a webpage

**URL:** https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311
**Category:** Questions about Thunkable X
**Created:** [July 28, 2019, 11:44am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311 "2019-07-28T11:44:01Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Fernando\_Matos](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/fernando_matos/32/30641_2.png) [@Fernando\_Matos](https://community.thunkable.com/u/Fernando_Matos)
#### Post date: [July 28, 2019, 11:44am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/1 "2019-07-28T11:44:01Z")

</div>

hello i am trying to get some text from a web page (Body\_content) does anyone know how to do this through the web api? thank you

---

<div class="post-metadata">

### Author: ![kartik\_old](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik_old/32/28305_2.png) [@kartik\_old](https://community.thunkable.com/u/kartik_old)
#### Post date: [July 28, 2019, 11:48am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/2 "2019-07-28T11:48:31Z")

</div>

Can u please provide the webpage sample?  
And will it be same forever? (like wikipedia info of a particular) or change every minute? (like ISS live location)

Thanks!

---

<div class="post-metadata">

### Author: ![Fernando\_Matos](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/fernando_matos/32/30641_2.png) [@Fernando\_Matos](https://community.thunkable.com/u/Fernando_Matos)
#### Post date: [July 28, 2019, 12:06pm UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/3 "2019-07-28T12:06:05Z")

</div>

Yes it would be wikipedia and change the search depending on what the user is looking for!

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [July 28, 2019, 1:38pm UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/4 "2019-07-28T13:38:08Z")

</div>

Check it (only suitable for static pages)

[https://x.thunkable.com/projects/5d3da1fb9288facdaf6ec704/project/properties/designer/](https://x.thunkable.com/projects/5d3da1fb9288facdaf6ec704/project/properties/designer/)

---

<div class="post-metadata">

### Author: ![Fernando\_Matos](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/fernando_matos/32/30641_2.png) [@Fernando\_Matos](https://community.thunkable.com/u/Fernando_Matos)
#### Post date: [July 28, 2019, 2:11pm UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/5 "2019-07-28T14:11:14Z")

</div>

thanks for the tip but i just wanted to get the text and send it to a label

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [July 28, 2019, 2:14pm UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/6 "2019-07-28T14:14:23Z")

</div>

My example does not allow to do this?

---

<div class="post-metadata">

### Author: ![Fernando\_Matos](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/fernando_matos/32/30641_2.png) [@Fernando\_Matos](https://community.thunkable.com/u/Fernando_Matos)
#### Post date: [July 30, 2019, 6:24am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/7 "2019-07-30T06:24:50Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/c/1cb8ddad1f4b36e38c781c0705855d6ddaef0620.png) the example shows the full page but I only want the introduction text

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [July 30, 2019, 8:12am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/8 "2019-07-30T08:12:08Z")

</div>

Did you click on the “get title” button?

I showed the full page so that you can see the information on it and what happens when you click on the Get title button.

---

<div class="post-metadata">

### Author: ![Fernando\_Matos](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/fernando_matos/32/30641_2.png) [@Fernando\_Matos](https://community.thunkable.com/u/Fernando_Matos)
#### Post date: [July 30, 2019, 8:41am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/9 "2019-07-30T08:41:03Z")

</div>

I am sorry I did not realize this function. but how do i get the selected text in the image?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/a/6a29628804b4e5128db3e1098a0665d36775cd7a.jpeg)

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [July 30, 2019, 11:09am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/10 "2019-07-30T11:09:51Z")

</div>

You need to find the HTML tags in which the text is in the source structure of the document and get it. See how this is done in my example.

Unfortunately now I can not make such a code for you.

---

<div class="post-metadata">

### Author: ![Fernando\_Matos](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/fernando_matos/32/30641_2.png) [@Fernando\_Matos](https://community.thunkable.com/u/Fernando_Matos)
#### Post date: [July 30, 2019, 3:39pm UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/11 "2019-07-30T15:39:30Z")

</div>

when you can make a scheme and I’ve tried to change the tags and nothing happens. maybe something is wrong with me

---

<div class="post-metadata">

### Author: ![Fernando\_Matos](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/fernando_matos/32/30641_2.png) [@Fernando\_Matos](https://community.thunkable.com/u/Fernando_Matos)
#### Post date: [July 30, 2019, 7:35pm UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/12 "2019-07-30T19:35:57Z")

</div>

hello I got the desired text but. but along comes the html code. Is there any way to clear the text?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/4/d493a2ffcb88019a4002ca139e5d60136adba292.jpeg)

---

<div class="post-metadata">

### Author: ![kartik\_old](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik_old/32/28305_2.png) [@kartik\_old](https://community.thunkable.com/u/kartik_old)
#### Post date: [July 31, 2019, 1:41am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/13 "2019-07-31T01:41:15Z")

</div>

Try replacing all tags with null by

# Replace all text in (#1) text\_to\_replace (#2) with (#ev3

Thanks! 😄

---

<div class="post-metadata">

### Author: ![Fernando\_Matos](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/fernando_matos/32/30641_2.png) [@Fernando\_Matos](https://community.thunkable.com/u/Fernando_Matos)
#### Post date: [July 31, 2019, 6:50am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/14 "2019-07-31T06:50:02Z")

</div>

@kartik_old sorry but I didn’t understand how to do it

---

<div class="post-metadata">

### Author: ![renren66](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@renren66](https://community.thunkable.com/u/renren66)
#### Post date: [July 31, 2019, 7:24am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/15 "2019-07-31T07:24:01Z")

</div>

![Capture(8)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/3/936f308a999f0da6f7025038675f56f25a718450.png)  
Perhaps you can try this. I’m not 100% sure if this works, but it’s worth a try.

---

<div class="post-metadata">

### Author: ![Fernando\_Matos](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/fernando_matos/32/30641_2.png) [@Fernando\_Matos](https://community.thunkable.com/u/Fernando_Matos)
#### Post date: [July 31, 2019, 7:46am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/16 "2019-07-31T07:46:49Z")

</div>

the same resulte

---

<div class="post-metadata">

### Author: ![renren66](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@renren66](https://community.thunkable.com/u/renren66)
#### Post date: [July 31, 2019, 8:01am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/17 "2019-07-31T08:01:17Z")

</div>

May I see your blocks?

---

<div class="post-metadata">

### Author: ![Fernando\_Matos](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/fernando_matos/32/30641_2.png) [@Fernando\_Matos](https://community.thunkable.com/u/Fernando_Matos)
#### Post date: [July 31, 2019, 8:15am UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/18 "2019-07-31T08:15:26Z")

</div>

@renren66[https://x.thunkable.com/copy/0b702ba2b7f65a5942d80a6cf44abc73](https://x.thunkable.com/copy/0b702ba2b7f65a5942d80a6cf44abc73)

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [August 1, 2019, 12:40pm UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/19 "2019-08-01T12:40:40Z")

</div>

Check it

[https://x.thunkable.com/projects/5d42d786b147448022b4d5eb/project/properties/designer/](https://x.thunkable.com/projects/5d42d786b147448022b4d5eb/project/properties/designer/)

---

<div class="post-metadata">

### Author: ![Fernando\_Matos](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/fernando_matos/32/30641_2.png) [@Fernando\_Matos](https://community.thunkable.com/u/Fernando_Matos)
#### Post date: [August 1, 2019, 6:24pm UTC](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311/20 "2019-08-01T18:24:24Z")

</div>

thank you for the moment works as i want. thank you so much for wasting time building all these blocks! You were a great help like everyone else who helped! Now I just have to try if it works the same if the link is different. thank you very much

[Next page](https://community.thunkable.com/t/web-api-get-body-content-from-a-webpage/159311.md?page=2)
