Skip to content

PageOps-dev/ScreenshotSDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PageOps SDKs

Official SDKs for the PageOps Screenshot API - capture screenshots of web pages programmatically with ease.

API Documentation License

Overview

PageOps provides powerful screenshot capabilities for web pages. These official SDKs make it easy to integrate screenshot functionality into your applications.

Features

  • 📸 Screenshot Capture - Take screenshots of any web page
  • Async & Sync Modes - Choose between asynchronous or synchronous execution
  • 📱 Device Emulation - Simulate mobile, tablet, or desktop devices
  • 🎨 Custom Styling - Inject custom CSS and JavaScript
  • 🔧 Flexible Options - Full-page capture, viewport settings, element selection, and more
  • 🌐 Proxy Support - Route requests through custom proxies

Available SDKs

Language Package Directory
.NET PageOpsSdk dotnet-sdk/
Node.js pageops-sdk node-sdk/
Python pageops-sdk python-sdk/

Quick Start

.NET

# Add the SDK to your project
dotnet add package PageOpsSdk
using PageOpsSdk;

var client = new PageOpsClient("your-api-key");

var request = new ScreenshotRequest("https://example.com")
{
    FullPage = true,
    Format = "png"
};

var result = await client.CreateScreenshotAsync(request);
Console.WriteLine($"Screenshot URL: {result.Url}");

See dotnet-sdk/ for more details and examples.

Node.js

npm install pageops-sdk
const { PageOpsClient, ScreenshotRequest } = require('pageops-sdk');

const client = new PageOpsClient('your-api-key');

const request = new ScreenshotRequest('https://example.com', {
  fullPage: true,
  format: 'png'
});

const result = await client.createScreenshot(request);
console.log('Screenshot URL:', result.url);

See node-sdk/ for more details and examples.

Python

pip install pageops-sdk
from pageops_sdk import PageOpsClient, ScreenshotRequest

client = PageOpsClient("your-api-key")

request = ScreenshotRequest(
    url="https://example.com",
    full_page=True,
    format="png"
)

result = client.create_screenshot(request)
print(f"Screenshot URL: {result.url}")

See python-sdk/ for more details and examples.

API Documentation

For complete API documentation, including all available parameters and options, visit:

https://app.page-ops.com

Authentication

All SDKs require an API key. You can obtain one by signing up at app.page-ops.com.

API Base URL: https://api.page-ops.com/api/v1

Screenshot Options

All SDKs support the following options:

Option Description Type
url Target URL to capture string
mode Execution mode (sync or async) string
timeoutMs Maximum wait time in milliseconds number
fullPage Capture full page or viewport only boolean
viewport Browser viewport dimensions object
format Image format (png, jpeg, webp) string
quality Image quality (1-100) number
waitUntil When to consider page loaded string
delayMs Delay after page load before capture number
selector CSS selector to capture specific element string
headers Custom HTTP headers object
cookies Custom cookies array
javascript JavaScript to inject string
css CSS to inject string
device Device to emulate string
colorScheme Color scheme (light, dark, no-preference) string
proxy Proxy configuration object

Examples

Each SDK directory contains example projects demonstrating usage:

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

License

All SDKs are released under the MIT License.

Support


© 2024 PageOps. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors