You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

capture-node

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capture-node

Node Library for capture.page

2.2.0
latest
Source
npmnpm
Version published
Weekly downloads
7
133.33%
Maintainers
1
Weekly downloads
 
Created
Source

Capture Node SDK

Node Library for capture.page

Get your API Key and Secret from https://capture.page/console

List of all capture options: https://docs.capture.page

Installation

npm install capture-node

Usage

List of all capture options: https://docs.capture.page

Image

import { Capture } from 'capture-node';
const capture = new Capture(YOUR_API_KEY, YOUR_API_SECRET);
// or initialize with edge endpoint
// const capture = new Capture(YOUR_API_KEY, YOUR_API_SECRET, { useEdge: true });

// var url = capture.buildImageUrl(URL_TO_CAPTURE, CAPTURE_OPTIONS);

const url = capture.buildImageUrl('https://capture.page/', {
    full: true,
    delay: 3,
    t: Date.now()
});

// or

const image = await capture.fetchImage('https://capture.page/', {
    full: true,
    delay: 3,
    t: Date.now()
});

Now stick that url in an img tag to render the screenshot!

PDF

import { Capture } from 'capture-node';
const capture = new Capture(YOUR_API_KEY, YOUR_API_SECRET);

// var url = capture.buildPdfUrl(URL_TO_CAPTURE, CAPTURE_OPTIONS);

const url = capture.buildPdfUrl('https://capture.page/', {
    full: true,
    delay: 3,
    t: Date.now()
});

// or

const pdf = capture.fetchPdf('https://capture.page/', {
    full: true,
    delay: 3,
    t: Date.now()
});

Content

import { Capture } from 'capture-node';
const capture = new Capture(YOUR_API_KEY, YOUR_API_SECRET);

// var url = capture.buildContentUrl(URL_TO_CAPTURE, CAPTURE_OPTIONS);

const url = capture.buildContentUrl('https://capture.page/');
 
// or

const content = await capture.fetchContent('https://capture.page/');

Metadata

import { Capture } from 'capture-node';
const capture = new Capture(YOUR_API_KEY, YOUR_API_SECRET);

// var url = capture.buildMetadataUrl(URL_TO_CAPTURE, CAPTURE_OPTIONS);

const url = capture.buildMetadataUrl('https://capture.page/');
 
// or

const content = await capture.fetchMetadata('https://capture.page/');

Keywords

screenshot

FAQs

Package last updated on 13 May 2025

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