{"_id":"4get-sdk","_rev":"4-239d0eb27e5329b770ed9e19aaeaa9e2","name":"4get-sdk","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"4get-sdk","version":"0.1.0","keywords":["4get","search","sdk","typescript","scraper"],"license":"MIT","_id":"4get-sdk@0.1.0","maintainers":[{"name":"mirere-ts","email":"mirere.vrc@gmail.com"}],"dist":{"shasum":"a15a96d708f5f382a6491142a0ecfccc46128d31","tarball":"https://registry.npmjs.org/4get-sdk/-/4get-sdk-0.1.0.tgz","fileCount":6,"integrity":"sha512-1VRZHLHpif/K3wGdORf36RtZO8ksaNIPoMv4zcxeti4e7p4ReRUuXnhjnHb+c+R5BgEepSzm8TB98lf9EWb4Sw==","signatures":[{"sig":"MEYCIQDEBO8OGGiEeh2QZBwnMtiPdg38FtRxriU9J8W/vIh1vwIhAK59RS70Ft278ZnTsn+nx1++qhv+Yfw4vHBG/QvPzVL3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13575},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"node --test test/smoke.test.ts","build":"tsc","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"mirere-ts","email":"mirere.vrc@gmail.com"},"_npmVersion":"11.17.0","description":"Fully typed TypeScript SDK for the 4get search engine API","directories":{},"sideEffects":false,"_nodeVersion":"26.5.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/4get-sdk_0.1.0_1786399523355_0.279052156044872","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"4get-sdk","version":"0.1.1","keywords":["4get","search","sdk","typescript","scraper"],"license":"MIT","_id":"4get-sdk@0.1.1","maintainers":[{"name":"mirere-ts","email":"mirere.vrc@gmail.com"}],"homepage":"https://github.com/mirere-ts/4get-sdk#readme","bugs":{"url":"https://github.com/mirere-ts/4get-sdk/issues"},"dist":{"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},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"9b7bfa6abc6f17b9d433d08e9b77e0c4e17882c7","scripts":{"test":"node --test test/smoke.test.ts","build":"tsc","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"mirere-ts","email":"mirere.vrc@gmail.com"},"repository":{"url":"git+https://github.com/mirere-ts/4get-sdk.git","type":"git"},"_npmVersion":"11.17.0","description":"Fully typed TypeScript SDK for the 4get search engine API","directories":{},"sideEffects":false,"_nodeVersion":"26.5.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/4get-sdk_0.1.1_1786507159827_0.3711375568008415","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"4get-sdk","version":"0.2.0","keywords":["4get","search","sdk","typescript","scraper"],"license":"MIT","_id":"4get-sdk@0.2.0","maintainers":[{"name":"mirere-ts","email":"mirere.vrc@gmail.com"}],"homepage":"https://github.com/mirere-ts/4get-sdk#readme","bugs":{"url":"https://github.com/mirere-ts/4get-sdk/issues"},"dist":{"shasum":"b6f5358d9df10f811fd4808d49522e78cd2a7657","tarball":"https://registry.npmjs.org/4get-sdk/-/4get-sdk-0.2.0.tgz","fileCount":6,"integrity":"sha512-JdLWZu9X+KCzcCt45ebiPcNuaoXRUIYxQ8FLwKvqL347hKlsZv9givVDjRcLwKnmEg/GvkGwb9KT4yyHxLp9sg==","signatures":[{"sig":"MEQCIG4mLePhyiyhxiGTZldBpZ51uHrYOE+x1hZ6h9gCF4j5AiBT0nZgD8cqv4+S64bcpPPDK2SlbZGpUCQe3UoNwIOO8g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13607},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"87f7c6351426039db2dc392249cbd970009d03b6","scripts":{"test":"node --test test/smoke.test.ts","build":"tsc","prepublishOnly":"npm run build && npm test"},"_npmUser":{"name":"mirere-ts","email":"mirere.vrc@gmail.com"},"repository":{"url":"git+https://github.com/mirere-ts/4get-sdk.git","type":"git"},"_npmVersion":"11.17.0","description":"Fully typed TypeScript SDK for the 4get search engine API","directories":{},"sideEffects":false,"_nodeVersion":"26.5.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/4get-sdk_0.2.0_1786566702150_0.791799394101756","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"4get-sdk","version":"0.2.1","description":"Fully typed TypeScript SDK for the 4get search engine API","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"tsc","test":"node --test test/smoke.test.ts","prepublishOnly":"npm run build && npm test"},"keywords":["4get","search","sdk","typescript","scraper"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/mirere-ts/4get-sdk.git"},"engines":{"node":">=18"},"sideEffects":false,"devDependencies":{"typescript":"^5.5.4"},"gitHead":"1a9c4b868b2a6397d4976438de5b225e86b69b37","_id":"4get-sdk@0.2.1","bugs":{"url":"https://github.com/mirere-ts/4get-sdk/issues"},"homepage":"https://github.com/mirere-ts/4get-sdk#readme","_nodeVersion":"26.5.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-rGHS/KaenUdVFGj9IO2H9c68pOKChC4E36TlWQG/SupeSYFx9/HP2JyGQcIXBhOfZmy5ZgAshr1Ngm993aG5SQ==","shasum":"ca5f20309cc59ecdf2d49f5fbb8c07fd291492e6","tarball":"https://registry.npmjs.org/4get-sdk/-/4get-sdk-0.2.1.tgz","fileCount":6,"unpackedSize":13506,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDF6tpsti0UPFW7bREKyfOJWATSvGMYfWjpUCIESGFxjAIhANwzikkVwPEz066vKB3fMirD914dSoG9qDhtCqjK9b5n"}]},"_npmUser":{"name":"mirere-ts","email":"mirere.vrc@gmail.com"},"directories":{},"maintainers":[{"name":"mirere-ts","email":"mirere.vrc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/4get-sdk_0.2.1_1786639255861_0.7312475795934263"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-10T22:05:23.289Z","modified":"2026-08-13T16:40:56.279Z","0.1.0":"2026-08-10T22:05:23.507Z","0.1.1":"2026-08-12T03:59:19.963Z","0.2.0":"2026-08-12T20:31:42.320Z","0.2.1":"2026-08-13T16:40:56.080Z"},"bugs":{"url":"https://github.com/mirere-ts/4get-sdk/issues"},"license":"MIT","homepage":"https://github.com/mirere-ts/4get-sdk#readme","keywords":["4get","search","sdk","typescript","scraper"],"repository":{"type":"git","url":"git+https://github.com/mirere-ts/4get-sdk.git"},"description":"Fully typed TypeScript SDK for the 4get search engine API","maintainers":[{"name":"mirere-ts","email":"mirere.vrc@gmail.com"}],"readme":"# 4get SDK\n\nFully typed TypeScript SDK for the [4get](https://git.lolcat.ca/lolcat/4get) search engine API. Zero runtime dependencies — uses native `fetch`.\n\n## Install\n\n```sh\nnpm install 4get-sdk\n```\n\nRequires Node 18+ (or any runtime with `fetch`).\n\n## Usage\n\n```ts\nimport { FgetClient } from \"4get-sdk\";\n\nconst client = new FgetClient(\"https://4get.ca\");\n\nconst results = await client.web({ s: \"higurashi\", extendedsearch: true });\nfor (const hit of results.web) {\n  console.log(hit.title, hit.url);\n}\n\n// Next page — npt alone suffices, do not resend `s`\nconst page2 = await client.web({ npt: results.npt! });\n\nconst pics = await client.images({ s: \"higurashi\", nsfw: \"no\" });\nconst clips = await client.videos({ s: \"higurashi\", sort: \"upload_date\" });\nconst headlines = await client.news({ s: \"higurashi\" });\nconst tunes = await client.music({ s: \"higurashi\", type: \"track\" });\nconst suggestions = await client.autocomplete(\"higurashi\");\n\nconst meta = await client.ami4get(); // instance info, version, instance list\n```\n\n### Pass tokens\n\nInstances with bot protection require a `pass` cookie (from solving the captcha):\n\n```ts\nconst client = new FgetClient(\"https://4get.ca\", \"your-token\");\n```\n\n### URL helpers\n\n```ts\nclient.favicon(\"https://lolcat.ca\");                        // /favicon?s=...\nclient.proxy(\"https://example.com/pic.png\", \"square\");      // /proxy?i=...&s=square\nclient.audioUrl(\"sc\", \"https://api-v2.soundcloud.com/...\"); // /audio/sc?s=...\n```\n\nFor audio proxying, honor `SongResult.stream.endpoint`: `\"linear\"` (or `null`) means a plain HTTP stream; anything else must be proxied via `audioUrl`.\n\n## API\n\nAll 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.\n\n## Test\n\n```sh\nnpm test   # runs against $FGET_INSTANCE (default http://localhost:8888)\n```\n\n## Terms of use\n\nRespect the [4get API terms](https://git.lolcat.ca/lolcat/4get) — cache responses, don't scrape intensively, and don't use it for SERP SEO.\n","readmeFilename":"README.md"}