Introducing the OsintCat SDKs
Official SDKs for TypeScript and JavaScript, Python, Go and PHP, open source on GitHub. Plus rewritten API documentation, API keys that expire when you choose, and API fixes.
Zespół OsintCat
You can now use OsintCat from your own code in four languages. The new official SDKs for TypeScript and JavaScript, Python, Go and PHP cover every endpoint you can use today, Machine Viewer included, with typed results and clear errors, and their source code is open on GitHub.
The SDKs are part of a bigger update to the API: rewritten documentation, API keys that expire when you choose, and fixes for lookups that did not work through the API or charged for searches that found nothing.
The SDKs
import { OsintCatClient } from "osintcat";
const client = new OsintCatClient(); // reads OSINTCAT_API_KEY
const breach = await client.breach.search({ query: "[email protected]" });
console.log(breach.results_count);
const profile = await client.github.profile({ username: "octocat" });
if (profile.taken) console.log(profile.ExtraData?.Name);
| Language | Install | Source |
|---|---|---|
| TypeScript and JavaScript | npm install osintcat |
osintcat-typescript |
| Go | go get github.com/OsintCatHQ/osintcat-go |
osintcat-go |
| Python | pip install "git+https://github.com/OsintCatHQ/osintcat-python@main" |
osintcat-python |
| PHP | composer require osintcat/osintcat-php |
osintcat-php |
Every SDK works the same way:
- Every endpoint, grouped by subject:
breach.search,github.profile,dns.resolveand so on, each with its parameters and the fields it returns. - Your key stays out of your code. The SDK reads it from the
OSINTCAT_API_KEYenvironment variable and sends it in theX-API-KEYheader. - Clear errors. In TypeScript, Python and Go each status has its own error type, such as
TooManyRequestsErrorwhen your daily allowance is used up; in PHP one exception carries the status code. Every error names an error ID and a request ID you can quote to support. - No surprise charges. The SDKs never retry a lookup on their own: a retried lookup could be counted twice. You decide when to try again.
The TypeScript SDK runs on Node.js 18 and later, Bun, Deno and Cloudflare Workers, has no dependencies and is a small download. The PHP SDK needs PHP 8.1 or later and works with any PSR-18 HTTP client, such as Guzzle. The Python SDK is coming to PyPI soon; until then, install it from GitHub as shown above.
All four are open source under the MIT license. Read the code, open an issue, or send a fix.
If you used the old osintcat npm package (1.x) or the old Python client: both no longer work with the API. Run npm install osintcat@latest to move to the new SDK.
New API documentation
docs.osintcat.net is rewritten from scratch. Every endpoint has its own page with its parameters, the fields it returns, the errors it can answer with, how it counts against your plan, and examples in cURL, JavaScript & TypeScript, Python, PHP and Go. A new SDKs page walks you through it step by step in each language, from creating a key to your first request, and every endpoint page shows the same call with each SDK.
API keys that expire
When you create an API key under Settings → Developer, you now choose how long it works: 7, 30 or 90 days, a year, until a date you pick, or with no end date. New keys last 90 days unless you choose otherwise. An expired key stops working on its own and is marked as expired in your list.
You can also rename a key right in the list. To replace a key, create a new one and delete the old one.
API fixes
- Chess.com and X (Twitter) lookups now work through the API.
- No charge for nothing found. GitHub, Reddit, Twitch, Steam, Xbox and Minecraft profile lookups and Database Search no longer charge for a username that doesn't exist or a search that failed. A Minecraft Leak Search that could not be completed now shows as an error and is not charged.
- Clearer errors. A request with a wrong value is told which values are allowed, and a failed lookup comes with a reference you can quote to support.
Other improvements
- A link for every tab. Each tab now has its own address, such as osintcat.net/account/developer, that you can bookmark or share. The back button moves between tabs, and old links still work.
- Firefox and Safari no longer reload a module page when you start a search.
- Confirmations and errors after an action now show on every page.
Availability
The SDKs, the new documentation and API key expiry are available today on every plan with API access.
Read more: https://docs.osintcat.net/sdks