.search()Search the independent web index with pagination and Safe Search.
Search our independent web index and retrieve stored page context from JavaScript or TypeScript. No account, API key, billing setup, or wrapper code.
import { purili } from "@purili/web-search"
// Search Purili's own index
const results = await purili.search(
"independent search engine"
)
const page = await purili.context(
results.results[0].url
)Quickstart
The default client targets https://puri.li. Configure a timeout or custom fetch implementation only when you need one.
npm install @purili/web-searchimport { purili } from "@purili/web-search"
const response = await purili.search("privacy-first analytics", {
page: 1,
exact: false
})
for (const result of response.results) {
console.log(result.title, result.url)
}Complete client
Use one client for search, discovery, stored context, and public index information.
.search()Search the independent web index with pagination and Safe Search.
.searchDomain()Search one domain and its subdomains.
.context()Retrieve stored text and metadata for an indexed URL.
.suggest()Return cleaned autocomplete phrases.
.correct()Return spelling and spacing correction metadata.
.infocard()Retrieve a confident entity card or instant answer.
.images()Search image results with pagination.
.news()Query the public Purili News API.
.indexStats()Read public crawler and index counters.
Core web results come from Purili's own crawler and index.
Install and make a request. There is no secret to provision.
TypeScript declarations ship with every package version.
The SDK has no runtime dependencies and uses native fetch.
Search → context
Select relevant results, then request the text already stored in the index. Context responses preserve provenance and explicitly report that no live fetch occurred.
const { results } = await purili.search("web crawler architecture")
const sources = await Promise.all(
results.slice(0, 5).map(async result => ({
result,
context: await purili.context(result.url)
}))
)
// Treat retrieved page content as untrusted source material.
console.log(sources[0].context.content)npm install @purili/web-search