---
title: Phantomjs Cloud
slug: connectors/phantomjs-cloud
docTags: 
createdAt: 2026-06-09T16:29:41.235Z
---

PhantomJs Cloud provides web page rendering and scraping services via an API, enabling automated website information retrieval and screenshot capture.

PhantomJs Cloud is a powerful web automation and data extraction platform that allows users to capture website information and screenshots programmatically. The PhantomJs Cloud connector for Swimlane Turbine enables users to automate the retrieval of detailed website information in JSON format, including rendering and structure, as well as capturing high-quality screenshots of web pages. This integration empowers security teams to streamline the collection of web intelligence and visual evidence, enhancing their cyber investigation and monitoring capabilities without the need for complex coding.

## Prerequisites

To effectively utilize the PhantomJs Cloud connector within Turbine, ensure you have the following prerequisites:

- API Key Authentication:
  - URL: The endpoint for the PhantomJs Cloud API service.
  - API Key: A unique identifier to authenticate requests to PhantomJs Cloud.

## Notes:

- **LOWER YOUR COST**: Use requestSettings:\{"doneWhen":\[\{ "event":"domReady"},]} as shown in this example. That page loads in about 6 seconds, whereas the original without dom-ready loads in about 20 seconds. The difference is that we render when the browser signals domReady. Normally we wait until all resources (ads, CSS,images, etc) are loaded.
- **TRACK COST**: View the HTTP Response Headers we send back with every API call. This includes details such as the cost of your page and how many credits remain. See all the pjsc-billing-\* headers.
- **WHAT RESOURCES FAILED TO LOAD**: Some pages have resources (images, CSS, fonts, etc) that fail to load. Usually due to broken links. You can track this by inspecting the HTTP Response Headers. See all the pjsc-content-resource-\* headers.
- **ALL METADATA ABOUT THE PAGE / PROCESSING**: use the outputAsJson\:true property. This will return your content and all details about load times, cookies, iFrames, sub-resources, etc.

## Actions Setup

### Example requests

### Minimal Request

```javascript
{
"url":"http://www.google.com",
"renderType":"jpg",
"outputAsJson":false,
"requestSettings: 
      {  
         "doneWhen":
        [
           { "event":"domReady"}
        ]
     }
}
```

### Request with all inputs

```javascript
{
    "url": "http://google.com",
    "content": null,
    "urlSettings": {
        "operation": "GET",
        "encoding": "utf8",
        "headers": {},
        "data": null
    },
    "renderType": "jpg",
    "outputAsJson": true,
    "requestSettings": {
        "doneWhen":[
        { "event":"domReady"}
        ],
        "ignoreImages": false,
        "disableJavascript": false,
        "userAgent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.34 (KHTML, like Gecko) Safari/534.34 PhantomJS/2.0.0 (PhantomJsCloud.com/2.0.1)",
        "authentication": {
            "userName": "guest",
            "password": "guest"
        },
        "xssAuditingEnabled": false,
        "webSecurityEnabled": false,
        "resourceWait": 15000,
        "resourceTimeout": 35000,
        "maxWait": 35000,
        "waitInterval": 1000,
        "stopOnError": false,
        "resourceModifier": [],
        "customHeaders": {},
        "clearCache": false,
        "clearCookies": false,
        "cookies": [],
        "deleteCookies": []
    },
    "suppressJson": [
        "events.value.resourceRequest.headers",
        "events.value.resourceResponse.headers",
        "frameData.content",
        "frameData.childFrames"
    ],
    "renderSettings": {
        "quality": 70,
        "pdfOptions": {
            "border": null,
            "footer": {
                "firstPage": null,
                "height": "1cm",
                "lastPage": null,
                "onePage": null,
                "repeating": "%pageNum%/%numPages%"
            },
            "format": "letter",
            "header": null,
            "height": null,
            "orientation": "portrait",
            "width": null
        },
        "clipRectangle": null,
        "renderIFrame": null,
        "viewport": {
            "height": 1280,
            "width": 1280
        },
        "zoomFactor": 1,
        "passThroughHeaders": false
    },
    "scripts": {
        "domReady": [],
        "loadFinished": []
    }
}
```

