{"_id":"@ai2web/nlweb-adapter","_rev":"2-a5ea46d5414196cdd99965f11ed80fc3","name":"@ai2web/nlweb-adapter","dist-tags":{"latest":"0.4.3"},"versions":{"0.4.2":{"name":"@ai2web/nlweb-adapter","version":"0.4.2","keywords":["ai2web","nlweb","ai-agents","agentic-web","mcp","schema-org","search","ai"],"license":"MIT","_id":"@ai2web/nlweb-adapter@0.4.2","maintainers":[{"name":"rolandfarkas","email":"hello@rolandfarkas.com"}],"homepage":"https://ai2web.dev","bugs":{"url":"https://github.com/ai2web-foundation/ai2web-js/issues"},"dist":{"shasum":"45461e6095f9904e4c1d4fba4ad124718caa1e30","tarball":"https://registry.npmjs.org/@ai2web/nlweb-adapter/-/nlweb-adapter-0.4.2.tgz","fileCount":6,"integrity":"sha512-GAty63sFwUDp7GqseqHRsMgpOlciJK72yz6fDoDBJ3ZzVJErGjMHi/Zk4vQIPUSdIqYCjPcQhQ9s6huB6i3leg==","signatures":[{"sig":"MEYCIQCZ/zJLWECcKJTbYav0zfh92LWWce0tdhT8FBj6ut9tiAIhAOkutzCY7K/aHiw/iH4UN8DTLk09zpZSj2OQeNo789eM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ai2web%2fnlweb-adapter@0.4.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":9249},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"4c29f3cb1e3535ecb51eb26692560830374fd730","scripts":{"build":"tsc --build"},"_npmUser":{"name":"rolandfarkas","email":"hello@rolandfarkas.com"},"repository":{"url":"git+https://github.com/ai2web-foundation/ai2web-js.git","type":"git","directory":"packages/nlweb-adapter"},"_npmVersion":"10.9.8","description":"Query an AI2Web site's advertised NLWeb endpoint through the shared guarded executor.","directories":{},"_nodeVersion":"22.23.1","dependencies":{"@ai2web/core":"0.4.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nlweb-adapter_0.4.2_1784676024722_0.28982341865950345","host":"s3://npm-registry-packages-npm-production"}},"0.4.3":{"name":"@ai2web/nlweb-adapter","version":"0.4.3","keywords":["ai2web","nlweb","ai-agents","agentic-web","mcp","schema-org","search","ai"],"description":"Query an AI2Web site's advertised NLWeb endpoint through the shared guarded executor.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/ai2web-foundation/ai2web-js.git","directory":"packages/nlweb-adapter"},"homepage":"https://ai2web.dev","bugs":{"url":"https://github.com/ai2web-foundation/ai2web-js/issues"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"dependencies":{"@ai2web/core":"0.4.3"},"scripts":{"build":"tsc --build"},"_id":"@ai2web/nlweb-adapter@0.4.3","gitHead":"da42ca8a8b084d617748270b2c755618428c91fb","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-4+jpcLAx32q2KdB0YXzojCkC4VzNx61xh15jpxObcQ/ckXFPz5eNM+nHkFVymReBgrGcJKQpJM75YdQHvAeVVA==","shasum":"621c240dbd94b191000cb6bd46c0ea4a9557a493","tarball":"https://registry.npmjs.org/@ai2web/nlweb-adapter/-/nlweb-adapter-0.4.3.tgz","fileCount":6,"unpackedSize":9249,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ai2web%2fnlweb-adapter@0.4.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICvtJD0Lzt8AuYsjquY4/PDe3CZYzz0oF3/SuQsvzwiTAiEAhtInZAVnHSnu2clUxx+yZC/Ageop5F5M9mQocyDb4ik="}]},"_npmUser":{"name":"rolandfarkas","email":"hello@rolandfarkas.com"},"directories":{},"maintainers":[{"name":"rolandfarkas","email":"hello@rolandfarkas.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nlweb-adapter_0.4.3_1784847168803_0.5877188991417808"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-21T23:20:24.570Z","modified":"2026-07-23T22:52:49.257Z","0.4.2":"2026-07-21T23:20:24.895Z","0.4.3":"2026-07-23T22:52:48.950Z"},"bugs":{"url":"https://github.com/ai2web-foundation/ai2web-js/issues"},"license":"MIT","homepage":"https://ai2web.dev","keywords":["ai2web","nlweb","ai-agents","agentic-web","mcp","schema-org","search","ai"],"repository":{"type":"git","url":"git+https://github.com/ai2web-foundation/ai2web-js.git","directory":"packages/nlweb-adapter"},"description":"Query an AI2Web site's advertised NLWeb endpoint through the shared guarded executor.","maintainers":[{"name":"rolandfarkas","email":"hello@rolandfarkas.com"}],"readme":"# @ai2web/nlweb-adapter\n\nQuery an [AI2Web](https://ai2web.dev) site's advertised **NLWeb** ([nlweb.ai](https://nlweb.ai)) endpoint. NLWeb turns a site's content into a natural-language, schema.org-flavoured query API (its `ask` endpoint) and exposes itself over MCP. This adapter presents that `ask` query and routes it through the shared guarded executor in `@ai2web/core`, so the target is SSRF-checked and credentials stay same-origin - identically to the ACP, AP2 and MCP adapters.\n\nAI2Web does not define NLWeb; a site that runs (or projects) NLWeb advertises it under `transports.nlweb`, and this adapter lets an agent use it.\n\n## Install\n\n```bash\nnpm install @ai2web/nlweb-adapter @ai2web/core\n```\n\n## Use\n\n```js\nimport { manifestToNlweb, askNlweb } from \"@ai2web/nlweb-adapter\";\nimport { discover } from \"@ai2web/core\";\n\nconst { manifest } = await discover(\"https://some-ai2web-site.com\");\n\n// Present the NLWeb query (only if the site advertises transports.nlweb)\nconst adapter = manifestToNlweb(manifest);\n\n// Ask the site's NLWeb endpoint a natural-language question\nconst results = await askNlweb(manifest, { query: \"red running shoes under $120\", mode: \"list\" });\n```\n\n`transports.nlweb` is an AI2Web convention that points at the site's `/ask` (and optional `/mcp`) URLs, since NLWeb itself defines no discovery file.\n\nPart of [AI2Web](https://github.com/ai2web-foundation).\n","readmeFilename":"README.md"}