TypeScript SDK for the UnifAPI public-data API.
UnifAPI gives agents and applications one HTTP surface for public-data workflows such as KOL pricing, creator research, social listening, competitive intelligence, and market research.
This package is generated from the UnifAPI OpenAPI spec with
@hey-api/openapi-ts. Do not editsrc/by hand — it is regenerated from the spec and force-pushed on each release.
npm install @unifapi/sdk
# or: pnpm add @unifapi/sdkThe package has no runtime dependencies — the fetch client is bundled.
Every operation is a tree-shakeable function named <method><Path> (for example
getHackerNewsMaxItem, postBrowserMarkdown, getXUsersByUsername). Request and
response types ship from the same import.
import { client, getHackerNewsMaxItem } from "@unifapi/sdk";
// Configure the API key once. baseUrl defaults to https://api.unifapi.com.
client.setConfig({ auth: () => process.env.UNIFAPI_API_KEY });
const { data, error } = await getHackerNewsMaxItem();
if (error) throw error;
console.log(data);Pass a request body or query/path params through the typed options argument:
import { postBrowserMarkdown } from "@unifapi/sdk";
const { data } = await postBrowserMarkdown({
body: { url: "https://example.com" },
});You can also scope configuration to a single call instead of the shared client:
await getHackerNewsMaxItem({
baseUrl: "https://api.unifapi.com",
auth: () => process.env.UNIFAPI_API_KEY,
});UnifAPI authenticates with a workspace API key sent as a Bearer token:
Authorization: Bearer $UNIFAPI_API_KEYCreate a key from the UnifAPI dashboard at https://api.unifapi.com/sign-in.
For agent clients, prefer the hosted MCP server:
https://mcp.unifapi.com
It lets an agent discover operations, inspect schemas, and call live public-data
APIs through list_operations, get_operation, and call_api.
- Developer resources:
https://unifapi.com/developers - OpenAPI:
https://unifapi.com/openapi.json - Docs:
https://docs.unifapi.com - MCP registry manifest:
https://unifapi.com/server.json