Relativity6Platform Docs
POST/marvin2

Classification

Classifies a business into one industry code system per request (NAICS, SIC, workers comp, or general liability). Predictions are returned under a type-specific key (for example usa_naics_2022_prediction_hp or usa_sic_prediction_hp). Use responseConfig to control optional fields and prediction count. To request multiple code systems in one call, use POST /classification instead.

Base URLhttps://classification.relativity6.com

Authentication

Send your API key in the x-api-key header. Send your API key in this header on every request. Modern keys use the format r6-<keyId>.<secret>.

Request body

FieldTypeRequiredDescription
namestringRequiredCompany name to classify.
statestringOptionalUS state or region. Improves match accuracy when provided.
addressstringOptionalStreet address.
citystringOptionalCity.
zipstringOptionalPostal or ZIP code.
countrystringOptionalCountry.
predictionTypeenumOptionalCode system to return. Defaults to USA_NAICS_2017. See the prediction types guide for response key names.Default: USA_NAICS_2017USA_NAICS_2017 · USA_NAICS_2022 · R6_WORKERS_COMP · R6_GENERAL_LIABILITY · USA_SIC
searchIntelligenceenumOptionalResearch depth in balanced search mode. Defaults to low when omitted.low · medium · high
searchModeenumOptionalbalanced runs web research before classifying; fast prioritizes lower latency.Default: balancedbalanced · fast
racebooleanOptionalOptional performance setting for balanced mode. Defaults to true.Default: true
descriptionstringRequired if descriptionOnly is trueFree-text description of the business (max 1000 characters).
descriptionOnlybooleanOptionalWhen true, classifies from request fields and description without web research.Default: false
responseConfigobjectOptionalControls prediction count and optional response fields.
numberOfPredictions1 | 2OptionalNumber of ranked code predictions to return.Default: 2
includeExistenceCheckbooleanOptionalInclude business existence verification and supporting evidence.Default: true
includeDomainSearchbooleanOptionalInclude the inferred company website and confidence score.Default: true
includeKeywordsbooleanOptionalInclude activity keywords derived from research.Default: true
includeBusinessDescriptionbooleanOptionalInclude a short AI-generated business description.Default: false

Response

FieldTypeRequiredDescription
usa_naics_2017_prediction_hpobjectOptionalPresent when predictionType is USA_NAICS_2017 (also the default when omitted).
prediction_aobjectRequiredPrimary classification for the business.
codestringRequiredIndustry code value.
titlestringRequiredOfficial title for the code.
accuracynumberRequiredHow confident the classification is for this code (0.10–0.95).
prediction_bobjectOptionalAlternate classification when numberOfPredictions is 2.
codestringRequiredIndustry code value.
titlestringRequiredOfficial title for the code.
accuracynumberRequiredHow confident the classification is for this code.
usa_naics_2022_prediction_hpobjectOptionalPresent when predictionType is USA_NAICS_2022.
prediction_aobjectRequiredPrimary classification.
codestringRequired6-digit NAICS 2022 code.
titlestringRequiredOfficial NAICS title.
accuracynumberRequiredConfidence score (0.10–0.95).
prediction_bobjectOptionalAlternate classification when numberOfPredictions is 2.
codestringRequired6-digit NAICS 2022 code.
titlestringRequiredOfficial NAICS title.
accuracynumberRequiredConfidence score (0.10–0.95).
r6_workers_comp_prediction_hpobjectOptionalPresent when predictionType is R6_WORKERS_COMP.
r6_general_liability_prediction_hpobjectOptionalPresent when predictionType is R6_GENERAL_LIABILITY.
usa_sic_prediction_hpobjectOptionalPresent when predictionType is USA_SIC.
prediction_aobjectRequiredPrimary 4-digit SIC classification.
codestringRequired4-digit SIC code.
titlestringRequiredOfficial SIC title.
accuracynumberRequiredConfidence score (0.10–0.95).
prediction_bobjectOptionalAlternate classification when numberOfPredictions is 2.
codestringRequired4-digit SIC code.
titlestringRequiredOfficial SIC title.
accuracynumberRequiredConfidence score (0.10–0.95).
keywordsstring[]OptionalActivity keywords when includeKeywords is true.
company_website[string, number]OptionalInferred domain and confidence when includeDomainSearch is true.
existence_checkobjectOptionalBusiness existence check when includeExistenceCheck is true.
existsbooleanRequiredWhether the business appears to exist.
evidence_existarrayOptionalSupporting references used for the existence determination.
business_descriptionstringOptionalShort business description when includeBusinessDescription is true.
responseIdstring (UUID)RequiredUnique identifier for this response.
requestIdstringRequiredRequest identifier for correlation.
timestampstring (ISO 8601)RequiredWhen the response was generated.

Response headers

  • X-Marvin2-Cache

    Cache status for this request: HIT (served from cache) or MISS (computed fresh).

Errors

StatusDescription
400Invalid JSON or validation error (for example, descriptionOnly without description).
401Missing or invalid API key.
403Quota exceeded or not authorized.
429Rate limit exceeded.
500Server error or request timeout.

Example request

Example response

Example request (SIC (4-digit))

Example response (SIC (4-digit))