Skip to content

aitaskorchestra/grabshot-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GrabShot - Screenshot API for Python

Capture website screenshots, generate PDFs, and extract meta tags with the GrabShot API. Zero dependencies.

Install

pip install grabshot

Quick Start

from grabshot import GrabShot

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

# Capture a screenshot
img = client.capture("https://example.com")
with open("screenshot.png", "wb") as f:
    f.write(img)

Options

# Full page screenshot in WebP
img = client.capture(
    "https://example.com",
    width=1440,
    height=900,
    format="webp",
    full_page=True,
)

# AI cleanup (removes popups/banners) - paid plans
img = client.capture("https://example.com", ai_cleanup=True)

# Capture a specific element
img = client.capture("https://example.com", selector="#hero")

# Wait for dynamic content
img = client.capture("https://example.com", delay=2000)

PDF Generation

pdf = client.pdf("https://example.com")
with open("page.pdf", "wb") as f:
    f.write(pdf)

# Landscape A3
pdf = client.pdf("https://example.com", format="A3", landscape=True)

Meta Tag Extraction

meta = client.meta("https://example.com")
print(meta["title"])
print(meta["description"])
print(meta["og:image"])

Error Handling

from grabshot import GrabShot, GrabShotError

client = GrabShot("your-api-key")
try:
    img = client.capture("https://example.com")
except GrabShotError as e:
    print(f"API error ({e.status}): {e}")

Pricing

Plan Price Screenshots/mo
Free $0 25
Starter $9/mo 1,000
Pro $29/mo 10,000
Business $79/mo 50,000

Get your API key at grabshot.dev

Links

About

Python client for the GrabShot Screenshot API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages