Everything you need to submit URLs from your own code. Keys are created on the dashboard and inherit your account's credits and limits.
Every request carries your API key. Send it in the x-api-key
header (preferred) or as a Bearer token.
curl banglakagaj.in/v1/balance \ -H "x-api-key: ib_your_key_here"
Keys are shown once when created and stored hashed. Revoke one any time from the dashboard; requests with it fail immediately with 401.
POST /v1/submit queues a batch. Credits are charged on
acceptance and the batch is handed to the indexer within seconds.
| Field | Type | Notes |
|---|---|---|
urls | string[] or newline string | Required. Up to 20,000. Invalid lines are skipped and reported; duplicates removed. |
engine | "google" | "bing" | Required. |
mode | "standard" | "instant" | Google only; default standard. |
name | string | Optional label, up to 80 chars. |
curl -X POST banglakagaj.in/v1/submit \
-H "x-api-key: ib_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"engine": "google",
"mode": "standard",
"name": "Blog - September",
"urls": ["https://example.com/post-1", "https://example.com/post-2"]
}'
{
"status": "ok",
"submissionId": "7c1e…",
"creditsUsed": 2,
"balance": 498,
"urlCount": 2,
"skipped": { "invalid": [], "invalidCount": 0, "duplicates": 0 },
"estimatedCompletion": "Google 24-hour batches are processed within about 24 hours."
}
The response is 201 on success. Only
http:// and https:// URLs are accepted; a line without a scheme
gets https:// prepended. Anything else is rejected and never charged.
Poll GET /v1/submissions/:id no more than once a minute.
Status moves queued → processing → completed. Failed batches are refunded automatically.
List your batches with GET /v1/submissions?page=1&pageSize=25
(max pageSize 200).
GET /v1/balance
{ "status": "ok", "balance": 498,
"creditCosts": { "google_standard": 1, "google_instant": 10, "bing": 10 } }
| HTTP | code | Meaning |
|---|---|---|
| 400 | bad_request | Validation failed; details.invalid explains what. |
| 401 | unauthorized | Missing, invalid or revoked key. |
| 402 | insufficient_credits | details.needed/balance. Nothing charged. |
| 403 | forbidden | Account suspended. |
| 404 | not_found | Unknown submission id (or one that isn't yours). |
| 415 | unsupported_media_type | Body must be JSON. |
| 429 | rate_limited | Slow down; honour Retry-After. |
Limits are per API key and per minute. Every response carries the current window:
| Header | Notes |
|---|---|
X-RateLimit-Limit | Requests allowed per minute for this key. |
X-RateLimit-Remaining | Requests left in the current window. |
X-RateLimit-Reset | Unix time when the window resets. |
Retry-After | Header on 429 only: seconds to wait. |
Network hiccups and CMS retries can resend a submit. Add an
Idempotency-Key header and repeats return the original result instead of
charging twice. Keys are remembered for 24 hours per account; replays answer with
HTTP 200 and Idempotent-Replayed: true.
curl -X POST banglakagaj.in/v1/submit \
-H "x-api-key: ib_your_key_here" \
-H "Idempotency-Key: post-1842-publish" \
-H "Content-Type: application/json" \
-d '{"engine":"google","urls":["https://example.com/post-1842"]}'
const res = await fetch("banglakagaj.in/v1/submit", {
method: "POST",
headers: { "x-api-key": process.env.INDEX_KEY, "Content-Type": "application/json" },
body: JSON.stringify({ engine: "google", mode: "instant", urls }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error);