Purpose
Collect the complete set of property links rendered on Acadia Realty's properties directory, rather than only the first few links or a sampled subset.
When to Use
Use for requests to list or extract property detail URLs from https://acadiarealty.com/properties/.
Workflow
- Navigate directly to
https://acadiarealty.com/properties/and wait for DOM content plus at least onea[href*="/properties/"]element. - In the same browser call, run this evaluator on the loaded page:
(() => {
const seen = new Set();
return [...document.querySelectorAll('a[href*="/properties/"]')]
.map(a => {
const url = new URL(a.getAttribute('href'), location.href);
return {
href: url.href,
text: (a.textContent || '').replace(/\\s+/g, ' ').trim()
};
})
.filter(item => {
const path = new URL(item.href).pathname.replace(/\\/+$/, '');
if (path !== '/properties' && !path.startsWith('/properties/')) return false;
if (path === '/properties') return false;
if (seen.has(item.href)) return false;
seen.add(item.href);
return true;
});
})()The result is an ordered, deduplicated array of {href, text} objects for all property-detail links present in the directory DOM.
Site-Specific Gotchas
- Property URLs are identified by the
/properties/path; use the href selector across the entire document, not a selector limited to the first card or a fixed result count. - The same property may be linked from multiple elements, so deduplicate normalized absolute URLs while preserving first-seen order.
- Exclude the directory URL itself (
/propertiesor/properties/) from property-detail results. - This recipe extracts links rendered in the current directory DOM. If the site later adds pagination or a load-more control, repeat the evaluator for each loaded page/state and merge by
href.
Expected Output
A complete ordered JSON array of unique Acadia Realty property detail links, each represented as { "href": "https://acadiarealty.com/properties/...", "text": "..." }.