{"openapi":"3.0.0","info":{"title":"Screenshotlayer","description":"Screenshotlayer is a lightweight REST API built to deliver high quality PNG, JPEG & GIF website screenshots at unparalleled speeds and through a simple interface.","version":"1.0.0"},"servers":[{"url":"https://api.screenshotlayer.com/api"}],"paths":{"/capture":{"get":{"tags":["Endpoints"],"summary":"Capturing a snapshot using the screenshotlayer API","operationId":"screenshotlayerCapture","parameters":[{"name":"access_key","in":"query","description":"In order to make any API request, two required parameters - your personal access_key and the target website's url - have to be specified.","required":true,"schema":{"type":"string"}},{"name":"url","in":"query","description":"The target website URL to capture a screenshot of.","required":true,"schema":{"type":"string","example":"http://www.apple.com"}},{"name":"fullpage","in":"query","description":"set to '1' if you want to capture the full height of the target website","required":false,"schema":{"type":"integer","enum":[0,1]}},{"name":"width","in":"query","description":"specify your preferred thumbnail width in pixels","required":false,"schema":{"type":"integer","minimum":1}},{"name":"viewport","in":"query","description":"specify your preferred viewport dimensions in pixels","required":false,"schema":{"type":"string","pattern":"^[0-9]+x[0-9]+$"}},{"name":"format","in":"query","description":"set your preferred image output format","required":false,"schema":{"type":"string","enum":["PNG","JPG","JPEG","GIF","WEBP"]}},{"name":"secret_key","in":"query","description":"your secret key, an md5 hash of the target URL and your secret word.","required":false,"schema":{"type":"string"}},{"name":"css_url","in":"query","description":"attach a URL containing a custom CSS stylesheet","required":false,"schema":{"type":"string"}},{"name":"delay","in":"query","description":"specify a delay before screenshot is captured (in seconds)","required":false,"schema":{"type":"integer","maximum":20,"minimum":1}},{"name":"ttl","in":"query","description":"define the time (in seconds) your snapshot should be cached","required":false,"schema":{"type":"integer","maximum":2592000,"minimum":300}},{"name":"force","in":"query","description":"set to '1' if you want to force the API to capture a fresh screenshot","required":false,"schema":{"type":"integer","enum":[0,1]}},{"name":"placeholder","in":"query","description":"attach a URL containing a custom placeholder image or set to '1' to use default placeholder","required":false,"schema":{"type":"string"}},{"name":"user_agent","in":"query","description":"specify a custom User-Agent HTTP header to send with your request","required":false,"schema":{"type":"string"}},{"name":"accept_lang","in":"query","description":"specify a custom Accept-Language HTTP header to send with your request","required":false,"schema":{"type":"string"}},{"name":"export","in":"query","description":"export snapshot via custom ftp path or using your AWS S3 user details","required":false,"schema":{"type":"string"}},{"name":"scale","in":"query","description":"Determines device pixel ratio for rendering. Set to `1` to use default or use 2 for Retina. Supported: 1, 1.5, 2).","required":false,"schema":{"type":"number"}},{"name":"quality","in":"query","description":"Defines the quality for the output. Set to `70` to use default. Supported: 1-100).","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"On success, the generated screenshot image. Content-Type follows the format parameter (image/png default, or image/jpeg, image/gif, image/webp). The body is binary image data.","content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/gif":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad Request - validation error (invalid or missing parameter)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"},"503":{"$ref":"#/components/responses/503"}}}}},"externalDocs":{"description":"Official Screenshotlayer documentation (reference)","url":"https://screenshotlayer.com/documentation"},"components":{"schemas":{"Error":{"title":"Error","type":"object","required":["success","error"],"properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"code":{"type":"integer","example":101},"type":{"type":"string","example":"invalid_access_key"},"info":{"type":"string","example":"You have not supplied a valid API Access Key. [Technical Support: support@apilayer.com]"}}}}}},"responses":{"401":{"description":"Unauthorized","content":{"application/json; Charset=UTF-8":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"account_on_hold":{"summary":"account_on_hold","value":{"success":false,"error":{"code":107,"type":"account_on_hold","info":"Your account currently has open invoices and API has been automatically disabled. Please settle your open balance or downgrade to the Free Plan to restore API access. [Support: support@apilayer.com]"}}},"invalid_access_key":{"summary":"invalid_access_key","value":{"success":false,"error":{"code":101,"type":"invalid_access_key","info":"You have not supplied a valid API Access Key. [Technical Support: support@apilayer.com]"}}},"missing_access_key":{"summary":"missing_access_key","value":{"success":false,"error":{"code":101,"type":"missing_access_key","info":"You have not supplied an API Access Key. [Required format: access_key=YOUR_ACCESS_KEY]"}}},"inactive_user":{"summary":"inactive_user","value":{"success":false,"error":{"code":102,"type":"inactive_user","info":"Permission denied - User not active."}}}}}}},"403":{"description":"Forbidden","content":{"application/json; Charset=UTF-8":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"https_access_restricted":{"summary":"https_access_restricted","value":{"success":false,"error":{"code":105,"type":"https_access_restricted","info":"Access Restricted - Your current Subscription Plan does not support HTTPS Encryption."}}},"function_access_restricted":{"summary":"function_access_restricted","value":{"success":false,"error":{"code":105,"type":"function_access_restricted","info":"Access Restricted - Your current Subscription Plan does not support this API Function."}}},"spread_access_restricted":{"summary":"spread_access_restricted","value":{"success":false,"error":{"code":403,"type":"spread_access_restricted","info":"Access Restricted - Your current Subscription Plan does not support Bid/Ask Data."}}},"source_currency_access_restricted":{"summary":"source_currency_access_restricted","value":{"success":false,"error":{"code":403,"type":"source_currency_access_restricted","info":"Access Restricted - Your current Subscription Plan does not support Source Currency Switching."}}},"api_access_blocked":{"summary":"api_access_blocked","value":{"success":false,"error":{"code":104,"type":"api_access_blocked","info":"Your API access has been temporarily disabled. Please upgrade your Subscription Plan or contact support."}}}}}}},"404":{"description":"Not Found","content":{"application/json; Charset=UTF-8":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_api_function":{"summary":"invalid_api_function","value":{"success":false,"error":{"code":103,"type":"invalid_api_function","info":"This API Function does not exist."}}},"404_not_found":{"summary":"404_not_found","value":{"success":false,"error":{"code":404,"type":"404_not_found","info":"404 - The requested resource could not be found. Please try again or contact support."}}}}}}},"429":{"description":"Too Many Requests","content":{"application/json; Charset=UTF-8":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"usage_limit_reached":{"summary":"usage_limit_reached","value":{"success":false,"error":{"code":104,"type":"usage_limit_reached","info":"Your monthly usage limit has been reached. Please upgrade your Subscription Plan."}}},"daily_usage_limit_reached":{"summary":"daily_usage_limit_reached","value":{"success":false,"error":{"code":104,"type":"daily_usage_limit_reached","info":"Your daily usage limit has been reached. Please try again tomorrow or upgrade your subscription plan."}}},"fair_use_limit_reached":{"summary":"fair_use_limit_reached","value":{"success":false,"error":{"code":104,"type":"fair_use_limit_reached","info":"Your fair use limit has been reached. [Please contact support: support@apilayer.com]"}}},"rate_limit_reached":{"summary":"rate_limit_reached","value":{"success":false,"error":{"code":106,"type":"rate_limit_reached","info":"You have exceeded the maximum rate limitation allowed on your subscription plan. Please refer to the \"Rate Limits\" section of the API Documentation for details. "}}}}}}},"500":{"description":"Internal Server Error","content":{"application/json; Charset=UTF-8":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"internal_error","value":{"success":false,"error":{"code":0,"type":"internal_error","info":"An error has occured. [Technical Support: support@apilayer.com]"}}}}}}},"503":{"description":"Service Unavailable","content":{"application/json; Charset=UTF-8":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"maintenance_mode":{"summary":"maintenance_mode","value":{"success":false,"error":{"code":503,"type":"maintenance_mode","info":""}}}}}}}}}}