{"id":19836649,"url":"https://github.com/rapidapi/rapidapi-nodejs-sdk","last_synced_at":"2025-07-29T03:04:35.570Z","repository":{"id":115518573,"uuid":"86450734","full_name":"RapidAPI/rapidapi-nodejs-sdk","owner":"RapidAPI","description":" Use RapidAPI blocks from your NodeJS app using this SDK","archived":false,"fork":false,"pushed_at":"2023-04-27T15:45:49.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-18T18:47:12.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RapidAPI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-28T11:13:52.000Z","updated_at":"2017-03-28T11:14:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"dbff93b3-4215-4772-9e06-324637ee3c65","html_url":"https://github.com/RapidAPI/rapidapi-nodejs-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RapidAPI/rapidapi-nodejs-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAPI%2Frapidapi-nodejs-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAPI%2Frapidapi-nodejs-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAPI%2Frapidapi-nodejs-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAPI%2Frapidapi-nodejs-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RapidAPI","download_url":"https://codeload.github.com/RapidAPI/rapidapi-nodejs-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAPI%2Frapidapi-nodejs-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267621579,"owners_count":24116900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T12:12:05.536Z","updated_at":"2025-07-29T03:04:35.536Z","avatar_url":"https://github.com/RapidAPI.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://storage.googleapis.com/rapid_connect_static/static/github-header.png\" width=350 /\u003e\n\u003c/p\u003e\n\n## Overview\nRapidAPI is the world's first opensource API marketplace. It allows developers to discover and connect to the world's top APIs more easily and manage multiple API connections in one place.\n\n## Set-up:\n\nFirst of all, download the npm module:\n\n    npm install rapidapi-connect --save\n\nThen, require the package in your code:\n\n    const RapidAPI = require('rapidapi-connect');\n\nOnce required, the last step is to initialize the SDK with your project name and project API Key:\n\n    const rapid = new RapidAPI('PROJECT_NAME', 'API_KEY');\n\nThat's all, your SDK is set up! You can now use any block by copying the code snippet from the marketplace.\n\n## Usage:\n\nTo use any block in the marketplace, just copy it's code snippet and paste it in your code. For example, the following is the snippet fot the **Delivery.sendSMS** block:\n\n    rapid.call('Delivery', 'sendSMS', {\n        message: 'Hello, connect!',\n        to : '4158496404'\n    })\n        .on('success', (payload) =\u003e {\n            console.log('success');\n        })\n        .on('error', (err) =\u003e {\n            console.warn(err);\n        });\n\nThe following will call the **Calculate.add** block, and print the result:\n\n    rapid.call('Calculate', 'add', {\n            num1: 11,\n            num2 : 2\n        })\n        .on('success', (payload) =\u003e {\n            console.log(payload);\n        })\n        .on('error', (err) =\u003e {\n            console.warn(err);\n        });\n\nThe printed result will be `13`.\n\n**Notice** that the `error` event will also be called if you make an invalid block call (for example - the package you refer to does not exist).\n\n## Files:\nWhenever a block in RapidAPI requires a file, you can either pass a URL to the file or a read stream.\n\n### URL:\nThe following code will call the block MicrosoftComputerVision.analyzeImage with a URL of an image:\n\n```\nrapid.call('MicrosoftComputerVision', 'analyzeImage', {\n    subscriptionKey : '############################',\n    image : 'https://i.ytimg.com/vi/tntOCGkgt98/maxresdefault.jpg\n})\n    .on('success', (payload) =\u003e {\n        console.log('S');\n        console.log(payload);\n    })\n    .on ('error', (payload) =\u003e {\n        console.log('E');\n        console.log(payload);\n    });\n```\n\n### Read Stream\nIf the file is locally stored, you can read it using `fs` and pass the read stream to the block, like the following:\n```\nrapid.call('MicrosoftComputerVision', 'analyzeImage', {\n    subscriptionKey : '############################',\n    image : fs.createReadStream(__dirname + '/m.jpeg')\n})\n    .on('success', (payload) =\u003e {\n        console.log('S');\n        console.log(payload);\n    })\n    .on ('error', (payload) =\u003e {\n        console.log('E');\n        console.log(payload);\n    });\n```\n\nRapidAPI uses the [form-data](https://github.com/form-data/form-data) library by [@felixge](https://github.com/felixge) to handle files, so please refer to it for more information.\n\n\n### Webhooks\nAfter setting up the webhook, you can listen to real-time events via websockets like so:\n\n```\nrapid.listen('Slack', 'slashCommand', {token: 'YOUR_TOKEN_HERE', command: '/slash-command'})\n    .on('join', msg =\u003e { console.log(\"join: \", msg); })\n    .on('error', msg =\u003e { console.log(\"error: \", msg); })\n    .on('message', payload =\u003e { console.log(\"message: \", payload); })\n    .on('timeout', reason =\u003e { console.log(\"timeout: \", payload); })\n    .on('close', reason =\u003e { console.log(\"close: \", reason); });\n```\n## Issues:\n\nAs this is a pre-release version of the SDK, you may expirience bugs. Please report them in the issues section to let us know. You may use the intercom chat on rapidapi.com for support at any time.\n\n## Licence:\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidapi%2Frapidapi-nodejs-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapidapi%2Frapidapi-nodejs-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidapi%2Frapidapi-nodejs-sdk/lists"}