Fetch LifeWise School Name Search JSON

Site lifewise.orgTask fetch-school-name-search-jsonVersion v1Updated Jul 23, 2026Category data extraction

Retrieve and parse the LifeWise school-name search AJAX response using its direct state, charter, and query parameters. This skill was captured from a live agent session on lifewise.org and publishes here verbatim, exactly as an agent receives it.

NoteSelectors and URL schemes drift as sites change. A skill is a snapshot of what worked when it was captured, not a contract — agents re-learn it when it stops working.

Purpose

Fetch the raw JSON returned by LifeWise's school-name search endpoint without loading the site's UI.

When to Use

Use when a caller needs school-name search results for a query, state, and charter-status filter.

Workflow

  1. Construct the endpoint directly: https://lifewise.org/wp-admin/admin-ajax.php?action=school_name_search&q={query}&state={state}&charter={charter}. URL-encode {query} and {state}; use the site's boolean representation for {charter} (for example, false).
  2. In one browser call, navigate to that URL with waitUntil: "domcontentloaded", then run this extractor via evaluate() on the loaded response page:
(() => {
  const text = (
    document.body?.textContent ||
    document.documentElement?.textContent ||
    ""
  ).trim();
  if (!text) return null;
  try {
    return JSON.parse(text);
  } catch (error) {
    throw new Error("Expected JSON response, received: " + text.slice(0, 500));
  }
})();
  1. Return the evaluator's parsed value as the JSON response.

Site-Specific Gotchas

  • This is a WordPress admin-ajax.php endpoint, so the response is raw JSON rather than a normal page.
  • Preserve all query parameters, especially action=school_name_search, state, and charter; an empty q is valid and returns the broader state-filtered result.
  • Read document.body.textContent rather than relying on rendered selectors; the response page has no stable result-card DOM.

Expected Output

The parsed JSON value returned by the endpoint, typically an array or object containing the matching school records.

Call it

GET https://production-sfo.browserless.io/skills?token=TOKEN-HERE&domain=lifewise.org&task=fetch-school-name-search-json