Dependency-free TypeScript client for Scrapiq — the open-source API that turns any URL into clean markdown or structured JSON for LLM/RAG pipelines.
Zero runtime dependencies (uses the global fetch, Node 18+). Ships ESM + TypeScript types.
Not on npm yet, so install from this repo:
npm install github:NG-PR0JECT/scrapiq-nodeThe build runs on install (prepare -> tsc), so dist/ exists by the time your import resolves.
import { Scrapiq } from "scrapiq-node";
const client = new Scrapiq(); // defaults to https://scrapiq.io
// Clean markdown for RAG ingestion
const page = await client.markdown("https://en.wikipedia.org/wiki/Large_language_model");
console.log(page.content); // clean markdown, no nav/boilerplate
// Structured JSON against a schema
const product = await client.extract("https://example.com/products/1", {
format: "json",
schema: {
title: { type: "string" },
price: { type: "number" },
description: { type: "string" },
},
});
console.log(product.data);| Option | Default | Description |
|---|---|---|
baseUrl |
https://scrapiq.io |
API base URL (use your self-hosted instance) |
apiKey |
— | Reserved for future authenticated plans |
timeoutMs |
30000 |
Request timeout |
| Option | Default | Description |
|---|---|---|
format |
"json" |
"json" | "text" | "markdown" |
schema |
— | JSON schema for structured extraction (format="json") |
includeMetadata |
true |
Include page metadata (title, description, author…) |
signal |
— | AbortSignal for cancellation |
Also: client.text(url) and client.markdown(url) convenience wrappers, and client.health().
Errors are thrown as ScrapiqError with status and message from the API.
Point the client at your own instance:
const client = new Scrapiq({ baseUrl: "http://localhost:8001" });docker run -d -p 8001:8001 ghcr.io/ng-pr0ject/scrapiq # see main repo for the imageMIT