# Configurations

## API Key Authentication

Authenticates using an API Key

### Configuration Parameters

| **Parameter** | **Description**                    | **Type** | **Required** |
| ------------- | ---------------------------------- | -------- | ------------ |
| url           | A URL to the target host.          | string   | Required     |
| apikey        | API key                            | string   | Required     |
| verify\_ssl   | Verify SSL certificate             | boolean  | Optional     |
| http\_proxy   | A proxy to route requests through. | string   | Optional     |

# Actions

## Get Website Information

Retrieve detailed information of a website in JSON format, including rendering and structure, using the specified URL and renderType.

### Endpoint

- **Method:** `POST`

### Input

| **Argument Name**                         | **Type** | **Required** | **Description**                       |
| ----------------------------------------- | -------- | ------------ | ------------------------------------- |
| `url`                                     | string   | Optional     | URL endpoint for the request          |
| `content`                                 | object   | Optional     | Response content                      |
| `urlSettings`                             | object   | Optional     | URL endpoint for the request          |
| `urlSettings.operation`                   | string   | Optional     | URL endpoint for the request          |
| `urlSettings.encoding`                    | string   | Optional     | URL endpoint for the request          |
| `urlSettings.headers`                     | object   | Optional     | HTTP headers for the request          |
| `urlSettings.data`                        | object   | Optional     | Response data                         |
| `renderType`                              | string   | Optional     | Type of the resource                  |
| `outputAsJson`                            | boolean  | Optional     | Parameter for Get Website Information |
| `requestSettings`                         | object   | Optional     | Parameter for Get Website Information |
| `requestSettings.doneWhen`                | array    | Optional     | Parameter for Get Website Information |
| `requestSettings.doneWhen.event`          | string   | Optional     | Parameter for Get Website Information |
| `requestSettings.ignoreImages`            | boolean  | Optional     | Parameter for Get Website Information |
| `requestSettings.disableJavascript`       | boolean  | Optional     | Parameter for Get Website Information |
| `requestSettings.userAgent`               | string   | Optional     | Parameter for Get Website Information |
| `requestSettings.authentication`          | object   | Optional     | Parameter for Get Website Information |
| `requestSettings.authentication.userName` | string   | Optional     | Name of the resource                  |
| `requestSettings.authentication.password` | string   | Optional     | Parameter for Get Website Information |
| `requestSettings.xssAuditingEnabled`      | boolean  | Optional     | Parameter for Get Website Information |
| `requestSettings.webSecurityEnabled`      | boolean  | Optional     | Parameter for Get Website Information |
| `requestSettings.resourceWait`            | number   | Optional     | Parameter for Get Website Information |
| `requestSettings.resourceTimeout`         | number   | Optional     | Parameter for Get Website Information |
| `requestSettings.maxWait`                 | number   | Optional     | Parameter for Get Website Information |
| `requestSettings.waitInterval`            | number   | Optional     | Parameter for Get Website Information |
| `requestSettings.stopOnError`             | boolean  | Optional     | Error message if any                  |

### Input Example

`{"json_body":{"url":"http://google.com","content":null,"urlSettings":{"operation":"GET","encoding":"utf8","headers":{},"data":null},"renderType":"jpg","outputAsJson":true,"requestSettings":{"doneWhen":[{"event":"domReady"}],"ignoreImages":false,"disableJavascript":false,"userAgent":"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.34 (KHTML, like Gecko) Safari/534.34 PhantomJS/2.0.0 (PhantomJsCloud.com/2.0.1)","authentication":{"userName":"guest","password":"guest"},"xssAuditingEnabled":false,"webSecurityEnabled":false,"resourceWait":15000,"resourceTimeout":35000,"maxWait":35000,"waitInterval":1000,"stopOnError":false,"resourceModifier":[],"customHeaders":{},"clearCache":false,"clearCookies":false,"cookies":[],"deleteCookies":[]},"suppressJson":["events.value.resourceRequest.headers","events.value.resourceResponse.headers","frameData.content","frameData.childFrames"],"renderSettings":{"quality":70,"pdfOptions":{"border":null,"footer":{"firstPage":null,"height":"1cm","lastPage":null,"onePage":null,"repeating":"%pageNum%/%numPages%"},"format":"letter","header":null,"height":null,"orientation":"portrait","width":null},"clipRectangle":null,"renderIFrame":null,"viewport":{"height":1280,"width":1280},"zoomFactor":1,"passThroughHeaders":false},"scripts":{"domReady":[],"loadFinished":[]}}}`

