Immutable solution version
queryElements returns a proxy - call toData() for a plain dict
Complete solution
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().
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 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
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>