> ## Documentation Index
> Fetch the complete documentation index at: https://docs.surfsky.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrape page

> Navigate an existing browser and return rendered HTML, cookies, and an optional PNG screenshot. Send one request or a sequential batch. Check each batch item and the target website's status. Avoid concurrent CDP work in this browser: the scraper reuses a page and closes extra pages. The gateway waits up to 120 seconds. See [Scraping API](/quickstart/scraping_api).



## OpenAPI

````yaml /api-reference/openapi.json post /profiles/{internal_uuid}/scrape
openapi: 3.1.0
info:
  title: Surfsky API
  version: 0.1.0
  description: >-
    Start cloud browsers, control them through CDP, and manage the profiles,
    proxies, and fingerprints they run with.
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://YOUR_API_HOST
        description: API base URL from your Surfsky dashboard, including https://.
security:
  - ApiToken: []
tags:
  - name: profiles
    description: >-
      Start, stop, and manage browsers. A one-time profile is discarded when it
      stops; a persistent profile keeps its cookies, storage, and fingerprint
      according to its storage settings.
  - name: proxies
    description: >-
      Look up what the premium and shared pools can offer before you pin a
      location, and read your traffic quota.
  - name: fingerprints
    description: >-
      The value sets a fingerprint field accepts. Use these to pin a renderer,
      screen, or device model instead of guessing at a string.
  - name: extensions
    description: Upload Chrome extensions once and load them into any browser you start.
  - name: captcha
    description: Balance on the CAPTCHA solver behind your account.
paths:
  /profiles/{internal_uuid}/scrape:
    post:
      tags:
        - profiles
      summary: Scrape page
      description: >-
        Navigate an existing browser and return rendered HTML, cookies, and an
        optional PNG screenshot. Send one request or a sequential batch. Check
        each batch item and the target website's status. Avoid concurrent CDP
        work in this browser: the scraper reuses a page and closes extra pages.
        The gateway waits up to 120 seconds. See [Scraping
        API](/quickstart/scraping_api).
      operationId: profile_scrape_profiles__internal_uuid__scrape_post
      parameters:
        - name: internal_uuid
          in: path
          required: true
          schema:
            type: string
            title: Internal Uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ScrapeRequest'
                - type: array
                  items:
                    $ref: '#/components/schemas/ScrapeRequest'
            examples:
              single:
                summary: One page
                value:
                  url: https://example.com
                  wait_for: h1
              batch:
                summary: Sequential batch
                value:
                  - url: https://example.com
                  - url: https://example.org
                    screenshot: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScrapeResult'
        '401':
          description: Missing or invalid API token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Account or feature access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: Request, browser, session, or traffic limit reached; inspect code
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    ScrapeRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: Page URL to visit.
        screenshot:
          type: boolean
          default: false
        wait:
          type: number
          minimum: 0
          maximum: 60
          default: 0
          description: Extra wait in seconds after navigation.
        wait_until:
          type: string
          enum:
            - domcontentloaded
            - load
            - networkidle
            - commit
          default: domcontentloaded
        wait_for:
          type: string
          description: CSS or XPath selector to wait for after navigation.
        timeout:
          type: integer
          exclusiveMinimum: 0
          default: 30000
          description: Navigation and selector timeout in milliseconds.
        auto_captcha_solve:
          type: boolean
          default: false
          description: Also enable anti_captcha when starting the browser.
        human_actions:
          type: integer
          minimum: 0
          maximum: 3
          default: 0
          description: Number of random browsing actions.
      required:
        - url
    ScrapeResult:
      type: object
      properties:
        success:
          type: boolean
        msg:
          type: string
        data:
          anyOf:
            - $ref: '#/components/schemas/ScrapedPage'
            - type: array
              items:
                anyOf:
                  - $ref: '#/components/schemas/ScrapedPage'
                  - $ref: '#/components/schemas/ScrapeItemError'
      required:
        - success
        - data
    ApiError:
      type: object
      properties:
        success:
          type: boolean
          const: false
        msg:
          type: string
        code:
          type: string
        data: {}
        detail: {}
        error: {}
      description: >-
        Error fields vary for forwarded responses. Check HTTP status and code
        when present.
    ScrapedPage:
      type: object
      properties:
        url:
          type: string
        status:
          type: integer
          description: Target website HTTP status; 0 when navigation has no response.
        status_text:
          type: string
        content:
          type: string
          description: Rendered HTML.
        cookies:
          type: array
          items:
            type: object
            additionalProperties: true
        screenshot:
          type: string
          contentEncoding: base64
          description: PNG data, omitted when not requested or capture fails.
      required:
        - url
        - status
        - status_text
        - content
        - cookies
    ScrapeItemError:
      type: object
      properties:
        url:
          type: string
        error:
          type: string
        status_code:
          type: integer
      required:
        - url
        - error
        - status_code
  securitySchemes:
    ApiToken:
      type: apiKey
      in: header
      name: X-Cloud-Api-Token
      description: API token from your dashboard.

````