Integrations & SDKs

Integrate SnapAPI with
Any Language or Tool

Official SDKs for Node.js, Python, PHP, Go, Swift, Kotlin, Ruby, and Java. Works with cURL, Zapier, Make.com, n8n, and any HTTP client.

Official SDKs

Eight languages. One API.

Drop-in libraries for every major platform with full TypeScript support, async/await patterns, and comprehensive error handling.

Node.js

Official npm package with TypeScript support. Promise-based API for screenshots, PDFs, and extraction.

npm install snapapi-js
Official GitHub
🐍

Python

pip-installable SDK with sync and async support. Perfect for scripts, Django, and Flask apps.

pip install snapapi-client
Official GitHub
🐘

PHP

Composer package for Laravel, Symfony, and vanilla PHP. PSR-18 compatible HTTP client.

composer require snapapi/snapapi-php
Official GitHub
🔵

Go

Lightweight Go module with zero dependencies. Idiomatic error handling and context support.

go get github.com/Sleywill/snapapi-go
Official GitHub
🍎

Swift

Native Swift SDK with async/await. Perfect for iOS and macOS apps via Swift Package Manager.

Swift Package Manager
Official GitHub
🟣

Kotlin

Kotlin SDK with coroutines support. Works with Android and JVM applications via Gradle.

implementation("pics.snapapi:snapapi-kotlin:2.0.0")
Official GitHub
💎

Ruby

gem-installable SDK for Ruby on Rails, Sinatra, and vanilla Ruby projects. Clean, idiomatic API.

gem install snapapi
Official GitHub

Java

Maven/Gradle package for Java and Spring Boot applications. Supports JDK 11+ with clean builder API.

implementation 'pics.snapapi:snapapi-java:2.0.0'
Official GitHub
⌨️

cURL

Works with any HTTP client. Perfect for shell scripts, testing, and quick prototyping from any environment.

REST API

Zapier / Make.com

No-code automation. Trigger screenshots from any Zapier or Make.com workflow using the HTTP module.

Coming Soon
🔄

n8n

Self-hosted automation. Use n8n's HTTP Request node to integrate SnapAPI into your workflows.

Coming Soon
Code Examples

Start in under a minute

Copy-paste examples for every SDK. Replace YOUR_API_KEY with your key from the dashboard.

Node.js

Install the official SDK and take your first screenshot in under a minute.

Install
npm install snapapi-js
Screenshot Example
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);
🐍

Python

Install via pip and start capturing screenshots with a simple Python script.

Install
pip install snapapi-client
Screenshot Example
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)
🐘

PHP

Install via Composer and integrate SnapAPI into your Laravel or vanilla PHP project.

Install
composer require snapapi/snapapi-php
Screenshot Example
<?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);
🔵

Go

Lightweight Go module for capturing screenshots, PDFs, and extracting content.

Install
go get github.com/Sleywill/snapapi-go
Screenshot Example
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)
}
🍎

Swift

Native Swift SDK with async/await support. Add SnapAPI to any iOS or macOS app via Swift Package Manager.

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"])
Xcode
// File → Add Packages → search:
// https://github.com/Sleywill/snapapi-swift
Screenshot Example
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!")
PDF Generation
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

Kotlin SDK with coroutines and suspend functions. Works with Android, JVM, and Spring Boot apps via Gradle or Maven.

Gradle (Kotlin DSL)
dependencies {
    implementation("com.github.Sleywill:snapapi-kotlin:3.1.0")
}
Gradle (Groovy DSL)
dependencies {
    implementation 'com.github.Sleywill:snapapi-kotlin:3.1.0'
}
Maven
<dependency>
  <groupId>com.github.Sleywill</groupId>
  <artifactId>snapapi-kotlin</artifactId>
  <version>3.1.0</version>
</dependency>
Screenshot Example
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!")
PDF Generation
import pics.snapapi.PdfOptions

val pdf = client.pdf(
    PdfOptions(
        url = "https://example.com",
        pageSize = "A4",
        printBackground = true
    )
)
File("document.pdf").writeBytes(pdf)
💎

Ruby

Install via RubyGems and capture screenshots from Ruby on Rails, Sinatra, or plain Ruby scripts.

Install
gem install snapapi
Or with Bundler
# In your Gemfile
gem 'snapapi'

# Then run
bundle install
Screenshot Example
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 Generation
pdf = client.pdf(
  url: 'https://example.com',
  pdf_options: { page_size: 'a4', print_background: true }
)
File.binwrite('document.pdf', pdf)

Java

Add SnapAPI to any Java or Spring Boot project using Maven or Gradle. Requires JDK 11+.

Maven Install
<dependency>
  <groupId>pics.snapapi</groupId>
  <artifactId>snapapi-java</artifactId>
  <version>3.1.0</version>
</dependency>
Gradle Install
implementation 'pics.snapapi:snapapi-java:3.1.0'
Screenshot Example
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!");
PDF Generation
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);
⌨️

cURL

No SDK needed — call the API directly from any terminal or HTTP client.

Screenshot
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.png
PDF Generation
curl -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.pdf

Zapier / Make.com Coming Soon

Native Zapier and Make.com integrations are in development. In the meantime, use the HTTP/Webhook module to call SnapAPI directly.

Make.com HTTP Module Config
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.

🔄

n8n Coming Soon

Use n8n's HTTP Request node with the configuration below. Native n8n node is in development.

n8n HTTP Request Node
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
}

Ready to integrate?

Get your free API key and start capturing screenshots in your favorite language.

// Copy to clipboard utility function snapCopy(btn, text) { var origHTML = btn.innerHTML; function showCopied() { btn.classList.add('copied'); btn.innerHTML = ' Copied!'; setTimeout(function() { btn.classList.remove('copied'); btn.innerHTML = origHTML; }, 1800); } if (navigator.clipboard && navigator.clipboard.writeText) { navigator.clipboard.writeText(text).then(showCopied).catch(function() { var ta = document.createElement('textarea'); ta.value = text; ta.style.position = 'fixed'; ta.style.opacity = '0'; document.body.appendChild(ta); ta.select(); document.execCommand('copy'); document.body.removeChild(ta); showCopied(); }); } else { var ta = document.createElement('textarea'); ta.value = text; ta.style.position = 'fixed'; ta.style.opacity = '0'; document.body.appendChild(ta); ta.select(); document.execCommand('copy'); document.body.removeChild(ta); showCopied(); } }