The official python client of ApiFlash, website screenshot API.
ApiFlash Python Client
Easily capture website screenshots using the ApiFlash website screenshot API.
Signup at apiflash.com to get your API key.
pip install apiflash
# TODO print('ok')
|access_key||Your personal access key to use the API. You can find it in your dashboard.|
|url||The URL of the website you want to request a snapshot from. The protocol (
||The number of seconds the screenshot should be kept in cache. When a screenshot is served from cache, the API call doesn't count in your monthly credit. From 0 to 2592000 (30 days) seconds.|
||Return a fresh new screenshot instead of the eventually cached one.|
||Set this to
||Set this to
||Width of the viewport to use.|
||Height of the viewport to use. This will be ignored if full_page is set to
||Delay, after the
||The format of the returned screenshot. One of
The type of response to return. Can be either
||The quality of the image between
||Hides the default background and allows capturing screenshots with transparency. This only works with the
|css||An additional CSS string to be injected into the page before capturing. The CSS string might need to be URL encoded to be processed correctly.|
||Extract the HTML of the page at the same time the screenshot is made. This only works when the response_type parameter is set to
|accept_language||Sets an Accept-Language header on requests to the target URL allowing you to make screenshots of a website with a specific language.|
|user_agent||Sets the User-Agent header to emulate a particular client when making screenshots.|
|location||A country location to use when emulating geo-location. ISO alpha-2 and ISO alpha-3 country codes are supported.|
|latitude||The latitude to use when emulating geo-location between
|longitude||The longitude to use when emulating geo-location between
||Accuracy value to use when emulating geo-location.|
|fail_on_status||A comma separated list of HTTP status codes that should make the API call fail instead of returning a screenshot. Hyphen separated HTTP status codes can be used to define ranges. For example
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.