API GET Call for Skiptracing - Need Help

Hi Bubblers,
I’m creating an app that will skiptrace and using the Scrapeak API. I don’t have any problems using the docs params for Name Search, but the Address search is giving me the blues. I reached out to them and they say that they tested and it works fine. They suggest that may there is “parsing issue” on Bubble side of things.

Here are some snapshots of the workflow and the API Connector setup. Also, here is the instructions I’ve been following with a copy of their “response data”.
SEARCH BY ADDRESS

import requests

#/ Set your API key and query
api_key = “YOUR-API-KEY” # CHANGE WITH YOUR API KEY

address = “THE ADDRESS OF PERSON”
location = “CITY, STATE ZIPCODE”

#/ API endpoint
api_url = “https://app.scrapeak.com/v1/scrapers/people_search/search

parameters = {“api_key”: api_key, “search_by”:“address”, “address”: address, “location”:location}

#/ Make the API request
response = requests.get(api_url, params=parameters)
response_content = response.text

print(response_content)

ADDRESS RESPONSE

{
“is_success”: true,
“data”: [
{
“fullName”: “John Smith”,
“location”: “Dover, MA”,
“coordinate_lat”: “42.232005”,
“coordinate_lng”: “-71.306082”,
“age”: “88”,
“currentHomeAddress”: “32 Miller Hat Rd, Dover MA 02030”,
“pastAddresses”: [

],
“phone”: [

],
“aka”: [

],
“relatives”: [

]
}

],
“message”: “Scraped successfully!”
}

Can anyone identify what I’m missing? I see that the fields are different that the sample response data. How would you set this up on the Bubble end if you were developing it for yourself?

Thanks in advance for your help!
K


It looks like when you initialized it you didn’t use good sample data so the API responded without any thing for “data”.

This part is missing from the API response:

“data”: [
{
“fullName”: “John Smith”,
“location”: “Dover, MA”,
“coordinate_lat”: “42.232005”,
“coordinate_lng”: “-71.306082”,
“age”: “88”,
“currentHomeAddress”: “32 Miller Hat Rd, Dover MA 02030”,
“pastAddresses”: [
…
],
“phone”: [
…
],
“aka”: [
…
],
“relatives”: [
…
]
}
…
],

Try initializing again using real data for “address” and stuff, then make sure the response has the “data” object with more properties within that.

Hi Tyler, so glad you responded :slight_smile:
Where do I put this? I re-initialized and this is what showed up…(pic)

I don’t see the JSON box I saw on the connector to put the code–where did it go? Do I need to create another api to see it?


Thanks,
Kim

Yea so notice data: [], doesn’t have all your data you want between the [] that’s cause the API found no results and returned nothing, so Bubble has no idea what fields to let you pick in the editor

Your parameters address and location just need some real world values to make the API respond with real data.

The Value boxes on the right are your values you are sending to the API to initialize it:
Screenshot_18

Makes sense??

You can manually specify the response using their example response so Bubble “learns” what the structure of data is, but I save that for last cause their example response could be different than real world response

I get it now…a little “slow”, but Im going to input a real address / location, and then re-initialize. Then, I’ll go back and put the params that were given, so that when I go back to make changes in my workflow I can make those two dynamic so the user can search for what they want. I get it. I’m going to test now. Thank you, Tyler :slightly_smiling_face:

It WORKED!!! Yaaaay!!! Thanks,
K

1 Like