Must an API call's parameter always be text?

Hello! I’m using this API to get a movie’s metadata:

and it relies on a a single parameter, movie_id which is an integer, both on the input/call and also as part of the response

I have the API configured but it seems to only work when I feed it movie_id as a string. Is there a way to configure the API so I can call with with a number-type movie id?

Is it just a matter of adding a :formatted as ? Or is it possible for APIs like this to have a type assigned to their required parameters?

What do you mean? What are you doing when it’s not working?

I’m not entirely sure what I was doing wrong, but I seem to be ok now. Worked it from a different angle.

I am still curious though… where is an API’s parameter’s TYPE specified, or is it not configurable and simply automatic once you initialize the API call?

1 Like

There’s no type to configure in API parameters
The type are mostly defined by the encoding requested by the API you are calling.
For example, if the requested payload is json you may see something like

thanks @Jici
One last question on this topic: assuming an API call is defined as “Data” (as opposed to “Action”) can a backend/API workflow leverage “Get data from an external API” in the same way a front-end user could live at runtime?

Yes, in a field directly.
When you set DATA for api connector, Bubble will create a type of this api connector (or more types, depending of the response). This can be saved directly into one field or you can also use a value of the response to fill another type (text, date, number…)

Last week I found that ACTION now seem to do the same but didn’t get time to fully test that. If this is the case, it’s a nice improvement!