Official SDKs for Node.js, Python, PHP, Go, Swift, Kotlin, Ruby, and Java. Works with cURL, Zapier, Make.com, n8n, and any HTTP client.
Drop-in libraries for every major platform with full TypeScript support, async/await patterns, and comprehensive error handling.
Official npm package with TypeScript support. Promise-based API for screenshots, PDFs, and extraction.
npm install snapapi-js
pip-installable SDK with sync and async support. Perfect for scripts, Django, and Flask apps.
pip install snapapi-client
Composer package for Laravel, Symfony, and vanilla PHP. PSR-18 compatible HTTP client.
composer require snapapi/snapapi-php
Lightweight Go module with zero dependencies. Idiomatic error handling and context support.
go get github.com/Sleywill/snapapi-go
Native Swift SDK with async/await. Perfect for iOS and macOS apps via Swift Package Manager.
Swift Package Manager
Kotlin SDK with coroutines support. Works with Android and JVM applications via Gradle.
implementation("pics.snapapi:snapapi-kotlin:2.0.0")
gem-installable SDK for Ruby on Rails, Sinatra, and vanilla Ruby projects. Clean, idiomatic API.
gem install snapapi
Maven/Gradle package for Java and Spring Boot applications. Supports JDK 11+ with clean builder API.
implementation 'pics.snapapi:snapapi-java:2.0.0'
Works with any HTTP client. Perfect for shell scripts, testing, and quick prototyping from any environment.
No-code automation. Trigger screenshots from any Zapier or Make.com workflow using the HTTP module.
Self-hosted automation. Use n8n's HTTP Request node to integrate SnapAPI into your workflows.
Copy-paste examples for every SDK. Replace YOUR_API_KEY with your key from the dashboard.
Install the official SDK and take your first screenshot in under a minute.
npm install snapapi-js
const SnapAPI = require('snapapi-js');
const client = new SnapAPI('YOUR_API_KEY');
const screenshot = await client.screenshot({
url: 'https://example.com',
format: 'png',
width: 1280,
height: 800
});
// Save to file
fs.writeFileSync('screenshot.png', screenshot);Install via pip and start capturing screenshots with a simple Python script.
pip install snapapi-client
import snapapi_client
client = snapapi_client.Client("YOUR_API_KEY")
screenshot = client.screenshot(
url="https://example.com",
format="png",
width=1280,
height=800
)
with open("screenshot.png", "wb") as f:
f.write(screenshot)Install via Composer and integrate SnapAPI into your Laravel or vanilla PHP project.
composer require snapapi/snapapi-php
<?php
require 'vendor/autoload.php';
$client = new SnapAPI\Client('YOUR_API_KEY');
$screenshot = $client->screenshot([
'url' => 'https://example.com',
'format' => 'png',
'width' => 1280,
'height' => 800
]);
file_put_contents('screenshot.png', $screenshot);Lightweight Go module for capturing screenshots, PDFs, and extracting content.
go get github.com/Sleywill/snapapi-go
package main
import (
"os"
"github.com/Sleywill/snapapi-go"
)
func main() {
client := snapapi.NewClient("YOUR_API_KEY")
screenshot, err := client.Screenshot(snapapi.ScreenshotOptions{
URL: "https://example.com",
Format: "png",
Width: 1280,
Height: 800,
})
if err != nil {
panic(err)
}
os.WriteFile("screenshot.png", screenshot, 0644)
}Native Swift SDK with async/await support. Add SnapAPI to any iOS or macOS app via Swift Package Manager.
// In Package.swift
dependencies: [
.package(url: "https://github.com/Sleywill/snapapi-swift", from: "3.1.0")
]
// Then add to your target
.target(name: "MyApp", dependencies: ["SnapAPI"])// File → Add Packages → search: // https://github.com/Sleywill/snapapi-swift
import SnapAPI
let client = SnapAPIClient(apiKey: "YOUR_API_KEY")
let screenshot = try await client.screenshot(
url: URL(string: "https://example.com")!,
format: .png,
width: 1280,
height: 800
)
try screenshot.write(to: URL(fileURLWithPath: "screenshot.png"))
print("Screenshot saved!")let pdf = try await client.pdf(
url: URL(string: "https://example.com")!,
options: PDFOptions(pageSize: .a4, printBackground: true)
)
try pdf.write(to: URL(fileURLWithPath: "document.pdf"))Kotlin SDK with coroutines and suspend functions. Works with Android, JVM, and Spring Boot apps via Gradle or Maven.
dependencies {
implementation("com.github.Sleywill:snapapi-kotlin:3.1.0")
}dependencies {
implementation 'com.github.Sleywill:snapapi-kotlin:3.1.0'
}<dependency> <groupId>com.github.Sleywill</groupId> <artifactId>snapapi-kotlin</artifactId> <version>3.1.0</version> </dependency>
import pics.snapapi.SnapAPIClient
import pics.snapapi.ScreenshotOptions
import java.io.File
val client = SnapAPIClient("YOUR_API_KEY")
val screenshot = client.screenshot(
ScreenshotOptions(
url = "https://example.com",
format = "png",
width = 1280,
height = 800
)
)
File("screenshot.png").writeBytes(screenshot)
println("Screenshot saved!")import pics.snapapi.PdfOptions
val pdf = client.pdf(
PdfOptions(
url = "https://example.com",
pageSize = "A4",
printBackground = true
)
)
File("document.pdf").writeBytes(pdf)Install via RubyGems and capture screenshots from Ruby on Rails, Sinatra, or plain Ruby scripts.
gem install snapapi
# In your Gemfile gem 'snapapi' # Then run bundle install
require 'snapapi'
client = SnapAPI::Client.new('YOUR_API_KEY')
screenshot = client.screenshot(
url: 'https://example.com',
format: 'png',
width: 1280,
height: 800
)
File.binwrite('screenshot.png', screenshot)
puts 'Screenshot saved!'pdf = client.pdf(
url: 'https://example.com',
pdf_options: { page_size: 'a4', print_background: true }
)
File.binwrite('document.pdf', pdf)Add SnapAPI to any Java or Spring Boot project using Maven or Gradle. Requires JDK 11+.
<dependency> <groupId>pics.snapapi</groupId> <artifactId>snapapi-java</artifactId> <version>3.1.0</version> </dependency>
implementation 'pics.snapapi:snapapi-java:3.1.0'
import pics.snapapi.SnapAPI;
import pics.snapapi.ScreenshotOptions;
import java.nio.file.Files;
import java.nio.file.Path;
SnapAPI client = new SnapAPI("YOUR_API_KEY");
byte[] screenshot = client.screenshot(
ScreenshotOptions.builder()
.url("https://example.com")
.format("png")
.width(1280)
.height(800)
.build()
);
Files.write(Path.of("screenshot.png"), screenshot);
System.out.println("Screenshot saved!");import pics.snapapi.PdfOptions;
byte[] pdf = client.pdf(
PdfOptions.builder()
.url("https://example.com")
.pageSize("A4")
.printBackground(true)
.build()
);
Files.write(Path.of("document.pdf"), pdf);No SDK needed — call the API directly from any terminal or HTTP client.
curl -X POST "https://api.snapapi.pics/v1/screenshot" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "format": "png"}' \
--output screenshot.pngcurl -X POST "https://api.snapapi.pics/v1/pdf" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "format": "A4"}' \
--output page.pdfNative Zapier and Make.com integrations are in development. In the meantime, use the HTTP/Webhook module to call SnapAPI directly.
URL: https://api.snapapi.pics/v1/screenshot
Method: POST
Headers:
X-Api-Key: YOUR_API_KEY
Content-Type: application/json
Body:
{
"url": "{{1.url}}",
"format": "png",
"width": 1280,
"height": 800,
"responseType": "url"
}Use responseType: "url" to get a hosted URL — perfect for passing to other Zapier/Make modules.
Use n8n's HTTP Request node with the configuration below. Native n8n node is in development.
Method: POST
URL: https://api.snapapi.pics/v1/screenshot
Authentication: Header Auth
Name: X-Api-Key
Value: YOUR_API_KEY
Body (JSON):
{
"url": "{{ $json.url }}",
"format": "png",
"width": 1280
}