
Aidirs Now Has an API & npm SDK — Submit AI Tools from Your Codebase
Aidirs launches a public REST API and official npm SDK, enabling site owners and developers to programmatically submit AI products, manage listings, and automate directory submissions at scale.

If you run an AI tools directory, a SaaS listing site, or any platform that regularly publishes products to multiple directories — you know the pain. Manually filling out submission forms, one site at a time, is slow and doesn't scale.
Today, Aidirs launches its public REST API and official npm SDK (@aidirs/sdk), so you can submit AI tools directly from your codebase, CI pipeline, or automation scripts.
Why an API?
Most AI directories only offer a web form. That works for one-off submissions, but not if you're:
- A directory site owner syncing products across multiple platforms
- A SaaS builder who wants to auto-list new tools as they launch
- A growth team managing dozens of product submissions per week
- A developer who just prefers code over clicking through forms
The Aidirs API turns a 5-minute manual task into a single API call.
How It Works
Three steps to get started:
- Get an API Key — Generate one from your Dashboard
- Buy Credits — Each submission costs 1–6 credits depending on the plan tier
- Submit via API or SDK — One call per product, AI auto-fills the rest
Pricing Tiers
| Plan | Credits | What You Get |
|---|---|---|
| Starter | 1 | Basic listing + dofollow backlinks |
| Pro | 2 | Featured placement + social sharing |
| Sponsor | 6 | Featured + 7-day site-wide placement |
Quick Start with the SDK
Install the official package:
pnpm add @aidirs/sdk
Submit your first tool in 5 lines:
import { Aidirs } from "@aidirs/sdk";
const client = new Aidirs({ apiKey: process.env.AIDIRS_API_KEY! });
const result = await client.submit({
url: "https://your-ai-tool.com",
plan: "starter",
});
console.log(result);
// { status: "success", url: "https://aidirs.best/item/your-ai-tool", creditsUsed: 1, creditsRemaining: 9 }That's it. Just a URL and a plan — name and description are auto-generated by AI based on your URL.
Check Your Balance
const { credits, plan } = await client.credits();
console.log(`Credits: ${credits}, Plan: ${plan}`);Batch Submit
Got a list of tools to submit? The SDK handles it with built-in error handling — it stops early if you run out of credits, so you never waste a request:
const { results, errors } = await client.batchSubmit([
{ url: "https://tool-a.com", plan: "starter" },
{ url: "https://tool-b.com", plan: "pro" },
{ url: "https://tool-c.com", plan: "starter" },
]);
console.log(`Submitted: ${results.length}, Failed: ${errors.length}`);Error Handling
The SDK provides typed errors for clean error handling:
import { Aidirs, AidirsAPIError } from "@aidirs/sdk";
try {
await client.submit({ url: "https://duplicate.com", plan: "starter" });
} catch (err) {
if (err instanceof AidirsAPIError) {
console.log(err.status); // 409
console.log(err.body); // { error: "This URL has already been submitted" }
}
}Using the REST API Directly
Prefer raw HTTP? The API works with any language or tool:
# Check credits
curl https://aidirs.best/api/v1/credits \
-H "Authorization: Bearer aidirs_your_key"
# Submit a tool
curl -X POST https://aidirs.best/api/v1/submit \
-H "Authorization: Bearer aidirs_your_key" \
-H "Content-Type: application/json" \
-d '{"url": "https://your-tool.com", "plan": "starter"}'
# Response:
# { "status": "success", "url": "https://aidirs.best/item/your-tool", "creditsUsed": 1, "creditsRemaining": 9 }Only two fields required: url and plan. Name and description are auto-generated by AI. Python, Go, Ruby — anything that can make HTTP requests works. Check the API docs for examples in multiple languages.
SDK Features
The @aidirs/sdk package is designed to be lightweight and production-ready:
- Full TypeScript types — autocomplete and type checking out of the box
- Auto error parsing — typed
AidirsAPIErrorwith status codes and response bodies - Batch submit helper — submit multiple tools with automatic early-stop on insufficient credits
- Rate-limit aware retries — handles 429 responses gracefully
- ESM & CJS dual build — works in any Node.js environment
- Zero dependencies — no bloat in your
node_modules
Who Is This For?
This API is built for people with ongoing submission needs, not one-off listings:
- Directory aggregators — Sync your catalog to Aidirs automatically
- AI tool builders — Add Aidirs submission to your launch checklist or CI/CD
- SEO teams — Programmatically manage dofollow backlinks across directories
- Indie hackers — Script your Product Hunt + directory launch day workflow
Get Started
- Create an account at aidirs.best
- Generate your API key from the Dashboard
- Buy credits — start with a small pack to test
- Install the SDK:
pnpm add @aidirs/sdk - Read the full API documentation
The API and SDK are live now. If you hit any issues or have feature requests, reach out at [email protected].
More Posts

A Profound Lesson Learned
Today, I want to share a story about website optimization and a milestone summary of my journey after 2+ months of going global.

How a Build Process Crashed My 8-Core 8GB Server: A Real OOM Troubleshooting Story
A detailed account of troubleshooting server crashes caused by Next.js builds triggering OOM, and how adding Swap solved the memory spike issues in a multi-container environment.

Which US State Should You Choose for Company Registration?
Detailed comparison of popular registration states like Delaware, Wyoming, and Colorado, helping cross-border entrepreneurs make rational choices for the best incorporation location
