# CommentHunter full agent documentation ## Architecture CommentHunter extracts structured data from public web URLs. The dashboard extractor and REST Edge Functions share the same extract-comments, extract-reviews, and extract-universal implementations. OpenAPI, llms.txt, and /docs are generated from that contract so agents do not scrape HTML. Base URL: https://jdstzpeukxcxxnodvess.supabase.co/functions/v1 Site: https://commenthunter.click ## Authentication REST clients send: - Authorization: Bearer - apikey: - Content-Type: application/json User JWTs deduct that account's credits. Obtain a token after sign-in at https://commenthunter.click/login or via POST https://jdstzpeukxcxxnodvess.supabase.co/auth/v1/token?grant_type=password. ## REST contract Extraction endpoints are POST JSON. Success payloads include result arrays plus creditsUsed. Failures include errorCode and errorMessage. JSON bodies should stay small (URLs + limits, not file uploads). Large posts may return partial=true with a continuation object. ## MCP contract A hosted MCP URL is on the roadmap. Until then, import https://commenthunter.click/openapi.json into an OpenAPI-to-MCP adapter. Tool names = operationId. Tool results match REST JSON. Never echo secrets. ## Limits and safety Free accounts include starter credits (typically 500). Per-run ceiling is 5000 items. Credit multipliers: comments 1–3 by platform; reviews 2; leads 3; transcription 5. Only public content. Do not attempt to access private accounts. ## Operations ### extract_comments - Purpose: Extract comments and optional replies from one or more public post URLs. - REST: POST https://jdstzpeukxcxxnodvess.supabase.co/functions/v1/extract-comments - Body: { urls: string[], platform?: string, limit?: number, includeReplies?: boolean, exportLikesOnly?: boolean, exportJobId?: string } - Safety: readOnly=false, destructive=false, externalSideEffects=true (fetches third-party public pages) ### extract_reviews - Purpose: Extract product or business reviews from Amazon, Yelp, Google Maps, Airbnb, Trustpilot, and similar. - REST: POST .../extract-reviews - Body: { url: string, platform: string, maxItems?: number } - Safety: externalSideEffects=true ### extract_universal - Purpose: Product-typed extraction: posts, followers, leads, transcription, OCR, likes, profiles, comments, reviews. - REST: POST .../extract-universal - Body: { url: string, platform: string, productType: string, maxItems?: number, dateFrom?: string, dateTo?: string } - Safety: externalSideEffects=true ### extract_youtube_comments - Purpose: YouTube-specific comment extraction via official Data API when configured. - REST: POST .../extract-youtube-comments - Safety: externalSideEffects=true ### check_subscription - Purpose: Read plan, credits remaining, and Stripe subscription state. - REST: POST .../check-subscription - Safety: readOnly=true ### create_checkout - Purpose: Create a Stripe Checkout session for a plan or credit pack. - REST: POST .../create-checkout - Safety: destructive=false, paid=true — confirm with the user first ## Error codes INVALID_URL, PLATFORM_NOT_SUPPORTED, PRIVATE_OR_UNAVAILABLE, RATE_LIMIT, EXTRACTION_FAILED, API_ERROR. ## Comment object (typical) username, text, likes, timestamp, replyTo, userId, profileUrl, platform, commentUrl. ## Docs index https://commenthunter.click/docs https://commenthunter.click/openapi.json https://commenthunter.click/llms.txt