Scrapeless API
Dashboard
Dashboard
  1. Web Unlocker
  • User
    • Get User Info
      GET
  • Scraping Browser
    • CDP API
    • Connect
      WSS
    • Running sessions
      GET
    • Live URL
      GET
  • Scraper API
    • shopee
      • Actor List
      • Shopee Product
      • Shopee Search
      • Shopee Rcmd
    • br sites
      • Solucoes cnpjreva
      • Solucoes certidaointernet
      • Servicos receita
      • Consopt
    • avnet
      • Product detail
    • arrow
      • Product Search
    • airline
      • iberia
        • Iberia
      • expedia
        • Expedia
      • kayak
        • Kayak
    • amazon
      • API Parameters
      • product
      • seller
      • keywords
    • temu
      • Temu
    • google search
      • API Parameters
      • Google Search
      • Google Images
      • Google Local
    • google trends
      • API Parameters
      • AutoComplete
      • Interest Over Time
      • Compared Breakdown By Region
      • Interest By Subregion
      • Related Queries
      • Related Topics
      • Trending Now
    • google flights
      • API Parameters
      • Round trip
      • One way
      • Multi-city
    • google flights chart
      • API Parameters
      • chart
    • google maps
      • API Parameters(Google Maps)
      • API Parameters(Google Maps Autocomplete)
      • API Parameters(Google Maps Contributor Reviews)
      • API Parameters(Google Maps Directions)
      • API Parameters(Google Maps Reviews)
      • Google Maps
      • Google Maps Autocomplete
      • Google Maps Contributor Reviews
      • Google Maps Directions
      • Google Maps Reviews
    • google scholar
      • API Parameters(Google Scholar)
      • API Parameters(Google Scholar Author)
      • API Parameters(Google Scholar Cite)
      • API Parameters(Google Scholar Profiles)
      • Google Scholar
      • Google Scholar Author
      • Google Scholar Cite
      • Google Scholar Profiles
    • google jobs
      • API Parameters
      • Google Jobs
    • google shopping
      • API Parameters
      • Google Shopping
    • google hotels
      • API Parameters
      • Supported Google Vacation Rentals Property Types
      • Supported Google Hotels Property Types
      • Supported Google Vacation Rentals Amenities
      • Supported Google Hotels Amenities
      • Google Hotels
    • google news
      • API Parameters
      • Google News
    • google lens
      • API Parameters
      • Google Lens
    • google finance
      • API Parameters
      • Google Finance
      • Google Finance Markets
    • google product
      • API Parameters
      • Google Product
    • google play store
      • API Parameters
      • Supported Google Play Categories
      • Google Play Games
      • Google Play Books
      • Google Play Movies
      • Google Play Product
      • Google Play Apps
    • google ads
      • API Parameters
      • Google Ads
    • mouser
      • mouser
    • Scraper Request
      POST
    • Scraper Getresult
      GET
  • Web Unlocker
    • JS Render Docs
    • JS Render
      POST
    • Web Unlocker
      POST
    • Akamaiweb Cookie
      POST
    • Akamaiweb Sensor
      POST
  • Public
    • actor status
    • actor status
  1. Web Unlocker

JS Render Docs

Web Unlocker is a powerful web content retrieval service that supports complex web page rendering and interaction scenarios.

Basic Request Structure#

{
  "actor": "unlocker.webunlocker",
  "input": {
    "url": "https://example.com",
    "js_render": false,
    "headless": false
  },
  "proxy": {
    "country": "US"
  }
}

Core Features#

JavaScript Rendering#

JavaScript rendering enables handling of dynamically loaded content and SPAs (Single Page Applications). Enables a complete browser environment, supporting more complex page interactions and rendering requirements.
js_render=true,we will use the browser to request.
{
  "actor": "unlocker.webunlocker",
  "input": {
    "url": "https://www.google.com/",
    "js_render": true
  },
  "proxy": {
    "country": "US"
  }
}

JavaScript Instructions#

