# localscreenshot documentation > Take a screenshot of a public web page, from an AI tool (MCP), a command line or a REST API. Every page of https://docs.localscreenshot.com in one text. --- Source: https://docs.localscreenshot.com/overview # Overview localscreenshot takes a screenshot of a public web page and gives you the image. Ask your AI for it, or call the API yourself. It is the same service either way. - **Ask your AI**: No code. Connect once, then ask in plain words. - **Command line**: One command: npx localscreenshot. - **From your code**: One HTTP request, any language. ## What you can do - Take a screenshot of a public page, as a desktop or as a phone sees it. - Capture the whole page, or only one element. - Remove most cookie banners, ads, chat bubbles and pop-ups before the picture is taken. - Save the page as `png`, `jpeg`, `webp` or `pdf`. - Load the page from one of 227 countries, with a signed technical attestation of the country we observed. ## Three ways in All three use the same API key and the same credits. | Way in | For whom | Where to start | | --- | --- | --- | | Your AI tool (MCP) | Anyone who works with Claude Code, Cursor, Codex and similar tools | [Ask your AI (MCP)](https://docs.localscreenshot.com/agent) | | Command line | Scripts, CI and quick checks, with one command | [Command line (CLI)](https://docs.localscreenshot.com/cli) | | REST API | Your own code, in any language | [Take a screenshot](https://docs.localscreenshot.com/take) | ## How a screenshot goes 1. You send a page address, with the options you want. 2. We open the page in a real browser, wait for it to load and take the picture. 3. You get the image back, or a clear error. A failed screenshot is not charged. ## What it costs - A screenshot uses 1 credit. From a chosen country, it uses 2. - Your account gets 50 free credits every month, with no card. They do not carry over. - More on [Credits and limits](https://docs.localscreenshot.com/credits). > **What it does not do.** It does not sign in to websites, solve CAPTCHAs or get past paywalls. It only reads public pages: it never fills in a form. When a site shows a bot check instead of its page, you get the error `challenge_page` instead of a picture. ## For AI tools and agents - Every page of these docs exists as Markdown: add `.md` to its address. - The whole documentation in one text: `llms-full.txt`, linked in the menu. - The API described for machines: [openapi.json](https://api.localscreenshot.com/v1/openapi.json). **Where things are** ```text API https://api.localscreenshot.com/v1 MCP server https://api.localscreenshot.com/mcp Dashboard https://localscreenshot.com/dashboard OpenAPI https://api.localscreenshot.com/v1/openapi.json ``` **Your first screenshot** ```bash curl "https://api.localscreenshot.com/v1/screenshot?url=https://www.wikipedia.org" \ -H "Authorization: Bearer $LOCALSCREENSHOT_API_KEY" \ -o shot.png ``` --- Source: https://docs.localscreenshot.com/quickstart # Quickstart Take your first screenshot in about a minute. There are three ways in. Pick the one that suits you: they all do the same thing. - **Ask your AI**: No code. Connect once, then ask in plain words. - **Command line**: One command: npx localscreenshot. - **From your code**: One HTTP request, any language. ## 1. Get your API key Create a key in the [dashboard](https://localscreenshot.com/dashboard), under **Connect**. It starts with `lss_live_`. You can copy it again from there any time. Keep it secret. Your account gets 50 free credits every month. The examples on this page read the key from an environment variable, so it is not written in every command or saved in a file you share: ```bash export LOCALSCREENSHOT_API_KEY="your key" ``` ## 2. Take a screenshot ### Ask your AI Add our MCP server to your AI tool, with your key in the `Authorization` header. [Ask your AI (MCP)](https://docs.localscreenshot.com/agent) has the exact line for each tool. Then just ask: > "Take a screenshot of wikipedia.org on an iPhone." Your AI gets three tools: `take_screenshot`, `list_countries` and `get_credits`. **MCP server** ```text Address https://api.localscreenshot.com/mcp Transport HTTP Header Authorization: Bearer $LOCALSCREENSHOT_API_KEY ``` ### Or call the API Send the page address to `/v1/screenshot`. The answer is the image itself. Your key goes in the `Authorization` header, never in the address. **Take a screenshot** ```bash curl "https://api.localscreenshot.com/v1/screenshot?url=https://www.wikipedia.org" \ -H "Authorization: Bearer $LOCALSCREENSHOT_API_KEY" \ -o shot.png ``` **Response headers** ```http HTTP/1.1 200 OK Content-Type: image/png X-Screenshot-Id: 01JABCDEF2G3H4J5K6M7N8P9QR X-Credits-Charged: 1 X-Credits-Remaining: 49 X-Page-Status: 200 ``` ### Or use the command line One command takes the screenshot and saves the image. [Command line (CLI)](https://docs.localscreenshot.com/cli) has the ways to install it and every option. ```bash npx localscreenshot https://www.wikipedia.org -o shot.png ``` ## 3. Add what you need Every option is one parameter. A few to start with: | Option | What it does | | --- | --- | | `device=iphone_15` | Capture the page as a phone sees it. | | `full_page=true` | Capture the whole page, not only the visible part. | | `block_cookie_banners=true` | Remove most cookie banners before the picture. | | `country=DK` | Load the page from a country. 227 to choose from. | | `format=pdf` | Save the page as a PDF. Also `png`, `jpeg`, `webp`. | | `response=json` | Get a link to the image and the page details instead of the image. | The full list is on [Take a screenshot](https://docs.localscreenshot.com/take). **With response=json** ```json { "id": "01JABCDEF2G3H4J5K6M7N8P9QR", "status": "succeeded", "created_at": "2026-10-08T10:47:02Z", "finished_at": "2026-10-08T10:47:06Z", "image": { "url": "https://api.localscreenshot.com/v1/screenshots/01JABC.../image?expires=...&signature=...", "mime": "image/png", "bytes": 83672, "width": 1440, "height": 900, "pages": null, "sha256": "a5b9081b8430...", "truncated": false, "available_until": "2026-10-15T10:47:02Z" }, "page": { "status": 200, "final_url": "https://www.wikipedia.org/", "title": "Wikipedia", "redirects": [], "load_incomplete": false, "network_stopped": null }, "country": null, "attestation": null, "credits": { "charged": 1, "reserved": 1, "remaining": 49 }, "error": null, "links": { "self": "https://api.localscreenshot.com/v1/screenshots/01JABC..." } } ``` ## What it costs - A screenshot uses 1 credit. From a chosen country, it uses 2. - A failed screenshot is not charged. The number of failed screenshots per day is limited. - Your 50 free credits come back each month and do not carry over. After your first month, your email address must be confirmed to keep getting them. Plan credits reset each month. Pack credits do not expire. > **What it does not do.** It does not sign in to websites, solve CAPTCHAs or get past paywalls. You get a clear error instead. --- Source: https://docs.localscreenshot.com/agent # Ask your AI (MCP) Connect your AI tool once, then ask for screenshots in plain words. No code. It works through MCP, the standard way AI tools reach outside services. ## What you need - An API key. Create one in the [dashboard](https://localscreenshot.com/dashboard), under **Connect**. - An AI tool that can add a remote MCP server over HTTP. Almost every tool connects the same way: the address of our server, and your key in the `Authorization` header. **MCP server** ```text Address https://api.localscreenshot.com/mcp Transport HTTP Header Authorization: Bearer $LOCALSCREENSHOT_API_KEY ``` A few assistants have no place to put a key. They connect by sign-in instead: the tool opens a localscreenshot window, you sign in and allow it. The table below says which way each tool uses. ## Connect your tool Pick yours. Each family has its own page with the exact line or steps to copy. | Tool | Family | Connects with | Status | | --- | --- | --- | --- | | ChatGPT | [Assistants](https://docs.localscreenshot.com/assistants) | Sign-in (OAuth) | From its docs | | Claude | [Assistants](https://docs.localscreenshot.com/assistants) | API key | From its docs | | Claude Code | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | Tested | | Cursor | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Codex | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | Tested | | Gemini CLI | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | Connected | | VS Code | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Windsurf | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Cline | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Zed | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Copilot CLI | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Hermes Agent | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | Connected | | n8n | [Automation](https://docs.localscreenshot.com/automation) | API key | From its docs | | Zapier | [Automation](https://docs.localscreenshot.com/automation) | API key | From its docs | | LangChain | [Frameworks](https://docs.localscreenshot.com/frameworks) | API key | Tested | | Le Chat | [Assistants](https://docs.localscreenshot.com/assistants) | API key | From its docs | | Copilot Studio | [Assistants](https://docs.localscreenshot.com/assistants) | API key | From its docs | | LM Studio | [Assistants](https://docs.localscreenshot.com/assistants) | API key | From its docs | | Open WebUI | [Assistants](https://docs.localscreenshot.com/assistants) | API key | From its docs | | LibreChat | [Assistants](https://docs.localscreenshot.com/assistants) | API key | From its docs | | Perplexity | [Assistants](https://docs.localscreenshot.com/assistants) | API key | Not ready yet | | Copilot in JetBrains | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Copilot coding agent | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Junie | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Roo Code | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Kilo Code | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Continue | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | OpenCode | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | Connected | | Amp | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Warp | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Kiro | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Antigravity | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Qwen Code | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | Connected | | Kimi Code | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Amazon Q Developer | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Replit | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | Lovable | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | From its docs | | goose | [Coding tools](https://docs.localscreenshot.com/coding-tools) | Sign-in (OAuth) | From its docs | | OpenClaw | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | Not ready yet | | v0 | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | Not ready yet | | JetBrains AI Assistant | [Coding tools](https://docs.localscreenshot.com/coding-tools) | API key | Not ready yet | | Make | [Automation](https://docs.localscreenshot.com/automation) | API key | From its docs | | Claude API | [Frameworks](https://docs.localscreenshot.com/frameworks) | API key | From its docs | | OpenAI Agents SDK | [Frameworks](https://docs.localscreenshot.com/frameworks) | API key | Tested | | Vercel AI SDK | [Frameworks](https://docs.localscreenshot.com/frameworks) | API key | Tested | | CrewAI | [Frameworks](https://docs.localscreenshot.com/frameworks) | API key | Connected | | Pydantic AI | [Frameworks](https://docs.localscreenshot.com/frameworks) | API key | Tested | | Mastra | [Frameworks](https://docs.localscreenshot.com/frameworks) | API key | Tested | | Google ADK | [Frameworks](https://docs.localscreenshot.com/frameworks) | API key | Connected | | Other clients | [Any MCP client](https://docs.localscreenshot.com/agent) | API key | Tested | **Status** says how far we checked each one. *Tested*: we took a screenshot through it. *Connected*: it added our server and listed its tools. *From its docs*: we read the setup in the tool's own documentation and have not tried it yet. We never show a setup we did not read there. The dashboard shows the same setups with your own key already in place, ready to copy. ## Any other client ### Other clients For a client that takes a server address and a header. Write your key in place of `$LOCALSCREENSHOT_API_KEY`. ```text Address: https://api.localscreenshot.com/mcp Header: Authorization: Bearer $LOCALSCREENSHOT_API_KEY ``` Tested: we took a screenshot through it. ## Then ask > "Take a screenshot of wikipedia.org on an iPhone." A few more things you can say: - "Take a full page screenshot of example.com without the cookie banner." - "Save example.com as a PDF." - "Show me only the pricing table of example.com/pricing." - "How many credits do I have left?" ## What your AI gets Three tools: | Tool | What it does | | --- | --- | | `take_screenshot` | Takes the screenshot and returns the image, the page title, its final address and status, and the credits left. | | `list_countries` | Lists the countries a screenshot can be taken from. | | `get_credits` | Says how many credits are left. | `take_screenshot` accepts the same options as the API, listed on [Take a screenshot](https://docs.localscreenshot.com/take), 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 `max_width`. That keeps it readable for a vision model without spending tokens for nothing. - A PDF is not shown as a picture: your AI gets a short-lived link to download it. - A very large image (over 4 MB) is not attached either: your AI gets its link. - An error comes back as a plain sentence with its code, so your AI can tell you what happened. See [Errors](https://docs.localscreenshot.com/errors). ## What it costs The same as the API: 1 credit for a screenshot, 2 from a chosen country. A failed screenshot is not charged. The limits are per account, whichever way you come in. > **What it does not do.** Your AI cannot use it to sign in to a website, solve a CAPTCHA or get past a paywall. It reads public pages only. --- Source: https://docs.localscreenshot.com/cli # Command line (CLI) `localscreenshot` is the command line client of the API. One command takes a screenshot of a public web page and saves the image in the current folder. It uses the same API key and the same credits as everything else. **In short** ```text Run npx localscreenshot https://example.com Install npm install -g localscreenshot, or pip install localscreenshot Key LOCALSCREENSHOT_API_KEY, or localscreenshot login ``` ## 1. Install **With npx.** Node 18.17 or later, nothing to install first. In a terminal, npx asks once before it downloads the package: `npx -y` skips the question. ```bash npx localscreenshot https://example.com ``` **With npm.** Installs the command globally. ```bash npm install -g localscreenshot ``` **With pip.** Python 3.9 or later, no dependencies. ```bash pip install localscreenshot ``` **With pipx.** Runs it once without installing anything for good. ```bash pipx run localscreenshot https://example.com ``` **With uv.** The same, with uv. ```bash uvx localscreenshot https://example.com ``` The command has no dependencies. It sends no usage data and does not check for updates. The rest of this page writes `localscreenshot`. If you did not install it, write `npx localscreenshot`, `pipx run localscreenshot` or `uvx localscreenshot` instead. ## 2. Set your key Create a key in the [dashboard](https://localscreenshot.com/dashboard), under **Connect**. Then either put it in your environment: ```bash export LOCALSCREENSHOT_API_KEY="your key" ``` or save it once on this machine: ```bash localscreenshot login ``` `login` asks for the key without showing it, checks it against the API, and writes it to a file only you can read: `~/.config/localscreenshot/config.json` on macOS and Linux (under `$XDG_CONFIG_HOME` if you set it), `%APPDATA%\localscreenshot\config.json` on Windows. `localscreenshot logout` removes it. In a script or in CI, use the environment variable. The key is never accepted as an argument, so it does not end up in your shell history. More on keys: [Your API key](https://docs.localscreenshot.com/auth). ## 3. Take a screenshot ```bash localscreenshot https://example.com ``` It saves the image as `example.com--