Get body part from an URL to use the data

Hi,

I have this URL: https://altar.uson.mx/cgi-bin/aspiran.sh/Audiencias/EmpleadoNombre.p?nombre=aldo&apellido=*&tipo=3

i want to put the data into a variable, and then, convert it to a JSON format and manage the information

can i get some help here?

1 Like

Your data output is already in JSON format.

1 Like

thnks, but, i cant put it into a label or a variable to manipulate the data… how can extract it from the webpage?

1 Like

Use Web API component and the response green block will have your data.

Place your URL in the URL property of the Web API component and execute the GET command to get your data.

1 Like

thnks for answer, i did it, but i dont have any response, the label goes blank

i have this

1 Like

For us to be able to check whether or not it works, we would need the full URL.

Please see this tutorial information and video that I made:

1 Like

thank you, im going to see it, but, any fast idea? this is the full URL for me: https://altar.uson.mx/cgi-bin/aspiran.sh/Audiencias/EmpleadoNombre.p?nombre=aldo&apellido=*&tipo=3

its all that i have…

1 Like

You should always include the full error response verification in your webapi calls.

I created a test app with just the following in it to verify api calls outside my main app

Sometimes there is an error code which means there is no response block

2 Likes

Nope!

This takes time to figure out. Watch my video, then provide the info I suggested in that post. If you have some blocks you’ve tried after that that aren’t working, post a screenshot. But if you take shortcuts, it’s probably not going to work.

2 Likes

@gcesar.sotodi1u
I tried the URL you provided and it is a list of tickets or something like this.

I made this quick app to get the data



This will show the first 3 tickets from the list.

This is a sample output

3 Likes

Thank you so much for take your time to help me, i really apretiate, i tried the code but, i got this output…

Mi blocks …

Api config

1 Like

You are trying to run your app from the Web Live Test. This will not work.

Run it from the Thunkable Live App in your mobile phone.

1 Like

it wooorks!!! thank you so so much!!! i really apretiate the help, your time and your atention! can i invite you a coffee by paypal?

2 Likes

For a cup of coffee, see this
https://x.thunkable.com/projectPage/604b4be60b23270012016c7a

thats perfect!! im going to start to develop the complet app using this for mi begin, when i finished i want to let you know, because you help me a lot, i really want to invite you the coffee let me know how can i do it please.

Thank you so much again!

1 Like