Problems con get data in api

Hi everyone,

I’m experiencing an issue when trying to retrieve data from the Cádiz transport API.

When I use the following API URL for line 49:
http://api.ctan.es/v1/Consorcios/2/horarios_lineas?dia=&frecuencia=&lang=ES&linea=49&mes=

I get an error using the blocks shown in this image:

However, when I use the same structure with a different line (line 36), like this:
http://api.ctan.es/v1/Consorcios/2/horarios_lineas?dia=&frecuencia=&lang=ES&linea=36&mes=

It works perfectly, even though both lines use the exact same block setup and API format.


I have ckeck with other lines and the code working, but only with line 49, doesnt work

I’ve tested with other lines as well, and the code works fine in those cases. The problem seems to happen only with line 49.

I don’t understand why the same code and structure work for some lines but not for line 49. Could anyone help me figure this out?

Thank you!

There may be an error by the Api provider. No data inserted for this transportline. You could message the provider for This issue.

compare the raw data for line 36 and 49 to find the difference
Taifun

May be this like you may get proper list

I think the problem has to do with how the data is being processed, because if I add an element inside nucleosIda in the JSON on line 49, it doesn’t give any errors

@Taifun @Django_s_Android_App thanks for your help.

However, as you can see, the data in both URLs—specifically on lines 36 and 49—have similar structures. I’m fetching data from these URLs, but the results are different in each case

1 Like

thanks you so much, @Still-learning . I tested your method and it is working perfectly.

1 Like