Logo of LexmountLexmount Browser
PlaygroundPricingBlogGet demo
GitHubX (Twitter)
Logo of LexmountLexmount Browser
Logo of Lexmount

Product

  • Cloud Browser API
  • Web Fetch API
  • Get Started
  • Templates

Resources

  • Help Center
  • Blog
  • Documentation
  • Changelog
  • Status

Company

  • About
  • Newsletter
  • Cookie Policy
  • Browser Data Notice

Connect

  • Contact
  • GitHub
  • Discord
  • Privacy Policy
  • Refund Policy
  • Terms of Service
Browser workflow

Search a webpage and extract results

Submit a query on a search page and save the result titles, links, and snippets as JSON. Run a search in a cloud browser and extract result titles, links, and snippets as structured JSON for technical research and result aggregation.

Example · search a webpage and extract the first N results

Integration options

Prerequisite:
Fetch and fully execute the official Lexmount Setup Prompt returned by https://browser.lexmount.com/api/agent-setup/browser-cli.
Continue only after installation, authentication, and environment validation all pass; otherwise stop and report the failure truthfully.

Task:
Use browser-cli only to create one temporary Lexmount Cloud Browser Session, open https://en.wikipedia.org/, search for "browser testing frameworks," and save the first three content-page results as structured JSON in artifacts/search-results.json.

Execution:
1. Locate the main search box, submit the exact query, and wait for the Search results page.
2. Extract the first three results from the main content list. Record each result's unique rank, non-empty title, absolute en.wikipedia.org URL, and optional excerpt. Exclude navigation links, suggestions, account actions, and links outside the main result list.
3. Write the query, requested URL, final URL, and results as valid JSON, then verify that the file exists, is non-empty, and parses successfully.
4. If login or CAPTCHA is unexpectedly required, hand control to the user only through Remote View without reading or recording anything the user enters.
5. Close the Session.

Acceptance:
The JSON must contain exactly three valid results and be available as a clickable file in the final Codex response. If the main task succeeds but cleanup fails, report partial success.

Cleanup:
On success, failure, timeout, or cancellation, close only the Session created by this task. Never close a pre-existing Session.

Return:
Report only the status, final URL, result count, cleanup result, and sanitized error summary, then provide the generated JSON file as the final item. Do not expose API keys, Project IDs, Session IDs, connect URLs, WebSocket URLs, or login credentials.
npx create-lexmount-app --template search-results-to-json --language typescript --cloud global