Provides an extensive set of JavaScript directives that allow you to dynamically interact with web pages.
These directives enable you to click elements, fill out forms, submit forms, or wait for specific elements to appear, providing flexibility for tasks such as clicking a "read more" button or submitting a form.
{
  "actor": "unlocker.webunlocker",
  "input": {
    "url": "https://example.com",
    "js_render": true,
    "js_instructions": [
      {
        "wait_for": [
          ".dynamic-content",
          30000
        ]
        // Wait for element
      },
      {
        "click": [
          "#load-more",
          1000
        ]
        // Click element
      },
      {
        "fill": [
          "#search-input",
          "search term"
        ]
        // Fill form
      },
      {
        "keyboard": [
          "press",
          "Enter"
        ]
        // Simulate key press
      },
      {
        "evaluate": "window.scrollTo(0, document.body.scrollHeight)"
        // Execute custom JS
      }
    ]
  }
}
Here are some common actions you can perform with JavaScript Instructions:
JavaScript Instructions Reference:
InstructionSyntaxDescriptionExample
wait_for[selector, timeout]Wait for element to appear{"wait_for": [".content", 30000]}
click[selector, delay]Click element{"click": [".button", 1000]}
fill[selector, value]Fill form{"fill": ["#input", "text"]}
waitmillisecondsFixed wait time{"wait": 2000}
evaluatejavascript_codeExecute JS code{"evaluate": "console.log('test')"}
keyboard[action, value, delay?]Keyboard operationSee keyboard operations table below
Keyboard Operations:
OperationSyntaxDescriptionExample
Press key["press", keyInput]Press a specific keyInput{"keyboard": ["press", "Enter"]}
Type text["type", text, delay?]Type text with optional delay{"keyboard": ["type", "Hello", 20]}
Key down["down", key]Hold down a key{"keyboard": ["down", "Shift"]}
Key up["up", key]Release a key{"keyboard": ["up", "Shift"]}
Supported Special KeyInput types:
https://pptr.dev/api/puppeteer.keyinput

Resource Control#

Resource loading control system for optimizing performance and bandwidth usage.
{
  "actor": "unlocker.webunlocker",
  "input": {
    "url": "https://example.com",
    "js_render": true,
    "block": {
      "resources": [
        "Image",
        "Font",
        "Stylesheet",
        "Script"
      ],
      "urls": [
        // Optional, URL pattern-based blocking
        "*.analytics.com/*",
        "*/ads/*"
      ]
    }
  }
}
Complete Resource Types Reference:
Resource TypeDescriptionImpact
DocumentMain document and iframesCore page content
StylesheetCSS filesPage styling and layout
ImageImages and iconsVisual content
MediaAudio and video resourcesMultimedia content
FontWeb fontsText rendering
ScriptJavaScript filesPage functionality
TextTrackVideo subtitles and captionsMedia accessibility
XHRXMLHttpRequest callsLegacy async requests
FetchFetch API requestsModern async requests
PrefetchPrefetched resourcesPerformance optimization
EventSourceServer-sent eventsReal-time updates
WebSocketWebSocket connectionsBidirectional communication
ManifestWeb app manifestsPWA configuration
SignedExchangeSigned HTTP exchangesContent authenticity
PingPing requestsAnalytics and tracking
CSPViolationReportCSP violation reportsSecurity monitoring
PreflightCORS preflight requestsCross-origin security
OtherUnclassified resourcesMiscellaneous
Usage Example:
{
  "actor": "unlocker.webunlocker",
  "input": {
    "url": "https://example.com",
    "js_render": true,
    "block": {
      "resources": [
        "Image",
        "Font",
        "Stylesheet",
        "Script",
        "Media",
        "Ping",
        "Prefetch"
      ]
    }
  }
}
Best Practices for Resource Blocking:
1.
Performance Optimization
Enable js_render only when necessary
Use resource blocking wisely, Block non-essential resources for faster loading
Consider blocking Prefetch and Ping for reduced network usage
Keep Document and critical Script resources unblocked
2.
Bandwidth Management
Block Image and Media for bandwidth-intensive pages
Consider blocking Font to use system fonts instead
3.
Stability Enhancement
Implement request retry mechanisms
Add error handling logic
Use wait_for instead of fixed wait
4.
Resource Efficiency
Load resources on demand
Close unnecessary connections promptly
Note: Resource type strings are case-sensitive. Use exact matches as shown in the reference table.
Modified at 2025-01-07 10:51:01
Previous
Scraper Getresult
Next
JS Render
Built with