norns-ai
v0.1.1
Published
Norns AI Client Library
Readme
NORNS.AI
A simple client library for the Norns AI data extraction API.
Installation
npm install norns-aiUsage
import NornsAI from "norns-ai";
const app = new NornsAI({ apiKey: "YOUR_API_KEY" });
(async () => {
const result = await app.scrape("https://example.com");
if (!result.success) {
console.error("Error:", result.error);
} else {
console.log("Scrape data:", result.data);
}
})();API
Constructor
new NornsAI({ apiKey: string });apiKey: Your Norns API key from https://norns.ai.
scrape(url: string)
Accepts a URL to scrape. Returns a Promise with a result:
{
success: boolean;
data?: any;
error?: string;
}Example cURL
curl --request POST 'https://www.norns.ai/api/v0/scrape' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"url": "https://example.com"
}'