Skip to content

Instantly share code, notes, and snippets.

@xbladev
Last active February 17, 2026 16:08
Show Gist options
  • Select an option

  • Save xbladev/f9c634812fa9e58c4e159dddd0afd76a to your computer and use it in GitHub Desktop.

Select an option

Save xbladev/f9c634812fa9e58c4e159dddd0afd76a to your computer and use it in GitHub Desktop.
ai scraper
//Free Scrape Channel
// https://whatsapp.com/channel/0029Vb6xGdD11ulNhYPtMt3j
const axios = require('axios');
const { v4: uuidv4 } = require('uuid');
async function askNoteGPT(userInput) {
const targetApi = 'https://notegpt.io/api/v2/chat/stream';
const randomId = uuidv4();
const payload = {
message: userInput,
language: "auto",
model: "gpt-4.1-mini", // gpt-4.1-mini, deepseek-chat
tone: "default",
length: "moderate",
chat_mode: "standard",
conversation_id: randomId,
image_urls: []
};
try {
const response = await axios.post(targetApi, payload, {
headers: {
'Accept': 'application/json, text/plain, */*',
'Content-Type': 'application/json',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36',
'Origin': 'https://notegpt.io',
'Referer': 'https://notegpt.io/',
}
});
const rawData = response.data;
const lines = rawData.split('\n');
let fullText = "";
lines.forEach(line => {
if (line.startsWith('data: ')) {
const jsonPart = line.replace('data: ', '').trim();
try {
const parsed = JSON.parse(jsonPart);
if (parsed.text) {
fullText += parsed.text;
}
} catch (e) {
}
}
});
console.log({
status: true,
creator: 'sandarux',
conversation_id: randomId,
result: fullText.trim()
});
} catch (error) {
console.log({
status: false,
creator: 'sandarux',
error: error.message
});
}
}
askNoteGPT("hi")
// RESULT
{
status: true,
creator: 'sandarux',
conversation_id: '24b8e538-c028-45e1-91db-82b4f41ab942',
result: 'Hello! How can I assist you today?'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment