Official SDKs for the PageOps Screenshot API - capture screenshots of web pages programmatically with ease.
PageOps provides powerful screenshot capabilities for web pages. These official SDKs make it easy to integrate screenshot functionality into your applications.
- 📸 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
| Language | Package | Directory |
|---|---|---|
| .NET | PageOpsSdk |
dotnet-sdk/ |
| Node.js | pageops-sdk |
node-sdk/ |
| Python | pageops-sdk |
python-sdk/ |
# Add the SDK to your project
dotnet add package PageOpsSdkusing 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.
npm install pageops-sdkconst { 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.
pip install pageops-sdkfrom 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.
For complete API documentation, including all available parameters and options, visit:
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
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 |
Each SDK directory contains example projects demonstrating usage:
- .NET:
dotnet-sdk/PageOpsSdkExample/ - Node.js:
node-sdk/test.js - Python:
python-sdk/test.py
Contributions are welcome! Please feel free to submit issues or pull requests.
All SDKs are released under the MIT License.
- Website: https://app.page-ops.com
- Issues: GitHub Issues
- Email: support@page-ops.com
© 2024 PageOps. All rights reserved.