GeoScreenshot API Beta

We’ve released an early version of the GeoScreenshot 2 API for our advanced plan users. Here is a brief tutorial on how to get started.

Step 1. Generate an API Key

Your API key is private and should not be shared with another person. If you need to create multiple API keys for different applications or users on your team, Geo allows you to create multiple keys and manage them individually.

Navigate to My Account:

https://www.geoscreenshot.com/userarea/account/api

Step 2. Make a request to the screenshot endpoint with your API key

URL: https://api.geoscreenshot.com/screenshot?

Query String Params:

  • apikey – Api key from dashboard
  • url – A valid HTTP/S URL
  • country – Alpha 2 country code (Required)

Advanced capture settings

  • user_agent – 1 or 0, User agent string override (Optional , defaults to Google Chrome)
  • full_page – 1 or 0, Capture the full height of the page (Optional , defaults to 0)
  • local_tz – 1 or 0, Use local timezone (Optional , defaults to 1)
  • local_html5_geolocation – 1 or 0, Use local HTML5 geolocation (Optional , defaults to 1)
  • width – Viewport width (Optional, defaults to 1280px)
  • height – Viewport height (Optional, defaults to 1024px)

Advanced location settings

Sample Response:

"_meta": {
        "uid": "fabd8fa3-c4aa-4a0f-9894-a3580b31ec74",
        "startTime": 1591611008242,
        "endTime": 1591611020878,
        "duration": 12636,
        "instanceId": "516e8d0cbddbf6b25f4d0218f87336ec_0"
    },
    "_hash": {
        "perceptual": "b00c07ef7cf7b001f0c7f0417071f07330f17bf1f00731c1fff03000f040f3f3",
        "html": "15e0cdc83fe612e296339b958f9d6934c8d056908a5b47f31f92bce740e60843",
        "png": "9a93408fe05bc13d71db4220039a5f3454de19a1078f5bbc2825fc5391ead329",
        "console": "83f976263ba5eece3baa5ec655439f41257dd62f1d55dfd66b98d08eac97345b",
        "har": "14d08a710f8d35fb498c218d959841dcdfa835ff92ef3a8dd1ed7f3e84590f53",
        "cookies": "b13ab3f6a59045b8ca7031e0032618280b3d49749902d1f255a1d0c5ce9de066"
    },
    "errors": {
        "html": null,
        "png": null,
        "navigate": null
    },
    "png": "https://s3.amazonaws.com/geoscreenshot-static/fabd8fa3-c4aa-4a0f-9894-a3580b31ec74.png",
    "html": "https://s3.amazonaws.com/geoscreenshot-static/fabd8fa3-c4aa-4a0f-9894-a3580b31ec74.html",
    "console": "https://s3.amazonaws.com/geoscreenshot-static/fabd8fa3-c4aa-4a0f-9894-a3580b31ec74.console.json",
    "har": "https://s3.amazonaws.com/geoscreenshot-static/fabd8fa3-c4aa-4a0f-9894-a3580b31ec74.har.json",
    "metrics": {
        "dnsLookup": 0,
        "tcpConnect": 0,
        "request": 175,
        "response": 917,
        "domLoaded": 3859,
        "domInteractive": 1910,
        "pageLoad": 1,
        "fullTime": 4821
    },
    "cookies": "https://s3.amazonaws.com/geoscreenshot-static/fabd8fa3-c4aa-4a0f-9894-a3580b31ec74.cookies.json",
    "ip": "69.197.157.130",
    "title": "Google News",
    "capture_id": "148936",
    "domain": "news.google.com",
    "url": "https://news.google.com",
    "metro_id": "us_mss_knsscty",
    "node_id": "us_mss_kns_1luhIL",
    "options": "{}",
    "created_at": "2020-06-08T10:10:21.000Z",
    "updated_at": "2020-06-08T10:10:21.000Z"
}

Step 3. Parse the JSON

  • _meta – Metadata about the capture request lifecycle
  • _hash – Hashes of the data returned, including a perceptual hash for similarity indexing
  • errors – Any errors encountered during capture
  • png – URL to the PNG
  • html – URL to the rendered HTML
  • console – A JSON of any console messages encountered
  • har – HTTP archive waterfall of the requests
  • metrics – Page load performance metrics
  • cookies – Cookie jar JSON
  • ip – The public IP used
  • title – The webpage’s final title at the time of the capture
  • capture_id – Internal id used for future reference
  • domain – The parsed domain of the URL, used for blacklisting adult sties
  • url – The requested URL
  • metro_id – The precise metropolitan area used. You can pass this instead of country to get consistent geo-ip targeting.
  • node_id – The precise VPS node used to run the capture. You can pass this instead of metro_id to re-use the same IP multiple times

Shortcut Endpoints

For PNG: https://api.geoscreenshot.com/screenshot/png?apikey=<API_KEY>&url=https://news.ycombinator.com&country=de

For HTML: https://api.geoscreenshot.com/screenshot/html?apikey=<API_KEY>&url=https://news.ycombinator.com&country=de&no_precheck

For HAR: https://api.geoscreenshot.com/screenshot/har?apikey=<API_KEY>&url=https://news.ycombinator.com&country=de&no_precheck

For Console Output: https://api.geoscreenshot.com/screenshot/har?apikey=<API_KEY>&url=https://news.ycombinator.com&country=de&no_precheck