Can someone walk me through intgrating this APi

Im trying to implement the following api to auto populate a form in my app.

https://vpic.nhtsa.dot.gov/api/

I believe it does not require a key…

When user enters the vin # in the form i will like to call the api to autofill the rest of the form.

Screen Shot 2022-08-24 at 11.37.40 PM

no one?

If you haven’t already get the API connector plugin made by Bubble. Then you have to setup the API with the URL, etc.

Any specific call you are trying to do from their documentation like “Get All Makes”?

Here was my setup in the API connector plugin:

Then when I clicked “Initialize call” it took a second then returned data including the entire list of all auto makers.

Then I made a repeating group setup like this, so now I have a repeating group that get’s all the Makes from the NHTSA:

Hey Tyler, thanks for your explanation. But im looking for is to get that data in autofill the form.

Here is what i have so far:

Im using xano as a backend since it allows me to manipulate and filter the data from api call .

Second i implemented the api call to api connector succesfully (first used as DATA, now im experimenting with ACTION).

When i input vin value it pulls everything that i need can autopopulate the form ONLY if i leave a default value to API connector, as follows.

And this is the results

I’ve set the form up to pull the data from the api call…

The problem is that it only pulls the data if i have a default value. The goal is that i want to enter the vin value from the form itself and then trigger the call and autopopulate the form. Im trying to use a favicon to trigger that event once the form is filled i will use a second button to add to database.

Im not sure how to do that or if im going the right direction.

:thinking: Now that Xano is in your loop I don’t know that much…

When I use parameters it’s usually a variable in the URL itself. So maybe after your "vin_nhtsa"you could do ?Vin=[Vin]

Then in your form it initiates the API call and you would have the parameter Vin= the text input’s value. That would put the input’s value in your URL where [Vin] is when it sends the call over to Xano

Hopefully someone else chimes in because I know I can’t help that much

I don’t understand why you are using xano. You can apply filter on the API call into Bubble too.

How have you setup the workflow for running the GET call to Xano? You should be able to dynamically populate the VIN from your form, you just need to trigger the GET workflow. And how have you setup the GET API on the Xano end for getting a single item? From your screenshot of the XANO call it looks like it queries the entire vin_nhtsa table?

I use xano because i want to centralize my backend data for future projects.

Take a lookat the following video i recorded what i have.

If you guys suggest to do this withing bubble instead of xano please show me how can it be done.

1 Like

How will i setup workflow for this api? can you help?

Here’s a demo:

this app is slow because all of plugins in testing mode, but you will see how I’ve set thing. Enter the demo VIN (5UXWX7C5*BA)

1 Like

I’ve been trying to figure out NHTSA APIs for a while now🤦🏾‍♂️. It’s really the last aspect of my road side app I’m missing. Could someone explain how to use the APIs to get a vehicle safety ratings ?

Seems like this page would be useful for you:

@vsafetyalliance Tomorrow I can look into this, you need the base URL of their API then you add on the /SafetyRatings/ method followed by vehicleID according to their doc.

But first you would need to setup the other calls to Get the vehicles types and models so you know what vehicleID to call to their SafetyRatings call

1 Like

That little response gave me much more insight than I originally had! I would have to do a call for the requested vehicle id, and in the same workflow do the call when the new vehicle id? (Mind you I might know what I need to do, but still don’t know how to set it up🤦🏾‍♂️)

What is your user interface? Is it like when you pick your car on tire websites with drop-downs for year, make, model, trim, then it gives you safety info?

That would be ideal. But I think it might be simpler if I just set up an Vin# search api from NHTSA. Have an input then search button, and have text fields to display the data.
I think it’s easier for a user to use their vehicle information, but I know it would be more work on my end to send up the APIs to pull and show all vehicles years, models and makes.

@vsafetyalliance Shame… taking the easy route and making your users do more work… jk, but I think it’s really not that bad to have some dropdowns to pick a Make, Model, Year, to get a safety info. You don’t have to save any data because the API calls will retrieve that stuff… I’m messing with the VIN decode now.

my apologizes for my late response, I would love to have the vehicle information but I just cant grasp api’s on my own smh. APIs ate the only aspect of my app that is keeping me from deployment. Example, I see the syntax on NHTSA API page. to get recalls, its api.nhtsa.gov/recalls/recallsByVehicle?make={MAKE}&model={MODEL}&modelYear={MODEL_YR} but im not 100% sure where I would put it. NHTSA doesnt give a set “key” and “value”