/marvin2Classification
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.
https://classification.relativity6.comAuthentication
Send your API key in the x-api-key header. Send your API key in this header on every request. Production keys use r6-<keyId>.<secret>. Test keys use r6-test-<keyId>.<secret>. See Environments.
Request headers
X-Marvin-CacheOptional cache control. Omit for default behavior (use cache when the request body matches a recent classification). bypass — skip cache read and write; always run a fresh classification. refresh — skip cache read, run fresh, and store the new result for future matching requests.
X-R6-FixtureOptional. Test keys only. Set to default to return a canned classification without consuming quota. Production keys receive HTTP 400 (FIXTURE_TEST_KEY_REQUIRED). See Environments.
Request body
| Field | Type | Required | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name | string | Required | Company name to classify. | ||||||||||||||||||||
| state | string | Optional | US state or region. Improves match accuracy when provided. | ||||||||||||||||||||
| aliases | string[] | null | Optional | Optional alternate names for the same business (DBAs, trade names, former legal names). Marvin2 uses these during web research and classification to find the correct entity. Up to 10 names, 200 characters each. All names must refer to the same company as name. | ||||||||||||||||||||
| address | string | Optional | Street address. | ||||||||||||||||||||
| city | string | Optional | City. | ||||||||||||||||||||
| zip | string | Optional | Postal or ZIP code. | ||||||||||||||||||||
| country | string | Optional | Country. | ||||||||||||||||||||
| predictionType | enum | Optional | Code 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 | ||||||||||||||||||||
| searchMode | enum | Optional | Fast mode uses our priority infrastructure for up to 2x faster responses. Pricing may vary.Default: balancedbalanced · fast | ||||||||||||||||||||
| description | string | Required if descriptionOnly is true | Free-text description of the business (max 1000 characters). | ||||||||||||||||||||
| descriptionOnly | boolean | Optional | When true, classifies from request fields and description without web research.Default: false | ||||||||||||||||||||
| responseConfig | object | Optional | Controls prediction count and optional response fields. | ||||||||||||||||||||
| |||||||||||||||||||||||
Response
| Field | Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| usa_naics_2017_prediction_hp | object | Optional | Present when predictionType is USA_NAICS_2017 (also the default when omitted). | ||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
| usa_naics_2022_prediction_hp | object | Optional | Present when predictionType is USA_NAICS_2022. | ||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
| r6_workers_comp_prediction_hp | object | Optional | Present when predictionType is R6_WORKERS_COMP. | ||||||||||||||||||||||||||||||||||||||||
| r6_general_liability_prediction_hp | object | Optional | Present when predictionType is R6_GENERAL_LIABILITY. | ||||||||||||||||||||||||||||||||||||||||
| usa_sic_prediction_hp | object | Optional | Present when predictionType is USA_SIC. | ||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
| keywords | string[] | Optional | Activity keywords when includeKeywords is true. | ||||||||||||||||||||||||||||||||||||||||
| company_website | [string, number] | Optional | Inferred domain and confidence when includeDomainSearch is true. | ||||||||||||||||||||||||||||||||||||||||
| existence_check | object | Optional | Business existence check when includeExistenceCheck is true. | ||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
| business_description | string | Optional | Short business description when includeBusinessDescription is true. | ||||||||||||||||||||||||||||||||||||||||
| responseId | string (UUID) | Required | Unique identifier for this response. | ||||||||||||||||||||||||||||||||||||||||
| requestId | string | Required | Request identifier for correlation. | ||||||||||||||||||||||||||||||||||||||||
| timestamp | string (ISO 8601) | Required | When the response was generated. | ||||||||||||||||||||||||||||||||||||||||
Response headers
X-Marvin2-CacheCache status for this request: HIT (served from cache), MISS (computed fresh and stored), BYPASS (fresh run; cache skipped), or REFRESH (fresh run; new result stored).
RateLimit-PolicyStructured policy descriptor reporting your sustained per-minute quota (q, w=60) and per-second burst capacity (w=1) for this endpoint group.
RateLimitRemaining requests (r) in the current sustained window and seconds until reset (t).
Retry-AfterReturned on HTTP 429 responses. Whole seconds to wait before retrying.
Errors
| Status | Description |
|---|---|
| 400 | Invalid JSON or validation error (for example, descriptionOnly without description), or X-R6-Fixture sent with a production key. |
| 401 | Missing or invalid API key. |
| 403 | Not authorized for this organization or endpoint. |
| 429 | Rate limit exceeded (code RATE_LIMIT_EXCEEDED — honor Retry-After) or organization quota exceeded (code QUOTA_EXCEEDED). |
| 500 | Server error or request timeout. |