Find the Bizi.si company profile for a supplied company name or profile URL and extract the official business details useful for issuing an invoice, including the legal name, address, registration identifiers, VAT status, and bank-account information when displayed.
Use Cases
Use when the caller provides a company or organization name but not its Bizi.si profile URL or opaque company identifier. If the caller already provides a Bizi.si profile URL, skip search and navigate directly to that URL.
Automation Flow
- If a Bizi.si profile URL is supplied, navigate directly to it, for example
https://www.bizi.si/{company-slug}/. Otherwise navigate directly tohttps://www.bizi.si/iskanje?q={url-encoded-company-name}. - When searching, resolve the profile URL without guessing an identifier. Prefer the result anchor matching
a[id*="_linkCompany"]; otherwise inspect company-result anchors whosehrefmatches^/[^/?#]+/$. Choose the result whose visible name, after whitespace/case normalization, matches the requested legal name most closely. The observed result control embeds an opaque numeric company identifier (for example, a value in the link-control id), but the identifier should be read from the result rather than fabricated. - If search was used, navigate directly to the resolved absolute profile URL, typically
https://www.bizi.si/{company-slug}/, and run the evaluator below in that page context. For a supplied profile URL, run it immediately after navigation.
Evaluator:
(() => {
const clean = s => (s || '').replace(/\u00a0/g, ' ').replace(/\s+/g, ' ').trim();
const visible = el => !!el && (el.offsetWidth || el.offsetHeight || el.getClientRects().length);
const out = { companyName: '', address: '', postalCode: '', city: '', registrationNumber: '', taxNumber: '', vatStatus: '', bankAccounts: [], labeledData: {}, sourceUrl: location.href };
const bodyText = clean(document.body.innerText);
const h = [...document.querySelectorAll('h1,h2')].find(visible);
out.companyName = clean(h?.textContent) || clean(document.querySelector('meta[property="og:title"]')?.content).replace(/\s*[|–-].*$/, '');
const put = (label, value) => {
label = clean(label).replace(/:$/, ''); value = clean(value);
if (!label || !value || value === label) return;
out.labeledData[label] = value;
const l = label.toLowerCase();
if (/dav(č|c)na|tax/.test(l)) out.taxNumber ||= value;
else if (/mati(č|c)na|registration/.test(l)) out.registrationNumber ||= value;
else if (/naslov|address|sede(ž|z)/.test(l)) out.address ||= value;
else if (/po(š|s)tna|postal/.test(l)) out.postalCode ||= value;
else if (/kraj|mesto|city/.test(l)) out.city ||= value;
else if (/ddv|vat/.test(l)) out.vatStatus ||= value;
};
document.querySelectorAll('table tr').forEach(tr => {
const cells = [...tr.querySelectorAll('th,td')].filter(visible).map(x => clean(x.innerText));
if (cells.length >= 2) put(cells[0], cells.slice(1).join(' | '));
const joined = cells.join(' | ');
if (/TRR|IBAN|ban(č|c)ni ra(č|c)un|account/i.test(joined)) out.bankAccounts.push(joined);
});
document.querySelectorAll('dt').forEach(dt => {
const dd = dt.nextElementSibling;
if (dd && dd.matches('dd')) put(dt.innerText, dd.innerText);
});
document.querySelectorAll('li,p,div').forEach(el => {
if (!visible(el) || el.children.length > 3) return;
const t = clean(el.innerText), m = t.match(/^([^:]{2,60}):\s*(.+)$/);
if (m) put(m[1], m[2]);
});
const accountPattern = /(?:SI\d{17}|HR\d{19}|AT\d{18}|IBAN\s*:?\s*[A-Z]{2}[0-9A-Z ]{10,})/gi;
out.bankAccounts.push(...(bodyText.match(accountPattern) || []));
out.bankAccounts = [...new Set(out.bankAccounts.map(clean).filter(Boolean))];
return out;
})()Possible Friction Points
- Bizi.si uses a separate
/iskanje?q=...search route and company profile slugs such as/{COMPANY-SLUG}/; the profile is reached through an opaque result identifier rather than a predictable identifier supplied by the company name. - When a profile URL is already supplied, use it directly; do not visit the homepage or repeat search.
- Do not construct an opaque company id from the name. Read the selected result’s
href(or its link-control id) and then navigate to that profile. - Search results may include similarly named entities. Match the legal name and, when available, the displayed legal suffix and address before selecting a result.
- The evaluator is intentionally tolerant of Bizi.si table, definition-list, and label/value layouts; verify that the selected profile heading belongs to the requested company. Bank-account rows may be partially hidden or unavailable without appropriate access.
- Treat the extracted values as displayed business information and retain the profile URL as the source for the invoice record. Any invoice amount, service description, or VAT calculation supplied by the caller is an external invoice parameter, not a value to infer from Bizi.si.