SOLVED: Help with Using CarQuery API and API Connector

I’m trying to use CarQuery’s API using the API Connector
http://www.carqueryapi.com/documentation/api-usage/

When I manually create a query based on their URL (see below), I get data I’d expect to see.
https://www.carqueryapi.com/api/0.3/?callback=?&cmd=getTrims&make=honda&year=2018&model=accord&full_results=0&sold_in_us=1

I thought I was setting up the API connector correctly (see below). Here’s the GET call:
https://www.carqueryapi.com/api/0.3/?callback=?&cmd=getTrims&make=[make]&year=[year]&model=[model]&full_results=0

But when I go and initialize the call, I get a bubble message saying the call is JSON/XML but the call is returning text. From reading CarQuery’s material, I thought their API was returning JSON data type.
image

CarQuery also mentions $.getJSON and shows a code snippet (see CarQuery url at top). But I don’t know if I need to do something with it in bubble in order to use their API?

Anyone have a thought on how to get the CarQuery API working with API Connector?

You will need to remove ?callback=? so rather than say,

https://www.carqueryapi.com/api/0.3/?callback=?&cmd=getMakes&year=2000&sold_in_us=1

you would call,

https://www.carqueryapi.com/api/0.3/?cmd=getMakes&year=2000&sold_in_us=1

then add a header with the key Content-Type & the value application/jsonp

that should sort it out.

2 Likes

Thanks Jarrad - that fixed it! Much appreciated.

1 Like