saldor
v0.1.5
Published
A TypeScript SDK for the Saldor API
Downloads
170
Readme
Saldor SDK for Web Scraping
This is the official SDK for Saldor, a powerful AI web scraping tool. With this SDK, you can easily integrate Saldor's capabilities into your application, allowing you to extract data from websites with ease.
For more information about Saldor and its features, please visit saldor.com.
Getting Started
After npm install saldor
here's a basic example of how to use a Saldor Client in your Typescript code.
import { SaldorClient } from './src/SaldorClient';
// Initialize the client with your API key
const apiKey = 'YOUR_API_KEY';
const client = new SaldorClient({apiKey: apiKey});
async function fetchData() {
const url = 'https://example.com';
try {
const response = await client.crawl(url, goal = "I want X data from this site");
console.log('Scraped Data:', response.data);
} catch (error) {
console.error('Error scraping data:', error);
}
}
fetchData();