{"id":18576558,"url":"https://github.com/bigdatacloudapi/nodejs-api-client","last_synced_at":"2025-04-10T09:30:32.720Z","repository":{"id":65732123,"uuid":"179824808","full_name":"bigdatacloudapi/nodejs-api-client","owner":"bigdatacloudapi","description":"A NodeJS client for BigDataCloud API connectivity","archived":false,"fork":false,"pushed_at":"2023-09-26T05:33:53.000Z","size":33,"stargazers_count":15,"open_issues_count":1,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T19:05:59.607Z","etag":null,"topics":["api","api-client","big-data","bigdata","bigdatacloud","bigdatacloudapi","fraud-detection","ip-address","ip-address-lookup","ip-address-tool","ip-address-web-service","ip-geolocation","ip-geolocation-api","ip-location","ip-lookup","node","node-api","node-js","node-library","nodejs"],"latest_commit_sha":null,"homepage":"https://www.bigdatacloud.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bigdatacloudapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-04-06T11:28:29.000Z","updated_at":"2024-03-06T17:25:54.000Z","dependencies_parsed_at":"2024-11-06T23:29:04.178Z","dependency_job_id":"4be18a54-d46e-4beb-91a5-5e478070fee2","html_url":"https://github.com/bigdatacloudapi/nodejs-api-client","commit_stats":{"total_commits":7,"total_committers":4,"mean_commits":1.75,"dds":0.5714285714285714,"last_synced_commit":"ccd0f0326ace013ef34aeccc3c9cc8388562075c"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigdatacloudapi%2Fnodejs-api-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigdatacloudapi%2Fnodejs-api-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigdatacloudapi%2Fnodejs-api-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigdatacloudapi%2Fnodejs-api-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigdatacloudapi","download_url":"https://codeload.github.com/bigdatacloudapi/nodejs-api-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248019351,"owners_count":21034222,"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","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":["api","api-client","big-data","bigdata","bigdatacloud","bigdatacloudapi","fraud-detection","ip-address","ip-address-lookup","ip-address-tool","ip-address-web-service","ip-geolocation","ip-geolocation-api","ip-location","ip-lookup","node","node-api","node-js","node-library","nodejs"],"created_at":"2024-11-06T23:25:24.622Z","updated_at":"2025-04-10T09:30:32.384Z","avatar_url":"https://github.com/bigdatacloudapi.png","language":"JavaScript","readme":"# BigDataCloud NodeJS API Client\n\n\nA NodeJS client for connecting to the API services provided by [BigDataCloud](https://www.bigdatacloud.com).\n\n\n## What API services does [BigDataCloud](https://www.bigdatacloud.com) offer?\n\nBigDataCloud offers a range of extremely useful and fast APIs that can be utilised in both backend and frontend scenarios.\nFrom validating customer input live to the next generation of IP Geolocation technology, BigDataCloud has an API suitable to your needs.\n\nYou can access any and all BigDataCloud APIs with a free API Key.\nTo get your API Key, just access your account and retrieve it from your [Account Dashboard](https://www.bigdatacloud.com/account).\n\nIf you are not yet a customer, it is completely free to join.\n\n### BigDataCloud API Packages\n\nAll BigDataCloud APIs are bundled into five different API packages. Each API package has its own subscription plans and pricings. \n\nYou can find more details on the respective API packages page.\n- [IP Geolocation Package](https://www.bigdatacloud.com/ip-geolocation)\n- [Reverse Geocoding Package](https://www.bigdatacloud.com/reverse-geocoding)\n- [Phone \u0026 Email Verification Package](https://www.bigdatacloud.com/phone-email-verification)\n- [Network Engineering Package](https://www.bigdatacloud.com/network-engineering), and\n- [Free API Package](https://www.bigdatacloud.com/free-api) (doesn't require account creation and API key)\n\n## Documentation\n\nFor documentation specific to this api client, please read below.\nFor more specific documentation to the APIs available, including endpoints, request and response data, please visit the respective API package page.\n\n\n## Update Notes\n\n- This repository now utilises `node-fetch` rather than the deprecated `request` module.\n- Calls to the API will return a JSON object as a successful response, see below for an example\n- Exceptions return a single object: `{error:json_object || error_string,code:http_status_code}`\n\n\n\n## Authentication / Identification\n\nTo use this API client you must have a BigDataCloud API Key.\nTo get your personal key, just access your account and retrieve it from your [Account Dashboard](https://www.bigdatacloud.com/account).\nIf you are not yet a customer, it is completely free to join.\n\nSimply provide this key when initiating the api client, and it will be included in all requests to the BigDataCloud API Server.\nSee the example below.\n\n\n\n## Installation\n\n`npm install @bigdatacloudapi/client`\n\n\n\n## Example usage\n\nThe below example is found in the included demo.js.\n\n```javascript\n    const client = require('@bigdatacloudapi/client')('XXX'); // XXX being your api key found at: https://www.bigdatacloud.com/account\n\n    /*\n     * All api endpoints can be accessed via magic methods in the following camelised format:\n     * method | endpoint\n     * For example: an asynchronous \"GET\" call to the \"ip-geolocation-full\" endpoint would be: client.getIpGeolocationFull();\n     * All endpoints return a promise\n     */\n\n    //Asynchronous example using 'then':\n    client\n    .getIpGeolocationFull({ip:'8.8.8.8'})\n    .then(jsonResult=\u003e {\n        console.log('Asynchronous \"then\" result:',jsonResult);\n    })\n    .catch(function(error) {\n        console.error('Asynchronous \"then\" error:', error);\n    });\n\n    //Asynchronous example using 'await':\n    (async function() {\n        try {\n            var jsonResult = await client.getIpGeolocationFull({ip:'8.8.8.8'});\n            console.log('Asynchronous \"await\" result:',jsonResult);\n        } catch (error) {\n            console.error('Asynchronous \"await\" error:', error);\n        }\n    })();\n\n```\n\n\n## Example output\n\n```javascript\n{\n    \"ip\": \"8.8.8.8\",\n    \"country\": {\n        \"isoAlpha2\": \"US\",\n        \"isoAlpha3\": \"USA\",\n        \"m49Code\": 840,\n        \"isoName\": \"United States of America (the)\",\n        \"isoAdminLanguages\": [\n            {\n                \"isoAlpha3\": \"eng\",\n                \"isoAlpha2\": \"en\",\n                \"isoName\": \"English\"\n            }\n        ],\n        \"unRegion\": \"Americas/Northern America\",\n        \"currency\": {\n            \"numericCode\": 840,\n            \"code\": \"USD\",\n            \"name\": \"US Dollar\",\n            \"minorUnits\": 2\n        },\n        \"wbRegion\": {\n            \"id\": \"NAC\",\n            \"iso2Code\": \"XU\",\n            \"value\": \"North America\"\n        },\n        \"wbIncomeLevel\": {\n            \"id\": \"HIC\",\n            \"iso2Code\": \"XD\",\n            \"value\": \"High income\"\n        },\n        \"callingCode\": \"1\",\n        \"countryFlagEmoji\": \"🇺🇸\"\n    },\n    \"location\": {\n        \"isoPrincipalSubdivision\": \"California\",\n        \"isoPrincipalSubdivisionCode\": \"US-CA\",\n        \"city\": \"Mountain View\",\n        \"postcode\": \"94043\",\n        \"latitude\": 37.42,\n        \"longitude\": -122.09,\n        \"timeZone\": {\n            \"ianaTimeId\": \"America/Los_Angeles\",\n            \"displayName\": \"(UTC-08:00) Pacific Time (US \u0026 Canada)\",\n            \"effectiveTimeZoneFull\": \"Pacific Daylight Time\",\n            \"effectiveTimeZoneShort\": \"PDT\",\n            \"UtcOffsetSeconds\": -25200,\n            \"UtcOffset\": \"-07\",\n            \"isDaylightSavingTime\": true,\n            \"localTime\": \"2019-04-06T04:06:39.1691744\"\n        }\n    },\n    \"lastUpdated\": \"2019-04-06T09:09:36.1877959Z\",\n    \"network\": {\n        \"registry\": \"ARIN\",\n        \"registryStatus\": \"assigned\",\n        \"registeredCountry\": \"US\",\n        \"registeredCountryName\": \"United States of America (the)\",\n        \"organisation\": \"Google LLC\",\n        \"isReachableGlobally\": true,\n        \"isBogon\": false,\n        \"bgpPrefix\": \"8.8.8.0/24\",\n        \"bgpPrefixNetworkAddress\": \"8.8.8.0\",\n        \"bgpPrefixLastAddress\": \"8.8.8.255\",\n        \"totalAddresses\": 256,\n        \"carriers\": [\n            {\n                \"asn\": \"AS15169\",\n                \"asnNumeric\": 15169,\n                \"organisation\": \"Google LLC\",\n                \"name\": \"GOOGLE\",\n                \"registry\": \"ARIN\",\n                \"registeredCountry\": \"US\",\n                \"registeredCountryName\": \"United States of America (the)\",\n                \"registrationDate\": \"2000-03-30\",\n                \"registrationLastChange\": \"2012-02-25\",\n                \"totalIpv4Addresses\": 8698103,\n                \"totalIpv4Prefixes\": 435,\n                \"totalIpv4BogonPrefixes\": 0,\n                \"rank\": 53,\n                \"rankText\": \"#53 out of 62,872\"\n            }\n        ],\n        \"viaCarriers\": [\n            {\n                \"asn\": \"AS7018\",\n                \"asnNumeric\": 7018,\n                \"organisation\": \"ATT Services Inc.\",\n                \"registeredCountry\": \"US\",\n                \"registeredCountryName\": \"United States of America (the)\",\n                \"rank\": 2\n            },\n       \t\t/*........*/\n            {\n                \"asn\": \"AS31019\",\n                \"asnNumeric\": 31019,\n                \"organisation\": \"Paulus M. Hoogsteder trading as Meanie\",\n                \"registeredCountry\": \"NL\",\n                \"registeredCountryName\": \"Netherlands (the)\",\n                \"rank\": 51153\n            }\n        ]\n    },\n    \"confidence\": \"low\",\n    \"confidenceArea\": [\n        {\n            \"latitude\": 18.0256672,\n            \"longitude\": -66.5275345\n        },\n        /*........*/\n        {\n            \"latitude\": 18.0256672,\n            \"longitude\": -66.5275345\n        }\n    ],\n    \"securityThreat\": \"unknown\",\n    \"hazardReport\": {\n        \"isKnownAsTorServer\": false,\n        \"isKnownAsVpn\": false,\n        \"isKnownAsProxy\": false,\n        \"isSpamhausDrop\": false,\n        \"isSpamhausEdrop\": false,\n        \"isSpamhausAsnDrop\": false,\n        \"isBlacklistedUceprotect\": false,\n        \"isBlacklistedBlocklistDe\": false,\n        \"isKnownAsMailServer\": false,\n        \"isKnownAsPublicRouter\": false,\n        \"isBogon\": false,\n        \"isUnreachable\": false,\n        \"hostingLikelihood\": 0,\n        \"isHostingAsn\": false,\n        \"isCellular\": false,\n        \"iCloudPrivateRelay\": false\n    }\n}\n```\n\n\n## Error Handling\n\nUtilize standard error handling practices as shown in the above example.\n\nWrap any synchronous calls in a try/catch handler, and ensure to include the .catch() method on any async calls.\n\n```javascript\n   \n    //Asynchronous error handling\n    client\n    .getIpGeolocationFull({ip:'8.8.8.8'})\n    .then((jsonResult=\u003e {\n        //success\n    })\n    .catch(function(error) {\n        console.error('Asynchronous \"then\" error:', error);\n    });\n\n    //Synchronous error handling\n    (async function() {\n        try {\n            //success\n        } catch (error) {\n            console.error('Asynchronous \"await\" error:', error);\n        }\n    })();\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigdatacloudapi%2Fnodejs-api-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigdatacloudapi%2Fnodejs-api-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigdatacloudapi%2Fnodejs-api-client/lists"}