rocketscraper
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

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.

Package Sidebar

Install

npm i rocketscraper

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

11.3 kB

Total Files

14

Last publish

Collaborators

  • diogocapela