FastAPI

Screenshot API for FastAPI

Build screenshot endpoints with FastAPI. Use async/await for high-performance screenshot proxy routes.

Installation

pip install fastapi httpx uvicorn

FastAPI Integration Example

from fastapi import FastAPI
from fastapi.responses import Response
import httpx

app = FastAPI()

@app.get("/screenshot")
async def screenshot(url: str = "https://example.com"):
    async with httpx.AsyncClient() as client:
        response = await client.get("https://snapapi.tech/v1/screenshot", params={
            "url": url,
            "api_key": "YOUR_KEY",
            "format": "png"
        })
    return Response(content=response.content, media_type="image/png")

Features

SnapAPI renders pages in a real Chromium browser, so JavaScript-heavy FastAPI apps render perfectly. You get:

Get Free API KeyFull API Docs