Synoppy v1.0 is here— start free
DocsClassify
Endpoint

Classify

POST/api/classify reads a URL and returns its industry with taxonomy-validated NAICS and SIC codes and a confidence score — or, if you pass your own labels, the single best-matching label. AI-backed, metered by the tokens used; requires an API key. This endpoint is live.

Request body

urlstringrequired
The URL to classify.
labelsstring[]
Optional. Your own label set — returns the single best match. Omit for default NAICS/SIC industry classification.

Example request

curl -X POST https://synoppy.com/api/classify \
  -H "Authorization: Bearer $SYNOPPY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://stripe.com" }'

Response

{
  "success": true,
  "url": "https://stripe.com",
  "data": {
    "industry": "Financial Technology (Fintech)",
    "naics_code": "522320",
    "sic_code": "7389",
    "categories": ["Fintech", "Payment Processing"],
    "confidence": 0.98
  },
  "latencyMs": 8206,
  "creditsUsed": 2,
  "creditsRemaining": 4998
}

With custom labels, data is { label, confidence, reasoning }.

Response fields

Default (industry) mode — data contains:

data.industrystring
Plain-language industry name.
data.naics_codestring
Taxonomy-validated NAICS code.
data.sic_codestring
Taxonomy-validated SIC code.
data.categoriesstring[]
A few short category tags.
data.confidencenumber
Model confidence, 0–1.

With your own labels, data is instead { label, confidence, reasoning } — the single best match from your set. Either way the response also carries usage, creditsUsed, and creditsRemaining.

In code

import { Synoppy } from "@synoppy/sdk";
const synoppy = new Synoppy({ apiKey: process.env.SYNOPPY_API_KEY });

const res = await synoppy.classify("https://stripe.com");
console.log(res.data.naics_code, res.data.industry);

// or against your own labels:
const tagged = await synoppy.classify("https://stripe.com", {
  labels: ["Fintech", "E-commerce", "Healthcare"],
});