GeoScreenshot API

GeoScreenshot provides a web service for capturing webpages from multiple locations.
Node.js Client: https://www.npmjs.com/package/geoscreenshot-api
Contact Info: contact@geoscreenshot.com
Version: 0.2.1
BasePath:/api/ws
Apache 2.0
http://www.apache.org/licenses/LICENSE-2.0.html

Access

  1. HTTP Basic Authentication

Methods

[ Jump to Models ]

Table of Contents

  1. get /account
  2. post /capture
  3. get /locations
Up
get /account
Returns account information for the authenticated user (getAccount)
Returns account info and credit information

Consumes

This API call consumes the following media types via the Content-Type request header:

Return type

AccountInfo

Example data

Content-Type: application/json
{
  "plan" : "free",
  "email" : "demo@geoscreenshot.com",
  "credits" : 88
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Account information AccountInfo

401

The username/password combination is incorrect. GeneralStatus

Up
post /capture
Capture a single webpage. This operation is the equivalent of selecting one location from the UI and clicking Capture. Upon success, it will add the result to the account capture history and deduct 1 credit point. It returns a JSON object with a Base64 encoded PNG string. Since the endpoint is not CORS friendly, we recommend using a back-end client. (capture)
Capture a web page.

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

request (required)
Body Parameter — Capture Object

Return type

CaptureResult

Example data

Content-Type: application/json
{
  "id" : "onmrfv9ucj6oplgcik9_nl-nh-mst",
  "success" : true,
  "image" : "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABF1BMVEUAAAAYthgKnwxHxz592m4KnwwLnQ0LoQwMpw0Npw4QoxETtBEUmBUUmhUYmhYboRgcpBkcpBoepRoetBweuBYftxchqRwiuhoktB4lrSAmrh8ntCAnthwnvCIptSEqtiIrtR8rtyIuvSQuvSUvviUvvyQwviUywC0zxiI0zyE1wSs1zSM1ziI2yyQ2ziU2zyI40CQ50CY9zi1AxThBxzBB1C1I1TFK0TBK1DFK1zBMzztN1DNOykVT2jVW2kFa3ERc2kZd3Tlf1VBf30pgzlNj3kpk1FRn4U9n4VFp4UFr01tt4FZv31t45V9522iB42yB5G2N53mQ5n6R6HOe64Ct7p2w8Zu49abA96/F+LPH97PL+LjR+b+sVTzaAAAABXRSTlMAeY329iuJcGYAAACMSURBVHgBYyARWDGi8kWcgmSQ+eJuoe4KSHxRv2hnDX4En4Mlxl5XAGgIExOYz+4SZWcoxsvAoBXixQrkczJHOhhI8gBZJp7BNmwMXOoRPvpqfCCljOaOvsbcsuH+mnJSEMOErW29PcICdZSEYMZLWFi6BuipyiEslDYz1VaWR3aiopGKHKonBAXhTACrQREIKUsyqQAAAABJRU5ErkJggg=="
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Capture Result CaptureResult

400

Invalid Parameters ValidationError

403

The username/password combination is incorrect, please verify the HTTP Authorization header and contact support if problem persists. GeneralStatus

Up
get /locations
The GeoLocations endpoint returns the current list of active locations as `Location` objects. We recommend querying this endpoint before issuing capture requests. (locations)
List all locations

Consumes

This API call consumes the following media types via the Content-Type request header:

Return type

Locations

Example data

Content-Type: application/json

      [
	{
		"name": "ca-on-trn",
		"city": "Toronto",
		"state": "ON",
		"country_code": "CA",
		"country": "Canada",
		"lat": 43.6667,
		"lon": -79.4167,
		"plan": "free",
		"timezone": "America/Toronto"
	},
	{
		"name": "cn-33-hng",
		"city": "Hangzhou",
		"state": "33",
		"country_code": "CN",
		"country": "China",
		"lat": 30.2936,
		"lon": 120.1614,
		"plan": "free",
		"timezone": "Asia/Shanghai"
	},
	{
		"name": "in-ka-bng",
		"city": "Bengaluru",
		"state": "KA",
		"country_code": "IN",
		"country": "India",
		"lat": 12.9833,
		"lon": 77.5833,
		"plan": "free",
		"timezone": "Asia/Kolkata"
	},
	{
		"name": "nl-nh-mst",
		"city": "Amsterdam",
		"state": "NH",
		"country_code": "NL",
		"country": "Netherlands",
		"lat": 52.35,
		"lon": 4.9167,
		"plan": "free",
		"timezone": "Europe/Amsterdam"
	}]
      
    

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

An array of `Location` objects Locations

401

The username/password combination is incorrect. GeneralStatus

Up

Models

[ Jump to Methods ]

Table of Contents

  1. AccountInfo
  2. Capture
  3. CaptureResult
  4. GeneralStatus
  5. Location
  6. Locations
  7. ValidationError

AccountInfo Up

email (optional)
String Email address associated with account
plan (optional)
String Advanced or Free
credits (optional)
Double Credits available format: double

Capture Up

id (optional)
String Auto-generated unique ID for screenshot. Ignored for web service requests.
url
location
String System name for Location (eg. Los Angeles would be us-ca-lsn). Can be retrieved from the /locations endpoint.
viewport (optional)
String The page view port in the (width x height) format. For ex (1336x768).
delay (optional)
Double Number of seconds to wait after page load is completed, before taking the screenshot. format: double
useragent (optional)
String The desired emulated browser. Currently only supports Chrome, Firefox, Android, and Mobile Safari. format: enum
fullpage (optional)
Boolean Whether to render the entire page or just above the fold of the viewport
no_images (optional)
Boolean Hide images.
no_cache (optional)
Boolean Clear cache per request. Cached responses do not deduct credit from your account. If the capture URL changes often, this is useful for always fetching the latest content.

CaptureResult Up

id
String Unique auto-generated ID for the screenshot
success
Boolean True or False
ping (optional)
Double Number of milliseconds until the first HTTP response. Used for debugging, not currently publicly available. format: double
image (optional)
byte[] Base64 encoded PNG of the resulting screenshot format: byte
image_url (optional)
String URL of generated PNG image (if applicable)
har (optional)
String HTTP Requests
html (optional)
String Generated HTML
message (optional)
error_code (optional)
String Type of errors that are handled.
Enum:
ERR_CONNECT
ERR_CAPTURE
ERR_TIMEOUT
ERR_SERVER_DOWN
ERR_ANONYMOUS_LIMIT
ERR_NO_CREDIT
ERR_INVALID_OPTION
ERR_USER_INVALID
error (optional)

GeneralStatus Up

success
message (optional)
error_code (optional)
error (optional)

Location Up

name
String System name for Location (eg. Los Angeles would be us-ca-lsn). Can be retrieved from the /locations endpoint.
city (optional)
String City / Town
state (optional)
String State or Region
country (optional)
String Full name of country
country_code (optional)
String ISO 3166-1 Alpha 2 Country Code
lat (optional)
Double Latitude format: double
lon (optional)
Double Longitude format: double

Locations Up

ValidationError Up

invalid
String Name of missing/invalid parameter
error