0.0.3 • Published 9 months ago

rocketscraper v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Rocket Scraper API Node.js SDK

Node.js SDK (with TypeScript support) for the Rocket Scraper API. For more information, visit the GitHub repository.

Requirements

Installation

npm install rocketscraper

Usage

To use the SDK, you need to create a new instance of the RocketClient class and pass your API key as an argument.

Setup

import { createRocketClient } from 'rocketscraper';

const rocketClient = createRocketClient({
  apiKey: 'YOUR_API_KEY',
});

Scrape

The scrape method allows you to scrape data from a website using a schema. The method returns the scraped data in the format specified in the schema.

const data = await rocketClient.scrape({
  url: 'https://ycombinator.com/companies/pagerduty',
  schema: {
    company: 'string',
    image_url: 'string',
    founded_at: 'string',
    size: 'integer',
    location: 'string',
    short_description: 'string',
    long_description: 'string',
    is_active: 'boolean',
    founders: [
      {
        name: 'string',
        role: 'string',
      },
    ],
  },
});

console.log(data);

For more details, visit the Node.js SDK GitHub repository.

Documentation

For more information on how to use the Rocket Scraper API, visit the Rocket Scraper API documentation.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago