Purpose
Search Louisiana SOS commercial entities by name or charter number and return the result rows, links, and any entity IDs exposed in the result HTML.
When to Use
Use when the caller has an entity name or charter number but needs the corresponding Louisiana SOS search result structure or opaque entity identifier. The result page is a server-rendered ASP.NET table and requires the site's reCAPTCHA flow before searching.
Workflow
- Navigate directly to
https://coraweb.sos.la.gov/CommercialSearch/CommercialSearch.aspx. - Enter
{entity-query}intoinput#ctl00_cphContent_txtEntityName. - Complete the site's reCAPTCHA v3 challenge, then submit with
button#btnSearch. - Wait for the results page to render, then run this evaluator on the current page. It skips the header row and returns each result's cell text, links, attributes, and conservatively derived identifier candidates:
(() => {
const table = document.querySelector('#ctl00_cphContent_grdSearchResults_EntityNameOrCharterNumber');
if (!table) return {tableFound: false, rows: [], error: 'results table not found'};
const rows = [...table.querySelectorAll('tr')].slice(1).map((row, index) => {
const cells = [...row.querySelectorAll('th,td')].map(cell => cell.innerText.replace(/\s+/g, ' ').trim());
const links = [...row.querySelectorAll('a')].map(a => {
const href = a.getAttribute('href') || '';
const attrs = {};
for (const attr of a.attributes) attrs[attr.name] = attr.value;
const queryMatch = href.match(/[?&](?:id|entityid|entity_id|entityID|charterNumber|charterNo)=([^&#]+)/i);
const pathMatch = href.match(/\/(\d+)(?:[/?#]|$)/);
return {
text: a.innerText.replace(/\s+/g, ' ').trim(),
href,
attributes: attrs,
idCandidate: queryMatch ? decodeURIComponent(queryMatch[1]) : (pathMatch ? pathMatch[1] : null)
};
});
return {index, cells, links, html: row.outerHTML};
});
return {tableFound: true, tableId: table.id, rowCount: rows.length, rows};
})()Site-Specific Gotchas
- This is an ASP.NET Web Forms page; the search is initiated through the form rather than an observed stable GET query URL, so do not guess a direct results URL.
- A reCAPTCHA v3 solve is required before clicking
button#btnSearch; wait for the post-submit results render before extracting. - The durable results-table selector is
#ctl00_cphContent_grdSearchResults_EntityNameOrCharterNumber. - The first table row is treated as the header; result rows begin at
tr:nth-child(2). Preservehrefand all link attributes because the transcript did not expose a confirmed fixed ID parameter or URL pattern. idCandidateis intentionally null when no recognizable ID-bearing query parameter or numeric path segment exists; do not infer an opaque ID from visible text.
Expected Output
Return an object with tableFound, tableId, rowCount, and rows. Each row contains normalized cell text, every link's text and href, all link attributes, a conservative idCandidate, and the raw row HTML for structural inspection.