{"uid":"cap_AfvHydFvuOb5kxyc7s6JZ","slug":"sitecheck-sentiment-analysis-1b361f50","name":"SiteCheck Sentiment Analysis","description":"Sentiment of one text, or up to 20 (texts, a JSON array), each up to 2,000 characters: POSITIVE or NEGATIVE with the model's confidence, from DistilBERT SST-2. Best for short English text. It measures the wording, not whether the statement is true.","url":"https://api.sitecheck-api.workers.dev/api/sentiment?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"text":{"type":"string","description":"One text, up to 2,000 characters"},"texts":{"type":"string","description":"JSON array of up to 20 texts"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"count":1,"model":"@cf/huggingface/distilbert-sst-2-int8","labels":"POSITIVE or NEGATIVE, with the model's confidence","results":[{"text":"I love it: setup took five minutes and it works perfectly.","label":"POSITIVE","score":0.9999}],"checkedAt":"2026-10-14T05:12:23.179Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pVI14iyMvm-KfDBBL-EFs","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Classifies one or more text strings as POSITIVE or NEGATIVE with a confidence score using DistilBERT SST-2","exampleAgentPrompt":"Can you check whether this customer review is positive or negative: 'The onboarding was smooth and the support team responded in under an hour — really impressed'?","exampleUseCases":[{"title":"Customer review sentiment triage","prompt":"I've got this product review and I need to know if it's positive or negative before we respond — here it is: 'The battery drains way too fast and customer support was completely unhelpful.'"},{"title":"Batch feedback scoring for survey responses","prompt":"Analyze the sentiment of these three survey responses at once: ['Loved the new UI, very intuitive', 'Nothing changed, still confusing', 'Great improvements this quarter!'] — tell me which are positive and which are negative with confidence scores."},{"title":"Social media post tone detection","prompt":"Is this tweet positive or negative: 'Just tried the new update and honestly it ruined everything I liked about the app.'?"}],"resultDescription":"Returns a JSON object with a count, the model name (@cf/huggingface/distilbert-sst-2-int8), a description of labels, an array of results each containing the original text, a label (POSITIVE or NEGATIVE), and a confidence score (0–1), plus a timestamp of when the check was performed.","failureModes":["Missing 'text' or 'texts' query parameter returns an error","'texts' must be valid JSON array — malformed JSON causes a parse error","Text exceeding 2,000 characters may be truncated or rejected","Batch exceeding 20 texts may be rejected","Ambiguous or very short texts may produce low-confidence classifications","Payment not included or insufficient funds returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need fast, low-cost binary sentiment classification (POSITIVE/NEGATIVE) with confidence scores for single texts or small batches up to 20. It is ideal for quick triage of customer reviews, survey responses, or social media posts where nuanced multi-class emotion detection is not required. The DistilBERT SST-2 model is well-calibrated for English-language sentiment and returns near-real-time results at $0.001 per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-15T06:39:06.432Z","isFirstParty":false,"canonicalSlug":"sitecheck-sentiment-analysis-1b361f50"}