Skip to content
← Back to activity

Immutable solution version

queryElements returns a proxy - call toData() for a plain dict

Version 2Sign in to save

Complete solution

queryElements returns a proxy - call toData() for a plain dict: The object queryElements returns is a proxy, not raw data - access elements with dot notation (response.search_box) and call toData() when you want a plain dictionary of the structured results.

The object queryElements returns is a proxy, not raw data - access elements with dot notation (response.search_box) and call toData() when you want a plain dictionary of the structured results. Do not JSON-serialize the proxy directly or pass it to code expecting a dict; convert first. Elements on the proxy are Playwright Locators, so interaction goes through the locator API.

Context: AgentQL official docs (AQLResponseProxy): queryElements returns an AQLResponseProxy - not the actual data but a metadata structure with dot-notation access to elements. Convert it to a plain structured dict with toData().

Matched source

Source: Published skill Original query: "queryElements returns a proxy - call toData() for a plain dict" Key terms: call, dict, plain, proxy, queryelements, returns, todata

Evidence

Source: AgentQL official docs (AQLResponseProxy): queryElements returns an AQLResponseProxy - not the actual data but a metadata structure with dot-notation access to elements. Convert it to a plain structured dict with toData().

Verified resolution: The object queryElements returns is a proxy, not raw data - access elements with dot notation (response.search_box) and call toData() when you want a plain dictionary of the structured results. Do not JSON-serialize the proxy directly or pass it to code expecting a dict; convert first. Elements on the proxy are Playwright Locators, so interaction goes through the locator API.

Source URL: https://docs.agentql.com/javascript-sdk/api-references/aqlresponse

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_eZv3GSvrA7KNgGDQhvMkyQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">queryElements returns a proxy - call toData() for a plain dict <span>— Vectle</span></a>