Skip to content

sambel/localscreenshot

v1.0.0MIT

Screenshot API and MCP server for AI agents: capture any public page as PNG, JPEG or PDF, from 227 countries, with cookie banners and ads hidden.

localscreenshot - Screenshot API & MCP Server

Take a screenshot of any public web page from 227 countries, with cookie banners and ads hidden. Use it from your code with the REST API, or from your AI assistant through the Model Context Protocol.

This repository is the public documentation of the hosted service: the MCP endpoint, the tools, the client setups and the registry manifest. The service itself runs at localscreenshot.com, the command line client lives in localscreenshot-cli.

Quick start, no API key

Any HTTP MCP client can connect to the free endpoint. Real screenshots, no sign-up:

{
  "mcpServers": {
    "localscreenshot": {
      "type": "http",
      "url": "https://api.localscreenshot.com/mcp/free"
    }
  }
}

It answers initialize, tools/list, prompts/list and resources/list without credentials, and gives three tools: a real screenshot of one of three example pages, the list of countries, and the prices. It cannot capture a page of your choice.

As a plugin

The repository follows the Open Plugins standard, so directory scans find it: plugin.json carries the identity, mcp.json declares the connection. Both point at the free endpoint above, which means an install works immediately and gives the three demo tools listed below.

To capture a page of your choice through the same plugin, replace the url and add the headers block in mcp.json with the keyed setup in the next section. Nothing else changes, the tools are the same ones, they just stop being limited to the example pages.

With your own key

A free account gets 50 credits every month, no card: localscreenshot.com/signup. Create the key in the dashboard, under Connect.

{
  "mcpServers": {
    "localscreenshot": {
      "type": "http",
      "url": "https://api.localscreenshot.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Claude Code, in one line:

claude mcp add --transport http localscreenshot https://api.localscreenshot.com/mcp --header "Authorization: Bearer YOUR_API_KEY"

Setups for each tool, written from that tool's own documentation: localscreenshot.com/mcp and docs.localscreenshot.com/agent.

Tools

With a key:

ToolWhat it does
take_screenshotTakes the screenshot. Returns the image, the page title, its final address and status, and the credits left.
list_countriesLists the countries a screenshot can be taken from.
get_creditsSays how many credits are left.

On the free endpoint:

ToolWhat it does
take_demo_screenshotA real screenshot of one of three example pages, in one of two devices.
list_countriesThe same country list, no key needed.
get_pricingThe credit costs of the service.

take_screenshot accepts the same options as the API, except async and response: the server waits for the picture and decides how to hand it back. The image is scaled down to 1,568 pixels wide unless you ask for another width, which keeps it readable for a vision model without spending tokens for nothing. A PDF, or an image over 4 MB, comes back as a short-lived download link instead of an attachment. Errors arrive as a plain sentence with their code.

Options

take_screenshot exposes the 28 parameters of the API, minus async and response: the server waits for the picture and decides how to hand it back.

ParameterTypeWhat it does
urlstringThe public http or https page to capture.
countrystringLoad the page from this country, an ISO 3166-1 alpha-2 code. Costs 2 credits instead of 1. The response reports the country actually observed. If it cannot be obtained, the request fails and is not charged.
viewportstringScreen size as WIDTHxHEIGHT, for example 1440x900. Shortcut for the two below.
viewport_widthintegerWidth of the browser window, in pixels.
viewport_heightintegerHeight of the browser window, in pixels. With full_page, the image is taller than this.
full_pagebooleanCapture the whole scrollable page instead of the visible part.
devicestringCapture as this device, meaning screen size, pixel density and mobile browser. One of desktop, desktop_hd, laptop, ipad, ipad_pro, ipad_mini, iphone_15, iphone_15_pro_max, iphone_se, pixel_8, galaxy_s24.
orientationstringHold a phone or a tablet upright (portrait) or on its side (landscape). Needs a phone or tablet device.
device_scale_factornumberPixel density. 2 gives a sharper, larger image.
formatstringpng, jpeg, webp, or pdf which saves the whole page as a document.
qualityintegerQuality for jpeg and webp. Ignored for png and pdf.
selectorstringCapture only the first element matching this CSS selector.
max_widthintegerScale the image down to this width. Useful to keep it small for a vision model.
click_textstringClick one visible button, tab or other clickable element, pointed at by the text a visitor reads, for example "Show all". One click, no typing. Costs 1 more credit.
click_selectorstringThe same click, pointed at by a CSS selector matching exactly one element. Use it when you know the code of the page. One click, no typing. Costs 1 more credit.
wait_forstringWait until an element matching this CSS selector is visible.
delay_msintegerExtra wait before the capture, in milliseconds.
block_cookie_bannersbooleanRemoves most cookie banners. A banner the filters do not know stays in the picture.
block_adsbooleanBlocks ads.
block_chat_widgetsbooleanHides chat bubbles.
close_popupsbooleanCloses pop-ups and newsletter overlays.
hide_sticky_elementsbooleanHides headers, bars and buttons that stay fixed on screen.
hide_selectorsarrayHides every element matching these CSS selectors.
disable_animationsbooleanFreezes animations and transitions.
color_schemestringAsk the page for its light or dark theme.
languagestringBrowser language, for example fr or fr-FR. Without it, a screenshot from a country uses the main language of that country.
timezonestringBrowser time zone, for example Europe/Paris. Without it, a screenshot from a country uses the main time zone of that country.
user_agentstringUser-Agent the page receives. A preset (googlebot, googlebot_mobile) or your own string. Useful to compare what a site shows to a crawler and to a visitor. A site that checks the crawler's address is not fooled.

Full details: Take a screenshot.

What it costs

  • 1 credit for a screenshot, 2 from a chosen country. A failed screenshot is not charged.
  • 50 free credits every calendar month, no card. Unused credits do not carry over.
  • A free account can send 10 requests a minute and run 2 screenshots at a time.
  • Plans and credit packs: localscreenshot.com/pricing.

Countries

227 countries, from AD Andorra onward. The list is served by GET https://localscreenshot.com/v1/countries, documented on Countries and attestation. The response of a country-specific capture reports the country actually observed, and a capture that could not be obtained from that country fails and is not charged.

REST API

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://localscreenshot.com/v1/screenshot?url=https://example.com"

The response is the image. Add response=json for a link to the image plus the page details and the attestation. POST with a JSON body works the same way. Background captures return an id, read it at /v1/screenshots/{id}.

Command line

npx localscreenshot https://example.com --full-page
pipx run localscreenshot https://example.com --country BR

Both packages are built from localscreenshot-cli, with no dependency and no telemetry. The key comes from LOCALSCREENSHOT_API_KEY or from localscreenshot login.

What it does not do

It cannot sign in to a website, solve a CAPTCHA or get past a paywall. It captures public pages only.

Links

License

MIT. See LICENSE.