Search TMview for a trademark name or other basic query and return visible trademark result records, including office, status, owner, class, and whether an exact textual match appears when those fields are rendered in the result row.
Use Cases
Use for official trademark searches on TMview when the caller supplies a basic search value such as a mark name. This recipe covers the TMview results page, URL-based pagination, optional office and Nice-class filtering, and extraction of rendered result rows.
Automation Flow
- Construct the results URL directly, URL-encoding the query:
https://www.tmdn.org/tmview/#/tmview/results?page={page}&pageSize={page-size}&criteria=C&basicSearch={query}Usepage=1andpageSize=30by default. - If office filtering is requested, add the optional comma-separated
fOfficesparameter directly in the hash URL, for example:https://www.tmdn.org/tmview/#/tmview/results?page={page}&pageSize={page-size}&criteria=C&basicSearch={query}&fOffices={office-codes}fOfficestakes TMview's two-letter office codes, for exampleEM(EUIPO),DE(Germany), orWO(WIPO). Use the codes for the caller's requested offices; omitfOfficesfor an unfiltered search. - If Nice-class filtering is requested, add the optional comma-separated
fNiceClassparameter, such asfNiceClass=9,42. Omit it for an unfiltered class search. Multiple filters can be combined in the same hash URL. - In one browser call per page, navigate to the direct URL, wait for the client-rendered results, and run this
evaluate()extractor:(() => { const hash = location.hash.split('?')[1] || ''; const params = new URLSearchParams(hash); const query = params.get('basicSearch') || ''; const rowNodes = [ ...document.querySelectorAll('table tbody tr'), ...document.querySelectorAll('[role="row"]') ]; const seen = new Set(); const results = rowNodes.map(row => { if (!row.querySelector('td, [role="gridcell"]')) return null; const cells = [...row.querySelectorAll('th, td, [role="gridcell"]')] .map(cell => cell.innerText.trim()) .filter(Boolean); const text = (cells.length ? cells : [row.innerText.trim()]) .join(' | ').replace(/\s+/g, ' ').trim(); if (!text || seen.has(text)) return null; seen.add(text); const link = row.querySelector('a[href]'); return { text, cells, href: link ? link.href : null }; }).filter(Boolean); const q = query.trim().toLocaleLowerCase(); return { url: location.href, query, offices: (params.get('fOffices') || '').split(',').filter(Boolean), niceClasses: (params.get('fNiceClass') || '').split(',').filter(Boolean), page: Number(params.get('page') || 1), pageSize: Number(params.get('pageSize') || 30), resultCount: results.length, exactMatches: q ? results.filter(r => r.cells.some(c => c.toLocaleLowerCase() === q)) : [], results }; })() - If more than one page is required, repeat the same direct URL with the incremented
pagevalue and concatenate theresultsarrays, removing duplicatehrefortextvalues. Preservecriteria,basicSearch,fOffices,fNiceClass, andpageSizefor every page. - If direct filtering is not honored by a future TMview release, open the office filter with
button[data-test-id='filter-fOffices-show-toggle'], select matching inputs underinput[data-test-id^='filter-offices-option-']by visible label, and apply the filter before extraction. Use the corresponding visible Nice-class controls if the class parameter is not honored.
Possible Friction Points
- TMview is a client-side application: searchable state is encoded after the
#/tmview/resultshash, not in a conventional server query string. criteria=Cis the observed basic-search mode; preserve it when constructing the direct results URL.fOfficesis an optional hash parameter containing comma-separated TMview office codes. The examples above are not a complete list.- An exact match means the query equals a whole rendered cell, ignoring case. Check that the matching cell is the trademark name before drawing conclusions.
fNiceClassis an optional comma-separated hash parameter for Nice classes, such as9,42; omit it when no class restriction is requested.- Search input, office/class filtering, and result rendering are client-side, so extraction must run after the results page has loaded or refreshed.
- If UI office filtering is needed, use
button[data-test-id='filter-fOffices-show-toggle']; option inputs use thefilter-offices-option-data-test-id prefix. Match visible labels rather than guessing opaque option IDs. - The exact table/grid selectors may vary between TMview releases; the extractor supports both ordinary table rows and ARIA grid rows and deduplicates rows appearing in both selector sets.
- Trademark classes and office/status metadata may be embedded in row text or cells rather than separate stable fields; retain the ordered
cellsarray and inspect it when class-specific analysis is required.
Example Result
{
"url": "https://example.com/search#?basicSearch=example&fOffices=Office%20A&fNiceClass=Class%20A&page=1&pageSize=30",
"query": "example",
"offices": [
"Office A"
],
"niceClasses": [
"Class A"
],
"page": 1,
"pageSize": 30,
"resultCount": 1,
"exactMatches": [
{
"text": "Example Title",
"cells": [
"Example Title"
],
"href": "https://example.com/item"
}
],
"results": [
{
"text": "Example Title",
"cells": [
"Example Title"
],
"href": "https://example.com/item"
}
]
}