Hello,
I need help fetching data.
I’m new to airtable and also don’t have much experience in scripting but I do have some code experience.
I’m trying to fetch Zipcodes from https://www.zipcodeapi.com/API
I can use one of the two:
- GET, Zip codes by radius.
- POST, multi zip codes by radius.
I did authorize the airtable domain https://www.zipcodeapi.com/ClientKeySetup to get js-key. as zipcodeapi suggested.
This is the code I have that use the GET method (yes I know):
// @ts-nocheck
let response = await fetch(‘https://www.zipcodeapi.com/rest/js-APIKEY/radius.json/59718/30/mile’)
console.log(await radius.json());
I get:
### ERROR
ReferenceError: radius is not defined
at main on line 3
I did tried to add method, headers… all kind of thigs but with no luck. I know I’m doing it wrong.
Any help please?
Thank you very much
Ehud