### Output

| **Parameter**                                                   | **Type** | **Description**                                                             |
| --------------------------------------------------------------- | -------- | --------------------------------------------------------------------------- |
| `status_code`                                                   | number   | HTTP status code of the response                                            |
| `reason`                                                        | string   | Response reason phrase                                                      |
| `statusCode`                                                    | number   | Status value                                                                |
| `statusMessage`                                                 | object   | Status value                                                                |
| `originalRequest`                                               | object   | Output field: originalRequest                                               |
| `originalRequest.webSecurityEnabled`                            | boolean  | Output field: originalRequest.webSecurityEnabled                            |
| `originalRequest.pages`                                         | array    | Output field: originalRequest.pages                                         |
| `originalRequest.pages.url`                                     | string   | URL endpoint for the request                                                |
| `originalRequest.pages.content`                                 | object   | Response content                                                            |
| `originalRequest.pages.urlSettings`                             | object   | URL endpoint for the request                                                |
| `originalRequest.pages.urlSettings.operation`                   | string   | URL endpoint for the request                                                |
| `originalRequest.pages.urlSettings.encoding`                    | string   | URL endpoint for the request                                                |
| `originalRequest.pages.urlSettings.headers`                     | object   | HTTP headers for the request                                                |
| `originalRequest.pages.urlSettings.data`                        | object   | Response data                                                               |
| `originalRequest.pages.renderType`                              | string   | Type of the resource                                                        |
| `originalRequest.pages.outputAsJson`                            | boolean  | Output field: originalRequest.pages.outputAsJson                            |
| `originalRequest.pages.requestSettings`                         | object   | Output field: originalRequest.pages.requestSettings                         |
| `originalRequest.pages.requestSettings.doneWhen`                | array    | Output field: originalRequest.pages.requestSettings.doneWhen                |
| `originalRequest.pages.requestSettings.doneWhen.event`          | string   | Output field: originalRequest.pages.requestSettings.doneWhen.event          |
| `originalRequest.pages.requestSettings.ignoreImages`            | boolean  | Output field: originalRequest.pages.requestSettings.ignoreImages            |
| `originalRequest.pages.requestSettings.disableJavascript`       | boolean  | Output field: originalRequest.pages.requestSettings.disableJavascript       |
| `originalRequest.pages.requestSettings.userAgent`               | string   | Output field: originalRequest.pages.requestSettings.userAgent               |
| `originalRequest.pages.requestSettings.authentication`          | object   | Output field: originalRequest.pages.requestSettings.authentication          |
| `originalRequest.pages.requestSettings.authentication.userName` | string   | Name of the resource                                                        |
| `originalRequest.pages.requestSettings.authentication.password` | string   | Output field: originalRequest.pages.requestSettings.authentication.password |

### Output Example

`{"status_code":200,"response_headers":{"pjsc-billing-credit-cost":"0.000151384","pjsc-billing-elapsedms":"2192","pjsc-billing-bytes":"257,914","pjsc-billing-proxy-ingress-bytes":"0","pjsc-billing-proxy-ingress-cost":"0","pjsc-billing-total-credits-remaining":"0.048475749","pjsc-billing-daily-subscription-credits-remaining":"0.047475749","pjsc-billing-prepaid-credits-remaining":"0.001","local-address":"190.195.70.130","pjsc-backend-id":"1-05np","pjsc-content-status-code":"200","pjsc-content-name"...`

## Get Website Screenshot

Capture a screenshot of a specified website using PhantomJs Cloud, requiring the URL and render type.

