NotexAI
  • Quickstart
  • Python SDK
  • Authentication
  • Examples
    • Navigation
    • Scraping Flow
  • Browser Sessions
    • Session Management
    • Start Session
    • Close Session
    • Health
  • Browser Navigation
    • Observe Page
    • Step In Page
    • Scrape Data
Powered by GitBook
On this page
  • Endpoint
  • Parameters
  • Response
  • Error Responses
  • Authorizations
  • Body
  • Example Request
  • Example Response
  1. Browser Navigation

Step In Page

This endpoint executes an action in an active browser session and observes the resulting state.


Endpoint

POST /env/step


Parameters

Query Parameters

  • session_id (required):

    • Type: string

    • Description: The session ID of the active browser session.

  • action_id (required):

    • Type: string

    • Description: The ID of the action to execute within the environment.

  • value (optional):

    • Type: string

    • Description: Input or parameters for the action being executed.

  • enter (optional):

    • Type: boolean

    • Description: Specify whether to confirm the action (e.g., pressing Enter). Default is false.


Response

Response Parameters

  • session_id (required):

    • Type: string

    • Description: The unique identifier for the session where the action was executed.

  • title (required):

    • Type: string

    • Description: The title of the resulting page after executing the action.

  • url (required):

    • Type: string

    • Description: The URL of the resulting page after executing the action.

  • timestamp (required):

    • Type: string

    • Description: The timestamp when the action was executed, in ISO 8601 format.

  • screenshot (optional):

    • Type: string (base64)

    • Description: A base64-encoded screenshot of the resulting page, if available.

  • data (optional):

    • Type: string

    • Description: Data retrieved from the resulting page after the action.

  • space (optional):

    • Type: object

    • Description: Available action space after execution, including descriptions and categories.


Error Responses

  • 400 (Invalid Request):

    • Description: Returned when the input parameters are not valid or a required parameter is missing.

  • 500 (Internal Server Error):

    • Description: Returned when the server encounters an unexpected condition.


Authorizations

  • Authorization (required):

    • Type: string

    • Location: Header

    • Description: The access token received from the authorization server in the OAuth 2.0 flow.


Body

Content Type: application/json

  • action_id:

    • Type: string

    • Description: The ID of the action to execute.

  • enter:

    • Type: boolean

    • Description: Whether to press Enter after inputting the value.

  • keep_alive:

    • Type: boolean

    • Default: false

    • Description: If true, the session will not be closed after the operation is completed.

  • max_nb_actions:

    • Type: integer

    • Default: 100

    • Description: The maximum number of actions to list after which the listing will stop. Used when min_nb_actions is not provided.

  • min_nb_actions:

    • Type: integer | null

    • Description: The minimum number of actions to list before stopping. If not provided, the listing continues until max_nb_actions is reached.

  • screenshot:

    • Type: boolean | null

    • Description: Whether to include a screenshot in the response.

  • session_id:

    • Type: string | null

    • Description: The ID of the session. A new session is created if not provided.

  • session_timeout_minutes:

    • Type: integer

    • Default: 5

    • Description: Session timeout in minutes. Cannot exceed the global timeout.

  • value:

    • Type: string | null

    • Description: Input value for form actions.


Example Request

curl --location \
--request POST 'https://api.notexai.pro/env/step' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your-api-key' \
--data '{
    "session_id": "abcd1234-5678-90ef-ghij-klmnopqrstuv",
    "action_id": "navigate",
    "value": "https://example.com",
    "keep_alive": true
}'

Example Response

200 - application/json

{
    "session_id": "abcd1234-5678-90ef-ghij-klmnopqrstuv",
    "title": "Example Page Title",
    "url": "https://example.com",
    "timestamp": "2025-01-24T15:00:00Z",
    "screenshot": "...base64-encoded-data...",
    "data": "...retrieved data...",
    "space": {
        "description": "This page allows users to perform an action.",
        "actions": [
            {
                "id": "action1",
                "description": "Submit a form.",
                "category": "form"
            }
        ]
    }
}
PreviousObserve PageNextScrape Data

Last updated 4 months ago