> ## Documentation Index
> Fetch the complete documentation index at: https://docs.context.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Classify SIC Industries

> Map brands to SIC codes for finance, compliance, segmentation, and industry analysis.

<Badge color="orange">10 Credits</Badge>


## OpenAPI

````yaml GET /web/sic
openapi: 3.0.0
info:
  title: Context API
  description: API for retrieving context data from any website
  version: 1.0.0
servers:
  - url: https://api.context.dev/v1
security: []
tags:
  - name: Monitors
    description: >-
      Monitor pages, sitemaps, and extracted website data for exact or semantic
      changes. The change.detected webhook payload is documented by the
      MonitorsChangeDetectedWebhookPayload schema.
paths:
  /web/sic:
    get:
      tags:
        - Web Extraction
      summary: Classify SIC industries
      description: >-
        Classify any brand into Standard Industrial Classification (SIC) codes
        from its domain or name. Choose between the original SIC system
        (`original_sic`) or the latest SIC list maintained by the SEC
        (`latest_sec`).
      parameters:
        - name: input
          in: query
          required: true
          schema:
            type: string
          description: >-
            Brand domain or title to retrieve SIC code for. If a valid domain is
            provided, it will be used for classification, otherwise, we will
            search for the brand using the provided title.
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - original_sic
              - latest_sec
            default: original_sic
          description: >-
            Which SIC dataset to classify against. `original_sic` uses the 1987
            Standard Industrial Classification system; `latest_sec` uses the
            current SIC list as published by the SEC. Defaults to
            `original_sic`.
        - name: minResults
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 10
            default: 1
          description: >-
            Minimum number of SIC codes to return. Must be at least 1. Defaults
            to 1.
        - name: maxResults
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 10
            default: 5
          description: >-
            Maximum number of SIC codes to return. Must be between 1 and 10.
            Defaults to 5.
        - $ref: '#/components/parameters/TimeoutMS'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the response, e.g., 'ok'
                  domain:
                    type: string
                    description: Domain found for the brand
                  type:
                    type: string
                    description: Industry classification type, for sic api it will be `sic`
                  classification:
                    type: string
                    enum:
                      - original_sic
                      - latest_sec
                    description: >-
                      Echoes back which SIC dataset was used to classify the
                      brand.
                  codes:
                    type: array
                    description: >-
                      Array of SIC codes with confidence scores. Extra fields
                      depend on the requested classification: `original_sic`
                      results include `majorGroup` and `majorGroupName`;
                      `latest_sec` results include `office`.
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          description: SIC code (4-digit).
                        name:
                          type: string
                          description: SIC industry title.
                        confidence:
                          type: string
                          enum:
                            - high
                            - medium
                            - low
                          description: >-
                            Confidence level for how well this SIC code matches
                            the company description.
                        majorGroup:
                          type: string
                          description: >-
                            2-digit major group identifier (the leading two
                            digits of the code). Only present when
                            `classification` is `original_sic`.
                        majorGroupName:
                          type: string
                          description: >-
                            Description of the 2-digit major group. Only present
                            when `classification` is `original_sic`.
                        office:
                          type: string
                          description: >-
                            SEC review office responsible for filings under this
                            code. Only present when `classification` is
                            `latest_sec`.
                      required:
                        - code
                        - name
                        - confidence
                  key_metadata:
                    $ref: '#/components/schemas/KeyMetadata'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  error_code:
                    type: string
                    enum:
                      - INTERNAL_ERROR
                      - VALID
                      - NOT_FOUND
                      - FORBIDDEN
                      - USAGE_EXCEEDED
                      - RATE_LIMITED
                      - UNAUTHORIZED
                      - DISABLED
                      - INSUFFICIENT_PERMISSIONS
                      - TIMEOUT_EXCEEDS_MAXIMUM
                      - WEBSITE_ACCESS_ERROR
                      - INPUT_VALIDATION_ERROR
                    description: Error code indicating the type of error
                  key_metadata:
                    $ref: '#/components/schemas/KeyMetadata'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    enum:
                      - INTERNAL_ERROR
                      - VALID
                      - NOT_FOUND
                      - FORBIDDEN
                      - USAGE_EXCEEDED
                      - RATE_LIMITED
                      - UNAUTHORIZED
                      - DISABLED
                      - INSUFFICIENT_PERMISSIONS
                      - TIMEOUT_EXCEEDS_MAXIMUM
                      - WEBSITE_ACCESS_ERROR
                      - INPUT_VALIDATION_ERROR
                    description: Error code indicating the type of error
                  key_metadata:
                    $ref: '#/components/schemas/KeyMetadata'
        '404':
          description: Brand not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '408':
          description: Request Timeout
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Timeout error message
                  error_code:
                    type: string
                    enum:
                      - REQUEST_TIMEOUT
                    description: Error code indicating request timeout
                  key_metadata:
                    $ref: '#/components/schemas/KeyMetadata'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import ContextDev from 'context.dev';


            const client = new ContextDev({
              apiKey: process.env['CONTEXT_DEV_API_KEY'], // This is the default and can be omitted
            });


            const response = await client.industry.retrieveSic({ input: 'input'
            });


            console.log(response.classification);
        - lang: Python
          source: |-
            import os
            from context.dev import ContextDev

            client = ContextDev(
                api_key=os.environ.get("CONTEXT_DEV_API_KEY"),  # This is the default and can be omitted
            )
            response = client.industry.retrieve_sic(
                input="input",
            )
            print(response.classification)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/context-dot-dev/context-go-sdk\"\n\t\"github.com/context-dot-dev/context-go-sdk/option\"\n)\n\nfunc main() {\n\tclient := contextdev.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Industry.GetSic(context.TODO(), contextdev.IndustryGetSicParams{\n\t\tInput: \"input\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Classification)\n}\n"
        - lang: Ruby
          source: |-
            require "context_dev"

            context_dev = ContextDev::Client.new(api_key: "My API Key")

            response = context_dev.industry.retrieve_sic(input: "input")

            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use ContextDev\Client;

            use ContextDev\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('CONTEXT_DEV_API_KEY') ?: 'My
            API Key');


            try {
              $response = $client->industry->retrieveSic(
                input: 'input',
                maxResults: 1,
                minResults: 1,
                timeoutMs: 1000,
                type: 'original_sic',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            context-dev industry retrieve-sic \
              --api-key 'My API Key' \
              --input input
components:
  parameters:
    TimeoutMS:
      name: timeoutMS
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/TimeoutMS'
      description: >-
        Optional timeout in milliseconds for the request. If the request takes
        longer than this value, it will be aborted with a 408 status code.
        Maximum allowed value is 300000ms (5 minutes).
  schemas:
    KeyMetadata:
      type: object
      description: >-
        Metadata about the API key used for the request. Included in every
        response whenever a valid API key is provided, even when the response
        status is not 200.
      properties:
        credits_consumed:
          type: integer
          description: The number of credits consumed by this request.
        credits_remaining:
          type: integer
          description: >-
            The number of credits remaining for your organization after this
            request.
      required:
        - credits_consumed
        - credits_remaining
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Error message
        error_code:
          type: string
          enum:
            - INTERNAL_ERROR
            - VALID
            - NOT_FOUND
            - FORBIDDEN
            - USAGE_EXCEEDED
            - RATE_LIMITED
            - UNAUTHORIZED
            - DISABLED
            - INSUFFICIENT_PERMISSIONS
            - TIMEOUT_EXCEEDS_MAXIMUM
            - WEBSITE_ACCESS_ERROR
            - EXTERNAL_PROVIDER_ERROR
            - INPUT_VALIDATION_ERROR
            - REQUEST_TIMEOUT
          description: Error code indicating the type of error
        key_metadata:
          $ref: '#/components/schemas/KeyMetadata'
    TimeoutMS:
      type: integer
      minimum: 1000
      maximum: 300000
      description: >-
        Optional timeout in milliseconds for the request. If the request takes
        longer than this value, it will be aborted with a 408 status code.
        Maximum allowed value is 300000ms (5 minutes).
  responses:
    RateLimited:
      description: Rate limit exceeded
      headers:
        Retry-After:
          description: Seconds until the per-minute rate limit window resets
          schema:
            type: integer
            minimum: 1
            maximum: 60
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error message
              error_code:
                type: string
                enum:
                  - RATE_LIMITED
                description: Error code indicating the rate limit was exceeded
              key_metadata:
                $ref: '#/components/schemas/KeyMetadata'
            required:
              - message
              - error_code
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````