Action that retrieves and processes web content in various formats Supports JSON, PDF, DOCX, XML, CSV, HTML and more - similar to Claude's web reading capabilities

Example

// Get JSON API response
await runAction({
ActionName: 'Web Page Content',
Params: [{
Name: 'URL',
Value: 'https://api.example.com/data'
}, {
Name: 'ContentType',
Value: 'json'
}]
});

// Get PDF content as text
await runAction({
ActionName: 'Web Page Content',
Params: [{
Name: 'URL',
Value: 'https://example.com/document.pdf'
}, {
Name: 'ContentType',
Value: 'text'
}]
});

// Get DOCX content as markdown
await runAction({
ActionName: 'Web Page Content',
Params: [{
Name: 'URL',
Value: 'https://example.com/document.docx'
}, {
Name: 'ContentType',
Value: 'markdown'
}]
});

Hierarchy (view full)

Constructors

Properties

MAX_CONTENT_SIZE: number = ...
MAX_IMAGE_SIZE: number = ...
turndown: TurndownService

Methods

  • Executes web content retrieval and processing

    Parameters

    • params: RunActionParams<any>

      The action parameters containing:

      • URL: Web resource URL to fetch (required)
      • ContentType: Output format - 'auto', 'text', 'html', 'markdown', 'json' (default: 'auto')
      • ExtractMainContent: Extract only main content vs full page (default: false)
      • IncludeMetadata: Include resource metadata in response (default: true)
      • MaxContentLength: Maximum content length to return (default: 100000 chars)

    Returns Promise<ActionResultSimple>

    Processed content in the specified format

  • Executes the action with the provided parameters.

    Parameters

    • params: RunActionParams<any>

      The action execution parameters including context

    Returns Promise<ActionResultSimple>

    Promise resolving to the action result

  • Process DOCX content

    Parameters

    • response: Response
    • outputType: string
    • includeMetadata: boolean
    • maxLength: number

    Returns Promise<Record<string, unknown>>

  • Process HTML content

    Parameters

    • response: Response
    • outputType: string
    • extractMain: boolean
    • includeMetadata: boolean
    • maxLength: number

    Returns Promise<Record<string, unknown>>

  • Process PDF content

    Parameters

    • response: Response
    • outputType: string
    • includeMetadata: boolean
    • maxLength: number

    Returns Promise<Record<string, unknown>>

  • Processes response based on detected content type

    Parameters

    • response: Response
    • detectedType: string
    • requestedType: string
    • extractMain: boolean
    • includeMetadata: boolean
    • maxLength: number

    Returns Promise<Record<string, unknown>>