Документация по API Screenshot Studio
Screenshot Studio exposes a small public HTTP API: capture a live web page as an image, recompress an exported image, resolve a tweet, and proxy Twitter media. There is no API key, no token, and no account. Every failing request returns the same JSON error envelope. The machine-readable contract lives at /openapi.json.
Быстрый старт
Захватите страницу и запишите PNG на диск одной командой.
curl -s -X POST https://www.screenshot-studio.com/api/screenshot \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com"}' \
| jq -r .screenshot | base64 -d > shot.pngБазовый URL
https://www.screenshot-studio.comКонечные точки
POST/api/screenshot
идентификатор операции: captureScreenshot
Отображает страницу по заданному URL-адресу и возвращает снимок экрана в виде PNG в кодировке Base64. Результаты кэшируются по URL-адресу, типу устройства и цветовой схеме.
Запрос
curl -X POST https://www.screenshot-studio.com/api/screenshot \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"deviceType": "desktop",
"colorScheme": "light",
"forceRefresh": false
}'Ответ
{
"screenshot": "iVBORw0KGgoAAAANSUhEUg...",
"url": "https://example.com",
"cached": false,
"strategy": "microlink",
"deviceType": "desktop",
"colorScheme": "light"
}POST/api/export
идентификатор операции: optimizeExportImage
Повторно сжимает изображение с помощью Sharp и возвращает оптимизированные байты. JPEG использует MozJPEG, WebP использует libwebp, PNG использует адаптивную фильтрацию. Тело ответа — это само изображение, а не JSON.
Запрос
curl -X POST https://www.screenshot-studio.com/api/export \
-F "image=@shot.png" \
-F "format=webp" \
-F "qualityPreset=high" \
-o shot.webpОтвет
HTTP/2 200
content-type: image/webp
<binary image bytes>GET/api/tweet/{id}
идентификатор операции: getTweet
Возвращает общедоступные полезные данные твита, используемые для рендеринга твита в виде изображения. Идентификатор — это числовой идентификатор статуса из URL-адреса твита.
Запрос
curl https://www.screenshot-studio.com/api/tweet/1234567890123456789Ответ
{
"data": {
"id_str": "1234567890123456789",
"text": "...",
"user": { "name": "...", "screen_name": "..." }
}
}GET/api/image-proxy
идентификатор операции: proxyTwitterImage
Streams a Twitter-hosted image through this origin so it can be drawn onto a canvas without tainting it. Only pbs.twimg.com, abs.twimg.com, ton.twitter.com, and video.twimg.com are allowed.
Запрос
curl "https://www.screenshot-studio.com/api/image-proxy?url=https://pbs.twimg.com/media/EXAMPLE.jpg" \
-o media.jpgОтвет
HTTP/2 200
content-type: image/jpeg
<binary image bytes>Ошибки
Каждый неудачный запрос возвращает JSON той же формы. Филиал на code, который является стабильным; error и message нести один и тот же удобочитаемый текст, и hint объясняет, как восстановиться.
{
"error": "URL is required",
"code": "invalid_request",
"message": "URL is required",
"hint": "Send a JSON body with a \"url\" string, for example {\"url\": \"https://example.com\"}.",
"status": 400,
"documentation": "https://www.screenshot-studio.com/docs#errors"
}| Код | Статус | Значение |
|---|---|---|
| invalid_request | 400 | A required field is missing or malformed. |
| invalid_url | 400 | The url is not a valid absolute http or https URL. |
| unsupported_value | 400 | A field was set to a value outside its allowed enum. |
| forbidden_domain | 403 | The requested host is not on the proxy allowlist. |
| not_found | 404 | No endpoint or resource matches the request. |
| method_not_allowed | 405 | The endpoint does not accept this HTTP method. |
| rate_limited | 429 | The per-IP rate limit was exceeded. Honour Retry-After. |
| upstream_timeout | 408 | The target page took too long to load. |
| upstream_unavailable | 503 | The upstream capture service is unreachable. |
| upstream_failed | 502 | The upstream host refused or failed the request. |
| internal_error | 500 | Unexpected server-side failure. |
Согласование содержания уценки
Каждая страница этого сайта предоставляет Markdown клиентам, которые об этом просят. Набор ответов Content-Type: text/markdown; charset=utf-8 и Vary: Accept, Accept-Encoding. Запрос, который не принимает ни text/html ни text/markdown отвечает с 406, и возвращается неизвестный путь 404 со списком тела Markdown, где искать дальше.
curl -H "Accept: text/markdown" https://www.screenshot-studio.com/Связанные ресурсы
Спецификация OpenAPI 3.1
Machine-readable contract for every operation on this page.
Аутентификация и ограничения скорости
No API key is required. Read the per-IP limits here.
Портал разработчиков
Quickstart, agent files, and the open-source repository.
llms.txt
Markdown overview of the whole site for AI agents.