> ## 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

> 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`).

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


## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/context.dev/openapi.documented.yml 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: []
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
        '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
        '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
        '404':
          description: Brand not found.
        '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
      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: 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)
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:
    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).
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````