Pulling data from a website. is it possible?

I need to pull text data from a website. Is this possible?

Thanks

A WordPress website or what sort of site?

I believe it is a WordPress site yes

can you paste link to site so I show you how to?

yes i will send you a message now with the link

Have you checked out the WordPress API?

Does this have to be installed like a plugin or is it standard for every wordpress website. Thanks

It’s a standard for every WordPress website. You can use the component ‘Web API’ from Thunkable to make requests.
Check the reference page of the API https://developer.wordpress.org/rest-api/reference/

1 Like

So in the base route which is www.domain.com/wp-json/wp/v2/posts, how would i go about making a list of the posts. There is a lot of data on the json page, and I am struggling to find out how to place the blocks to find the data.

Could you maybe give me an example?

Thanks for your help, I really appreciate it!

(edit)

I download the json and imported it into firebase because the website link was just a nightmare to find the paths. It appears to be a list from 0 to 9, and in each number is data relating to the titles, So now i must find a way to get the id of the data and when opened in a new page to display the data such as images etc.

if you know anything more on this, that would be fantastic

I am having trouble retrieving the images. I found the api for the media but the list items (which are items 0 to 9) do not correspond with the items from the posts api. I have got the posts api working great for a total of 10 posts. I will try and find a way to get a list of every post, to form a list. For the 10 recent posts I am making out columns for each item as there will only be 10, and adding a more posts button at the bottom.

But back to what i was asking there :stuck_out_tongue: how would i retrieve the images? I have the image ID but i am unsure of the API on which to call from.

Thanks again.

I do apologise for all the replies, but I thought its best to update how I get on here.

I found a way to pull the data from a 10 item long list.

From this list i got the title and description data and the photo ID. I then used the following url to use the photo id to get the embedded link.

www.domain.com/wp-json/wp/v2/media/[MediaIDHere]

I then used this api to retrieve the link :slight_smile:

So this so far has required me to use 2 API’s. One for getting the text as such and one to get the photo.

Now i need to work on a way to pull the entire “description” as right now I can only pull so many characters until I get the […] at the end of my sentence.

I also had to make html replacement text blocks for apostrophes etc.