-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgoogle_nodejs.js
More file actions
44 lines (38 loc) · 948 Bytes
/
Copy pathgoogle_nodejs.js
File metadata and controls
44 lines (38 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const https = require('https');
// Primary (Recommended): OSINT Trace Direct API
const options = {
method: 'POST',
hostname: 'api.osinttrace.com',
port: 443,
path: '/v1/check/google',
headers: {
'x-osint-key': 'YOUR_OSINT_KEY',
'Content-Type': 'application/json'
}
};
// Alternative (RapidAPI):
// const options = {
// method: 'POST',
// hostname: 'google-checker2.p.rapidapi.com',
// port: null,
// path: '/check',
// headers: {
// 'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY',
// 'x-rapidapi-host': 'google-checker2.p.rapidapi.com',
// 'Content-Type': 'application/json'
// }
// };
const req = https.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
input: "test@gmail.com"
}));
req.end();