Search the French lexicon for headwords.
Looks up French words in the CNRTL Portail lexical (Trésor de la langue française) like its search box: returns the matching headwords, each with the link to its definition page. Headwords are those that start with the query, up to about 10. The definitions themselves are on the linked page and are not returned.
- Site
- CNRTL Portail lexical, France
- Version
- v1
- Runs, last 7 days
- No reports yet
- sha256
- 7ec71d0b756a…
Run it with your agent
after installing WieldAsk in plain words. Your agent finds this recipe and calls it:
“Search the French lexicon for headwords.”
Read-only: it changes nothing on the site. No login needed.
{ "tool": "run", "arguments": { "recipe_id": "cnrtl.fr/search-articles", "params": { "query": "mélancolie" } } }
Requests
sent from your browser, in order- 1GET/api/opensearch/{{ params.query | urlencode }}The site's OpenSearch suggestions endpoint /api/opensearch/<term>, a read-only GET that returns JSON: [term, [headwords]].
Parameters
from your agentReturns
to your agentWhere it can send
- www.cnrtl.fr
Anything else is blocked by the extension.
Reads from your session
Nothing. Your browser attaches the site's cookies by itself.
Used only in requests to the addresses on the left. Never sent to wield.run or your agent.
Checks
a run passes when- length(output.words) > `0`
- length(output.words[?starts_with(url, 'https://www.cnrtl.fr/definition/')]) == length(output.words)
- length(output.words[?word != `null`]) == length(output.words)
Raw recipe
Served as canonical JSON from /api/v1/recipes/cnrtl.fr/search-articles, so its sha256 matches the ETag and the index.
curl -s https://wield.run/api/v1/recipes/cnrtl.fr/search-articles | shasum -a 256 # 7ec71d0b756adb97013b9fcc0e2e946b7c9e250ee12a38a0071b0457597d1814
{ "description": "Looks up French words in the CNRTL Portail lexical (Trésor de la langue française) like its search box: returns the matching headwords, each with the link to its definition page. Headwords are those that start with the query, up to about 10. The definitions themselves are on the linked page and are not returned.", "effect": "read", "id": "cnrtl.fr/search-articles", "keywords": [ "cnrtl", "portail lexical", "dictionnaire", "définition", "lexique", "français", "mots", "trésor de la langue française", "tlfi", "french dictionary", "french words", "lexicon" ], "output": { "schema": { "properties": { "query": { "type": "string" }, "words": { "items": { "properties": { "exact": { "description": "True when the headword is the query itself", "type": "boolean" }, "url": { "description": "The definition page of this headword on cnrtl.fr", "type": "string" }, "word": { "type": "string" } }, "required": [ "word", "url" ], "type": "object" }, "type": "array" } }, "required": [ "query", "words" ], "type": "object" }, "value": "let $q = params.query in {query: $q, words: (steps.suggest.words || `[]`)[].{word: @, exact: @ == $q, url: join('', ['https://www.cnrtl.fr/definition/', @])}}" }, "params": { "additionalProperties": false, "properties": { "query": { "description": "A French word or the start of one, e.g. 'mélancolie', 'chat', 'liberté'", "maxLength": 100, "minLength": 2, "type": "string" } }, "required": [ "query" ], "type": "object" }, "provenance": { "method": "har", "notes": "The definition page /definition/<word> holds one entry in HTML and has no result list, so the recipe uses the site's OpenSearch suggestions endpoint (linked from /opensearch.xml), which returns the matching headwords as JSON. The definition text is not read.", "recorded_at": "2026-11-08T15:45:00.000Z", "recorded_by": "wield-forge (claude-haiku agent)" }, "requires_login": false, "schema": "https://wield.run/schema/recipe/v1.json", "site": { "country": "FR", "id": "cnrtl.fr", "language": "fr", "name": "CNRTL Portail lexical", "origin": "https://www.cnrtl.fr", "origins": [ "https://www.cnrtl.fr" ] }, "steps": [ { "description": "The site's OpenSearch suggestions endpoint /api/opensearch/<term>, a read-only GET that returns JSON: [term, [headwords]].", "expect": { "content_type": "json", "status": [ 200 ] }, "extract": { "json": { "words": "[1]" } }, "id": "suggest", "parse": "json", "request": { "headers": { "Accept": "application/json" }, "method": "GET", "url": "/api/opensearch/{{ params.query | urlencode }}" } } ], "task": "Search the French lexicon for headwords", "tos": { "notes": "Not reviewed. One search page per call, the same page a visitor loads. The site's terms on automated access were not checked.", "reviewed": false }, "verify": { "checks": [ "length(output.words) > `0`", "length(output.words[?starts_with(url, 'https://www.cnrtl.fr/definition/')]) == length(output.words)", "length(output.words[?word != `null`]) == length(output.words)" ], "example_params": { "query": "mélancolie" }, "max_ms": 8000 }, "version": 1 }