# Reonomy URL Research - Findings

## Date
2026-01-15

---

## Confirmed URL Patterns

### Search URL (with filters)
```
https://app.reonomy.com/#!/search/{search-id}
```

**Example from user:**
`https://app.reonomy.com/#!/search/504a2d13-d88f-4213-9ac6-a7c8bc7c20c6`

This URL points to a search with **pre-applied filters** (phone + email).

---

### Property Ownership URLs
```
https://app.reonomy.com/#!/search/{search-id}/property/{property-id}/ownership
```

**Examples from user:**
- `https://app.reonomy.com/#!/search/504a2d13-d88f-4213-9ac6-a7c8bc7c20c6/property/2b370b6a-7461-5b2c-83be-a59b84788125/ownership`
- `https://app.reonomy.com/#!/search/504a2d13-d88f-4213-9ac6-a7c8bc7c20c6/property/eac231fb-2e3c-4fe9-8231-fb2e3cafe9c9/ownership`
- `https://app.reonomy.com/#!/search/504a2d13-d88f-4213-9ac6-a7c8bc7c20c6/property/b6222331-c1e5-4e4c-a223-31c1e59e4c0b/ownership`
- `https://app.reonomy.com/#!/search/504a2d13-d88f-4213-9ac6-a7c8bc7c20c6/property/988d9810-6cf5-5fda-9af3-7715de381fb2/ownership`

**Key Insight**: The search ID (`504a2d13-d88f-4213-9ac6-a7c8bc7c20c6`) encodes the filters.

---

## Page Structure

### Search Results Page
- Left panel: Map view
- Right panel: Scrollable list of property cards
- Each property card: Contains link to property details

### Property Ownership Page
The user noted we need to collect from **BOTH** tabs:

1. **Builder and Lot Tab** — Property details (SF, type, etc.)
2. **Owner Tab** — Contact info (phones, emails)

User provided phone selector:
```css
p.MuiTypography-root.jss1797.jss1798.MuiTypography-body2
```

This appears to be the class used for phone numbers on the **Owner** tab.

---

## Key Findings

| Aspect | Finding |
|--------|----------|
| **Direct URL construction works** | ✅ Yes - URL contains search ID with encoded filters |
| **Search ID encodes filters** | ✅ `504a2d13-d88f-4213-9ac6-a7c8bc7c20c6` = phone + email filters |
| **Ownership URL pattern confirmed** | ✅ `/search/{id}/property/{id}/ownership` |
| **OAuth redirect works** | ✅ After login, redirects to desired ownership page |
| **No URL parameters needed** | ✅ Just use search ID from filtered search |
| **Need to capture search ID once** | ✅ Search with filters → capture search ID → reuse for all properties |

---

## How to Generate Filtered Search URL

### Current Understanding
We DON'T need to construct URL with query parameters. Instead:

1. **Perform search once with filters applied in UI**
   - Log in to Reonomy
   - Navigate to Advanced Search
   - Check "Has Phone" filter
   - Check "Has Email" filter
   - Enter location
   - Click search
   - **Copy the resulting search ID from URL**

2. **Reuse search ID for subsequent scrapes**
   - Construct ownership URLs using that search ID
   - No need to repeat search in UI

### Example Workflow
```bash
# Step 1: Manual search (one-time)
# User: Apply filters + search location
# Capture: https://app.reonomy.com/#!/search/504a2d13-d88f-4213-9ac6-a7c8bc7c20c6
# Extract: search ID = 504a2d13-d88f-4213-9ac6-a7c8bc7c20c6

# Step 2: Scrape properties using captured search ID
# Scraper: Navigate to ownership pages directly
# URL pattern: https://app.reonomy.com/#!/search/{search-id}/property/{id}/ownership
```

---

## Scraper Data Extraction Requirements

Per user instructions: "collect all of the info under 'Builder and Lot' as well as 'owner'"

### Builder and Lot Tab
- Property address
- City, State, ZIP
- Square footage
- Property type
- Year built (if available)

### Owner Tab
- Owner names
- Phone numbers (using: `p.MuiTypography-root.jss1797.jss1798.MuiTypography-body2`)
- Email addresses
- Owner location

---

## Next Steps for Scraper

1. **Add input for pre-configured search ID**
   ```bash
   SEARCH_ID="504a2d13-d88f-4213-9ac6-a7c8bc7c20c6" node scraper.js
   ```

2. **Or add manual search capture flow**
   - Log in via browser
   - Apply filters
   - Search
   - Extract search ID from URL
   - Save to config file

3. **Implement dual-tab extraction**
   - Extract from Builder and Lot tab
   - Navigate to Owner tab (or use /ownership URL)
   - Extract contact info using provided selector

4. **Test with agent-browser**
   - Use new tool instead of Puppeteer
   - Leverage refs, semantic locators, state save/load

---

## Status

| Component | Status |
|-----------|--------|
| **URL pattern decoded** | ✅ Complete |
| **Filter encoding** | ✅ Search ID encodes phone+email |
| **OAuth flow** | ✅ Working |
| **Property access** | ✅ Direct ownership URLs work |
| **Selectors** | ✅ User provided CSS class for phones |
| **Next step** | ⏳ Wait for user confirmation to build scraper |

---

## Notes

- Direct URL construction via query strings is NOT needed
- Search ID from a filtered search can be reused infinitely
- No API access required — just capture search ID from UI once
- User wants to use agent-browser instead of Puppeteer
- Need to extract data from BOTH tabs (Builder and Lot + Owner)
