API Reference

Base URL: https://api.konti.bot

Authentication

All API requests require a Bearer token in the Authorization header. API keys start with kb_live_ and are 40 characters long.

Authorization: Bearer kb_live_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4

Generate keys in the API Keys page. Keys are shown once at creation -- store them securely.

Response Format

All responses are JSON. Successful responses include a data field and a meta field with cost and balance information.

Success (200)

{
  "data": { ... },
  "meta": {
    "cost": "$0.0005",
    "balance": "$9.9995",
    "request_id": "req_a1b2c3d4"
  }
}

Error (4xx / 5xx)

{
  "error": {
    "code": "invalid_api_key",
    "message": "Missing or malformed API key.",
    "request_id": "req_a1b2c3d4"
  }
}

Error Codes

HTTPCodeDescription
401invalid_api_keyMissing, malformed, or revoked API key
402insufficient_balanceNot enough balance for this request. Top up at /billing.
400invalid_requestMissing or invalid query parameters
502upstream_errorInstagram scrape failed. You are not charged.
504upstream_timeoutRequest timed out. You are not charged.

Input Parsing

All endpoints accept a q query parameter. The API automatically parses any of these formats:

InputParsed As
nikeUsername
@nikeUsername (@ stripped)
https://instagram.com/nikeUsername (from URL)
https://instagram.com/p/ABC123/Shortcode (from post URL)
https://instagram.com/reel/ABC123/Shortcode (from reel URL)
ABC123defBare shortcode

DB Endpoints

Cached data from our enriched database. If not found, automatically falls back to a live Instagram scrape, persists the result, and returns it.

GET /v1/profiles $0.0005

Look up an Instagram profile from our database of 3.8M+ enriched profiles. Returns cached profile data with AI enrichment (niche, demographics, engagement rate). If not in DB, falls back to a live scrape.

DB-first: Cached hits return instantly. Live fallback may take a few seconds. Response includes an X-Source header (cache or live).

Query Parameters

qstringrequiredUsername, @handle, or full Instagram profile URL

Example

curl -H "Authorization: Bearer kb_live_..." \
  "https://api.konti.bot/v1/profiles?q=nike"
GET /v1/posts $0.0005

Look up a post by shortcode from our database. Returns cached post data with comments. If not in DB, falls back to a live scrape.

DB-first: Cached hits include up to 50 comments from our database. Response includes an X-Source header (cache or live).

Query Parameters

qstringrequiredPost shortcode, instagram.com/p/X URL, or instagram.com/reel/X URL

Example

curl -H "Authorization: Bearer kb_live_..." \
  "https://api.konti.bot/v1/posts?q=https://instagram.com/p/DW65QfuEpyB/"

Live Endpoints

Real-time Instagram scraping. Returns raw, unmodified Instagram JSON. 30s timeout with auto-retry (up to 3 attempts). Failed upstream requests are never charged.

GET /v1/live/web_profile $0.0005

Fetch profile info via Instagram's web_profile_info REST endpoint. Returns bio, followers, following, posts count, first 12 posts inline, business info, verified status, and more.

Query Parameters

qstringrequiredUsername, @handle, or full Instagram profile URL

Example

curl -H "Authorization: Bearer kb_live_..." \
  "https://api.konti.bot/v1/live/web_profile?q=nike"
GET /v1/live/post $0.0005

Fetch a single post via Instagram's GraphQL xdt_shortcode_media query. Richest single-post payload: caption, likes, comments, media URLs, video duration, is_paid_partnership, is_ad, carousel items.

Query Parameters

qstringrequiredPost shortcode, instagram.com/p/X URL, or instagram.com/reel/X URL

Example

curl -H "Authorization: Bearer kb_live_..." \
  "https://api.konti.bot/v1/live/post?q=https://instagram.com/p/DW65QfuEpyB/"
GET /v1/live/profile $0.0005 / page

Fetch paginated timeline posts via Instagram's GraphQL user timeline query. Billed per page of 12 posts.

Billing note: post_type filtering does NOT reduce cost. Setting num_of_posts=24&post_type=reel fetches 24 posts (2 pages, $0.0010), then returns only the reels found in those posts.

Query Parameters

qstringrequiredUsername, @handle, or full Instagram profile URL
num_of_postsintegeroptionalDefault 12. Set -1 for unlimited (up to 240, max 20 pages). Billed per page of 12.
post_typestringoptionalPost-processing filter: reel, photo, carousel, video. Does NOT affect billing.

Billing Examples

num_of_postsPages FetchedCost
12 (default)1$0.0005
242$0.0010
505$0.0025
-1 (unlimited)up to 20$0.0005-$0.0100

Example

curl -H "Authorization: Bearer kb_live_..." \
  "https://api.konti.bot/v1/live/profile?q=nike&num_of_posts=24&post_type=reel"

Need help? Contact support@konti.bot