Retrieve a certificant record from the public BACB registry using its certification type, two-digit certification year, and sequence number, then verify it against an optional {name} and any other requested fields.
Use Cases
Use for read-only public BACB registry lookups when the caller has a certification number such as {cert-type}-{cert-year}-{cert-seq} and optionally a {name} to verify. No login is required, but the site may require cookie acknowledgement and a Cloudflare challenge.
Automation Flow
- Navigate directly to
https://services.bacb.com/o.php?page=101135. - If the search form is present, select
input#radioCertificationand acknowledge the registry terms withinput[name='ackStatus']. Dismissbutton[aria-label='Close Cookie Compliance']only when that banner is present. - Complete the certification-number form with the caller's values:
select#id-cert_number_type={cert-type}input#id-cert_number_year={cert-year}(the two-digit year)input#id-cert_number_seq={cert-seq}Dispatchinput/changeevents if setting the fields through page JavaScript, because the controls may initially be disabled.
- If Cloudflare presents a challenge, solve it and wait until the form is interactive.
- Submit with
input#btnSubmitand wait for navigation. The result commonly resolves tohttps://services.bacb.com/o.php?page=101135&s=1; do not fabricate or reuse a result URL without submitting the form because the result may depend on server-side state. - On the result page, if the registry table contains a matching result row, click that row (the observed table uses
#registryTable tbody tr.odd) to expand its details. Verify that the returned row contains the requested{name}when a name was supplied. - Run this evaluator after the result row has been expanded. It returns the registry row values and any expanded detail row without contacting another origin:
(() => {
const clean = value => (value || '').replace(/\s+/g, ' ').trim();
const table = document.querySelector('#registryTable');
if (!table) return {url: location.href, title: document.title, dateAccessed: null, records: []};
const headerCells = Array.from(table.querySelectorAll('thead th'));
const fallbackHeaderCells = Array.from(table.querySelectorAll('tbody tr:not(.child):not(.details):first-child td'));
const headers = (headerCells.length ? headerCells : fallbackHeaderCells).map((cell, index) => clean(cell.innerText) || `column_${index + 1}`);
const rows = Array.from(table.querySelectorAll('tbody > tr')).filter(row => !row.classList.contains('child') && !row.classList.contains('details') && !row.querySelector('.dtr-details'));
const records = rows.map(row => {
const cells = Array.from(row.querySelectorAll(':scope > td'));
const values = Object.fromEntries(headers.map((header, index) => [header, clean(cells[index]?.innerText)]));
const next = row.nextElementSibling;
const detailNode = next && (next.classList.contains('child') || next.classList.contains('details') || next.querySelector('.dtr-details')) ? next : row.querySelector('.registry-details, .dtr-details');
return {values, details: detailNode ? clean(detailNode.innerText) : null};
}).filter(record => Object.values(record.values).some(Boolean) || record.details);
const text = document.querySelector('#o_container')?.innerText || document.body.innerText || '';
return {url: location.href, title: document.title, dateAccessed: text.match(/Date Accessed:[^\n]*/i)?.[0] || null, records};
})()Possible Friction Points
- The registry starts at
o.php?page=101135; the submitted result typically adds&s=1. - The certification number is entered as three separate values rather than as one hyphenated string.
- Selecting the certification search option and acknowledging the status/terms are required before submission.
- Cloudflare protection can block the form until a challenge is solved; this is an expected part of the public flow.
- Cookie-compliance controls may obscure the form and should be dismissed only when present.
- Search results use
#registryTable; clicking the matching body row expands additional details in a sibling.child/.detailsrow or a responsive details element. Extract both the visible row cells and that expanded content. - The result page should be checked against the requested name and certification number; do not treat an unrelated row as a match.
- The evaluator reads only same-page registry content and makes no external requests.
Example Result
{
"url": "https://example.com/registry",
"title": "Example Title",
"dateAccessed": null,
"records": [
{
"values": {
"column_1": "Example Value",
"column_2": "Example Value"
},
"details": null
}
]
}