
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
nb-scraper
Advanced tools
A comprehensive TypeScript scraper library by NB Team that provides easy-to-use functions for interact with various scraper service from NB Scripts.
Untuk update terbaru, dukungan, dan sumber daya scraping terbaik, ikuti saluran resmi kami:
NB SCRAPER di WhatsApp:
Join Channel
This project is designed to be easy to use. Visit the WhatsApp Channel for the code resources
Using npm:
npm install nb-scraper
Using yarn:
yarn add nb-scraper
Using pnpm:
pnpm add nb-scraper
import { generateDeepInfraResponse } from 'nb-scraper';
const result = await generateDeepInfraResponse({
prompt: "Explain JavaScript in simple terms",
model: "deepseek-ai/DeepSeek-R1"
});
if (result.status) {
console.log(result.data.response);
}
const { generateDeepInfraResponse } = require('nb-scraper');
// Same usage as above
(async () => {
const result = await generateDeepInfraResponse('What the meaning of Pahlawan Indonesia?');
console.log(result);
})();
{
creator: "...",
status: true,
data: {
response: "...",
}
}
{
creator: "NB Team",
status: false,
error: "[NETWORK_ERROR] Request timeout after 30000ms"
}
NB Scraper is designed to never throw errors. Instead, all functions return a response object with a status
field:
const result = await generateDeepInfraResponse('test query');
if (result.status) {
// Success - use result.data
console.log(result.data.response);
} else {
// Error - check result.error
console.error(result.error);
}
Common error types:
NETWORK_ERROR
: Connection, timeout, or server issuesINVALID_INPUT
: Invalid parameters or URL formatINVALID_RESPONSE
: Unexpected response format from APIRATE_LIMITED
: Rate limiting or quota exceededSERVICE_UNAVAILABLE
: Service temporarily unavailableSee the ERROR TYPES
See The scrapers folder
This project is licensed under the Unlicense – see the LICENSE file for details.
Made with ☕
FAQs
Community scraper library by Newbie Scrape
We found that nb-scraper demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.