linkoi docsWebsite ↗

Getting started

Make your first extraction.

Developer preview

Version 0.1.1 is available on npm. Install @linkoi/core to use the extraction library, or add @linkoi/worker for Cloudflare deployment.

Requirements#

Use Node.js 22 or newer and install the package in your application.

sh
npm install @linkoi/core@0.1.1

Extract a URL#

Create example.mjs in your application, then run it with node example.mjs.

ts
import { resolve } from '@linkoi/core'

const page = await resolve('https://example.com', {
  timeoutMs: 5000,
  maxBytes: 2_097_152,
})

console.log(page.title ?? page.url)

Use HTML you already have#

ts
import { fromHtml } from '@linkoi/core'

const page = await fromHtml(
  '<title>A small discovery</title>',
  'https://example.com',
  { fallback: false }
)

console.log(page.title)

Supplied HTML is always parsed without network activity.

Use a local package#

For contributors with repository access, build tarballs to test local changes before a release.

sh
npm run pack:local
# In your application, use the path to the generated archive:
npm install /path/to/linkoi/artifacts/linkoi-core-0.1.1.tgz
Linkoi · PolyForm Shield 1.0.0