### Endpoint

- **Method:** `POST`

### Input

| **Argument Name**                         | **Type** | **Required** | **Description**                      |
| ----------------------------------------- | -------- | ------------ | ------------------------------------ |
| `url`                                     | string   | Optional     | URL endpoint for the request         |
| `content`                                 | object   | Optional     | Response content                     |
| `urlSettings`                             | object   | Optional     | URL endpoint for the request         |
| `urlSettings.operation`                   | string   | Optional     | URL endpoint for the request         |
| `urlSettings.encoding`                    | string   | Optional     | URL endpoint for the request         |
| `urlSettings.headers`                     | object   | Optional     | HTTP headers for the request         |
| `urlSettings.data`                        | object   | Optional     | Response data                        |
| `renderType`                              | string   | Optional     | Type of the resource                 |
| `outputAsJson`                            | boolean  | Optional     | Parameter for Get Website Screenshot |
| `requestSettings`                         | object   | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.doneWhen`                | array    | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.doneWhen.event`          | string   | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.ignoreImages`            | boolean  | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.disableJavascript`       | boolean  | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.userAgent`               | string   | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.authentication`          | object   | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.authentication.userName` | string   | Optional     | Name of the resource                 |
| `requestSettings.authentication.password` | string   | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.xssAuditingEnabled`      | boolean  | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.webSecurityEnabled`      | boolean  | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.resourceWait`            | number   | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.resourceTimeout`         | number   | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.maxWait`                 | number   | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.waitInterval`            | number   | Optional     | Parameter for Get Website Screenshot |
| `requestSettings.stopOnError`             | boolean  | Optional     | Error message if any                 |

### Input Example

`{"json_body":{"url":"http://google.com","content":null,"urlSettings":{"operation":"GET","encoding":"utf8","headers":{},"data":null},"renderType":"jpg","requestSettings":{"doneWhen":[{"event":"domReady"}],"ignoreImages":false,"disableJavascript":false,"userAgent":"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/534.34 (KHTML, like Gecko) Safari/534.34 PhantomJS/2.0.0 (PhantomJsCloud.com/2.0.1)","authentication":{"userName":"guest","password":"guest"},"xssAuditingEnabled":false,"webSecurityEnabled":false,"resourceWait":15000,"resourceTimeout":35000,"maxWait":35000,"waitInterval":1000,"stopOnError":false,"resourceModifier":[],"customHeaders":{},"clearCache":false,"clearCookies":false,"cookies":[],"deleteCookies":[]},"suppressJson":["events.value.resourceRequest.headers","events.value.resourceResponse.headers","frameData.content","frameData.childFrames"],"renderSettings":{"quality":70,"pdfOptions":{"border":null,"footer":{"firstPage":null,"height":"1cm","lastPage":null,"onePage":null,"repeating":"%pageNum%/%numPages%"},"format":"letter","header":null,"height":null,"orientation":"portrait","width":null},"clipRectangle":null,"renderIFrame":null,"viewport":{"height":1280,"width":1280},"zoomFactor":1,"passThroughHeaders":false},"scripts":{"domReady":[],"loadFinished":[]}}}`

### Output

| **Parameter**    | **Type** | **Description**                  |
| ---------------- | -------- | -------------------------------- |
| `status_code`    | number   | HTTP status code of the response |
| `reason`         | string   | Response reason phrase           |
| `file`           | object   | File                             |
| `file.file_name` | string   | Name of the resource             |
| `file.file`      | string   | Output field: file.file          |

### Output Example

`{"status_code":200,"response_headers":{"pjsc-billing-credit-cost":"0.000131835","pjsc-billing-elapsedms":"1754","pjsc-billing-bytes":"252,335","pjsc-billing-proxy-ingress-bytes":"0","pjsc-billing-proxy-ingress-cost":"0","pjsc-billing-total-credits-remaining":"0.048495298","pjsc-billing-daily-subscription-credits-remaining":"0.047495298","pjsc-billing-prepaid-credits-remaining":"0.001","local-address":"190.195.70.130","pjsc-backend-id":"1-727r","pjsc-content-status-code":"200","pjsc-content-name"...`

# Response Headers

| **Header**                                        | **Description**                                                         | **Example**                                                         |
| ------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------- |
| access-control-expose-headers                     | HTTP response header: access-control-expose-headers                     | WWW-Authenticate,Server-Authorization                               |
| Alt-Svc                                           | HTTP response header: Alt-Svc                                           | h3=":443"; ma=2592000,h3-29=":443"; ma=2592000                      |
| cache-control                                     | Directives for caching mechanisms                                       | no-cache                                                            |
| content-disposition                               | HTTP response header: content-disposition                               | filename="www-google-com.jpeg"                                      |
| content-encoding                                  | HTTP response header: content-encoding                                  | gzip                                                                |
| content-type                                      | The media type of the resource                                          | image/jpeg                                                          |
| Date                                              | The date and time at which the message was originated                   | Wed, 28 Dec 2022 17:05:16 GMT                                       |
| local-address                                     | HTTP response header: local-address                                     | 190.195.70.130                                                      |
| pjsc-backend-id                                   | HTTP response header: pjsc-backend-id                                   | 1-05np                                                              |
| pjsc-billing-bytes                                | HTTP response header: pjsc-billing-bytes                                | 257,914                                                             |
| pjsc-billing-credit-cost                          | HTTP response header: pjsc-billing-credit-cost                          | 0.000151384                                                         |
| pjsc-billing-daily-subscription-credits-remaining | HTTP response header: pjsc-billing-daily-subscription-credits-remaining | 0.047495298                                                         |
| pjsc-billing-elapsedms                            | HTTP response header: pjsc-billing-elapsedms                            | 1754                                                                |
| pjsc-billing-prepaid-credits-remaining            | HTTP response header: pjsc-billing-prepaid-credits-remaining            | 0.001                                                               |
| pjsc-billing-proxy-ingress-bytes                  | HTTP response header: pjsc-billing-proxy-ingress-bytes                  | 0                                                                   |
| pjsc-billing-proxy-ingress-cost                   | HTTP response header: pjsc-billing-proxy-ingress-cost                   | 0                                                                   |
| pjsc-billing-total-credits-remaining              | HTTP response header: pjsc-billing-total-credits-remaining              | 0.048495298                                                         |
| pjsc-content-done-detail                          | HTTP response header: pjsc-content-done-detail                          | \{"reason":"match.doneWhen:\{"event":"domReady"}","statusCode":200} |
| pjsc-content-event-phase                          | HTTP response header: pjsc-content-event-phase                          | "load"                                                              |
| pjsc-content-name                                 | HTTP response header: pjsc-content-name                                 | www-google-com.jpeg                                                 |
| pjsc-content-page-exec-last-waited-on             | HTTP response header: pjsc-content-page-exec-last-waited-on             | waitInterval(1000) not yet met.  still need to wait 43              |
| pjsc-content-resource-aborted                     | HTTP response header: pjsc-content-resource-aborted                     | 0                                                                   |
| pjsc-content-resource-active                      | HTTP response header: pjsc-content-resource-active                      | 0                                                                   |
| pjsc-content-resource-complete                    | HTTP response header: pjsc-content-resource-complete                    | 12                                                                  |
| pjsc-content-resource-failed                      | HTTP response header: pjsc-content-resource-failed                      | 0                                                                   |
| pjsc-content-resource-late                        | HTTP response header: pjsc-content-resource-late                        | 0                                                                   |
| pjsc-content-status-code                          | HTTP response header: pjsc-content-status-code                          | 200                                                                 |
| pjsc-content-url                                  | HTTP response header: pjsc-content-url                                  | [http://www.google.com/](http://www.google.com/)                    |
| Transfer-Encoding                                 | HTTP response header: Transfer-Encoding                                 | chunked                                                             |
| vary                                              | HTTP response header: vary                                              | origin,accept-encoding                                              |
| Via                                               | HTTP response header: Via                                               | 1.1 google                                                          |
