For AI agents: a documentation index is available at /llms.txt
Skip to main content

text

Returns the text content on the given page or by selector when specified

**Usage Example:**

mutation GetText {
goto(url: "https://example.com") {
status
}

selector: text(selector: "h1") {
text
}

fullPage: text {
text
}
}

**Field Definition:**

text(
timeout: Float
selector: String = "html"
visible: Boolean = false
clean: CleanInput
): TextResponse

Arguments​

text.timeout ● Float scalar​

The maximum amount of time, in milliseconds, to wait for the selector to appear, overriding any defaults. Default timeout is 30 seconds, or 30000.

text.selector ● String scalar​

The DOM selector of the given element you want to return the text of

text.visible ● Boolean scalar​

Whether or not to return the text content of the element only if it's visible

text.clean ● CleanInput input​

Specifies conditions for "cleaning" the returned text, useful for minimizing the amount of markup returned for cases like LLMs and more. See nested options for parameters.

Type​

TextResponse object​

Text content of a page

Was this page helpful?