NPM · PUBLICTYPESCRIPT0 DEPENDENCIES

Purili search, typed and ready to use.

Search our independent web index and retrieve stored page context from JavaScript or TypeScript. No account, API key, billing setup, or wrapper code.

No API keyNode.js 18+Built-in typesAbortSignal support
search.ts@purili/web-search
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

Install, import, search.

The default client targets https://puri.li. Configure a timeout or custom fetch implementation only when you need one.

Terminal
npm install @purili/web-search
TypeScript
import { 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

Nine focused methods.

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.

Independent index

Core web results come from Purili's own crawler and index.

No credentials

Install and make a request. There is no secret to provision.

Typed responses

TypeScript declarations ship with every package version.

Small footprint

The SDK has no runtime dependencies and uses native fetch.

Search → context

A clean retrieval loop.

Select relevant results, then request the text already stored in the index. Context responses preserve provenance and explicitly report that no live fetch occurred.

TypeScript · RAG retrieval
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)

Add web search in one install.

npm install @purili/web-search

API reference