# API - calling from knack.com

**URL:** <https://forums.knack.com/t/api-calling-from-knack-com/17880>\
**Category:** API & Custom Code\
**Created:** [September 11, 2024, 4:40pm UTC](https://forums.knack.com/t/api-calling-from-knack-com/17880 "2024-09-11T16:40:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![GSH](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/gsh/32/2669_2.png) [@GSH](https://forums.knack.com/u/GSH)\
**Post date:** [September 11, 2024, 4:40pm UTC](https://forums.knack.com/t/api-calling-from-knack-com/17880/1 "2024-09-11T16:40:54Z")

</div>

So I wanted to know whether it is necesary to use something like Zapier for sending API calls or whether this can be programmed within KNACK.

I have done various API connections using Knack but the one to which I want to connnect does not have that ability. I therefore wonder whether there is something that I need to use in Zapier to do this. IE: Is there some kind of zap that will allow you to create and dispatch API calls.

Thanks.

---

<div class="post-metadata">

**Author:** ![KnackPros](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/knackpros/32/807_2.png) [@KnackPros](https://forums.knack.com/u/KnackPros)\
**Post date:** [September 11, 2024, 5:05pm UTC](https://forums.knack.com/t/api-calling-from-knack-com/17880/2 "2024-09-11T17:05:04Z")

</div>

If you’re comfortable working with code, you can make API calls in Knack’s “Custom JavaScript” tab. However, many APIs require a sensitive API key which should not be exposed in frontend code.

Additionally, Zapier and similar solutions (Make, Pipedream) provide modules to make API requests.

Since you’re using Zapier already, you can use an API Request action, currently in beta at the time of this writing. Link: [https://help.zapier.com/hc/en-us/articles/14096700504717-Make-raw-HTTP-requests-with-API-Request-actions-Beta](https://help.zapier.com/hc/en-us/articles/14096700504717-Make-raw-HTTP-requests-with-API-Request-actions-Beta)

---

<div class="post-metadata">

**Author:** ![GSH](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/gsh/32/2669_2.png) [@GSH](https://forums.knack.com/u/GSH)\
**Post date:** [September 11, 2024, 8:25pm UTC](https://forums.knack.com/t/api-calling-from-knack-com/17880/3 "2024-09-11T20:25:42Z")

</div>

Not comfortable with code but I have a person that is and your link was what I was hoping for, so many thanks.

---

<div class="post-metadata">

**Author:** ![GSH](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/gsh/32/2669_2.png) [@GSH](https://forums.knack.com/u/GSH)\
**Post date:** [September 11, 2024, 8:33pm UTC](https://forums.knack.com/t/api-calling-from-knack-com/17880/4 "2024-09-11T20:33:57Z")

</div>

Do you happen to know whether the Zapier integration will allow you to import multiple data rows into knack. I can see that you can make API calls but it does say CREATE RECORD, I am hoping that it can CREATE RECORDS assuming that the data in the imported request has more than 1 record.

My thinking was to create an app and give it to a Developer that can then work out how to do it, which I can then migrate to my production site

Not a Developer so just using this forum as a sounding board for this workflow.

Thanks.

---

<div class="post-metadata">

**Author:** ![KnackPros](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/knackpros/32/807_2.png) [@KnackPros](https://forums.knack.com/u/KnackPros)\
**Post date:** [September 11, 2024, 8:40pm UTC](https://forums.knack.com/t/api-calling-from-knack-com/17880/5 "2024-09-11T20:40:40Z")

</div>

Yes, you can use Looping by Zapier to run an action (“Create Record”) more than once. It will loop through the records in the incoming request, acting on each one.  
Link: [https://help.zapier.com/hc/en-us/articles/8496106701453-Loop-your-Zap-actions](https://help.zapier.com/hc/en-us/articles/8496106701453-Loop-your-Zap-actions)

---

<div class="post-metadata">

**Author:** ![GSH](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/gsh/32/2669_2.png) [@GSH](https://forums.knack.com/u/GSH)\
**Post date:** [September 12, 2024, 8:29am UTC](https://forums.knack.com/t/api-calling-from-knack-com/17880/6 "2024-09-12T08:29:19Z")

</div>

That’s brilliant thank you.

---

<div class="post-metadata">

**Author:** ![GSH](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/gsh/32/2669_2.png) [@GSH](https://forums.knack.com/u/GSH)\
**Post date:** [September 24, 2024, 9:26pm UTC](https://forums.knack.com/t/api-calling-from-knack-com/17880/7 "2024-09-24T21:26:24Z")

</div>

If we have an API response with 30 different data points, do you know if we can filter out the ones we don’t want before we import it to knack?

---

<div class="post-metadata">

**Author:** ![KnackPros](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/knackpros/32/807_2.png) [@KnackPros](https://forums.knack.com/u/KnackPros)\
**Post date:** [September 25, 2024, 11:04pm UTC](https://forums.knack.com/t/api-calling-from-knack-com/17880/8 "2024-09-25T23:04:20Z")

</div>

More information is needed to make a recommendation, but yes in general, Zapier/Make/Pipedream all provide ways to parse the data that comes back from an API response.

Could you share more details? You’re making an API request, receiving a response from the API, and then you want to filter the data, and use that data to create records in Knack?

---

<div class="post-metadata">

**Author:** ![GSH](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/gsh/32/2669_2.png) [@GSH](https://forums.knack.com/u/GSH)\
**Post date:** [September 26, 2024, 7:30am UTC](https://forums.knack.com/t/api-calling-from-knack-com/17880/9 "2024-09-26T07:30:35Z")

</div>

Thanks for your offer. I handed this over to my API programmer and won’t take up any more of your time. They said “that should be easy” so I think it’s just about me wanting to understand but needing to let someone else do it!
