# Post request to 3rd party API

**URL:** <https://forum.wixstudio.com/t/post-request-to-3rd-party-api/38243>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [April 20, 2018, 12:49am UTC](https://forum.wixstudio.com/t/post-request-to-3rd-party-api/38243 "2018-04-20T00:49:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eddie-lewis](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/eddie-lewis/32/1103_2.png) [@eddie-lewis](https://forum.wixstudio.com/u/eddie-lewis)\
**Post date:** [April 20, 2018, 12:49am UTC](https://forum.wixstudio.com/t/post-request-to-3rd-party-api/38243/1 "2018-04-20T00:49:16Z")

</div>

Hello, I am needing to make a post request to a 3rd party api. The example below is using a node library. I need to convert it to Wix Code module, any help with this would be greatly appreciated. I understand that the post data should come from a form from my page code. Also, I need the response from the post request to be placed in a database. The require portion is node, but I do not need. I think I need to create a export function? that is call from my page code?

const request = require(‘request’);  
const url = ‘[https://api.housecanary.com/v2/property/value](https://api.housecanary.com/v2/property/value)’;  
const postData = [{‘address’: ‘43 Valmonte Plaza’, ‘zipcode’: ‘90274’}, {‘address’: ‘7500 Melrose Ave’, ‘zipcode’: ‘90046’}];

request.post({ url: url, auth: { user: ‘my\_api\_key’, pass: ‘my\_api\_secret’ },

body: postData, json: true }, function (error, response, body) { console.log(body); });
