Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wral/sdk-scraper

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wral/sdk-scraper

A Software Development Kit for working with the Scraper API

  • 0.0.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

sdk-scraper

The sdk-scraper is a JavaScript SDK (Software Development Kit) designed to interact with an API that generates and validates JWTs.

Installation

You can install sdk-scraper package with npm

npm install @wral/sdk-scraper

Usage

Import it into your JavaScript or TypeScript project:

import { createClient } from '@wral/sdk-scraper';

Then, you can create a client instance with your configuration:

const config = {
  baseUrl: 'YOUR_BASE_URL', // Base URL of your API
  apiKey: 'YOUR_API_KEY', // Your API key
};

const client = createClient(config);

After creating the client instance, you can use its methods to interact with the API. Here are some examples:

// Scrape example.com for metadata
let metadata = await client.metadata({ uri: 'https://www.example.com/' });

API

createClient(config)

Creates a new client instance with the provided configuration.

  • config: An object containing API configuration parameters:
    • baseUrl: The base URL of the API.
    • apiKey: Your API key.

Returns a client instance with methods for interacting with the API.

Methods

  • api: (path, options = {}): fetch wrapper for the API.
  • metadata({ uri, agent } = {}): scrape metadata from an URI, with optional user agent

FAQs

Package last updated on 20 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc