Catalog npm
Back to packageRELEASE DETAILS

0.1.1

npm

4get-sdk

Fully typed TypeScript SDK for the 4get search engine API

4getscrapersdksearchtypescript
Published12 Aug 2026
Direct dependencies1
Transitive dependenciesNot calculated

README

Current package documentation

4get SDK

Fully typed TypeScript SDK for the 4get search engine API. Zero runtime dependencies — uses native fetch.

Install

npm install 4get-sdk

Requires Node 18+ (or any runtime with fetch).

Usage

import { FgetClient } from "4get-sdk";

const client = new FgetClient("https://4get.ca");

const results = await client.web({ s: "higurashi", extendedsearch: true });
for (const hit of results.web) {
  console.log(hit.title, hit.url);
}

// Next page — npt alone suffices, do not resend `s`
const page2 = await client.web({ npt: results.npt! });

const pics = await client.images({ s: "higurashi", nsfw: "no" });
const clips = await client.videos({ s: "higurashi", sort: "upload_date" });
const headlines = await client.news({ s: "higurashi" });
const tunes = await client.music({ s: "higurashi", type: "track" });
const suggestions = await client.autocomplete("higurashi");

const meta = await client.ami4get(); // instance info, version, instance list

Pass tokens

Instances with bot protection require a pass cookie (from solving the captcha):

const client = new FgetClient("https://4get.ca", "your-token");

URL helpers

client.favicon("https://lolcat.ca");                        // /favicon?s=...
client.proxy("https://example.com/pic.png", "square");      // /proxy?i=...&s=square
client.audioUrl("sc", "https://api-v2.soundcloud.com/..."); // /audio/sc?s=...

For audio proxying, honor SongResult.stream.endpoint: "linear" (or null) means a plain HTTP stream; anything else must be proxied via audioUrl.

API

All search responses are typed (WebResponse, ImagesResponse, VideosResponse, NewsResponse, MusicResponse). Every response carries status (throws FgetError unless "ok") and npt (pagination token, null when no more pages). Most fields can be null — the types reflect that.

Test

npm test   # runs against $FGET_INSTANCE (default http://localhost:8888)

Terms of use

Respect the 4get API terms — cache responses, don't scrape intensively, and don't use it for SERP SEO.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.5.4development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "987339e5ceb7f3d9a7f00c3083f984839d8d11d6",
  "tarball": "https://registry.npmjs.org/4get-sdk/-/4get-sdk-0.1.1.tgz",
  "fileCount": 6,
  "integrity": "sha512-FGiSPbnE/1/icAO9jMtufOrd0mWWIMYQKxgPbny4hHcCK6oEhqQe8JG07c5kOzjdheJh+G3l8WYvYIHoy/wpKg==",
  "signatures": [
    {
      "sig": "MEUCIQDAdfiPwbaMvq65KVjpbRidfQ/RZ+kuRn/oYxscWo8r+gIgNL6aT+0hZPgd9G4yOv1ybbtpRz+Q7ZCxSV4Ue6wh/lw=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 13672
}

Repository

PENDING
mirere-ts/4get-sdk

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:09 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:773a4e5f8f4ef6679e944e9bca9f109a1ca190ab0b2e54d7dc4031c500aa7ebb

Other collected versions

0.2.113 Aug0.2.012 Aug0.1.010 AugView all collected versions →