UNPKG

scrapegraph-js

Version:

Scrape and extract structured data from a webpage using ScrapeGraphAI's APIs.

12 lines (9 loc) 231 B
import { getCredits } from 'scrapegraph-js'; import 'dotenv/config'; const apiKey = process.env.SGAI_APIKEY; try { const myCredit = await getCredits(apiKey); console.log(myCredit); } catch (error) { console.error(error); }