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

# Get Technology

> Detects technologies used by a company’s website (best-effort) using HTML signatures, HTTP headers, and DNS/nameserver hints.

Behavior:
- Normalizes `website` to `domain_root`
- Finds or creates the company by `domain_root`
- If any tech observations exist within the last 6 months: returns cached results (latest observation per technology)
- Otherwise: fetches the site, detects tech, stores observations, and returns fresh results

If the site cannot be fetched (HTTP status >= 400 or empty response), the API returns 502.



## OpenAPI

````yaml GET /companies/techstack
openapi: 3.1.0
info:
  title: TargetSmarter API
  version: 1.0.0
  description: API v1 endpoints for company lookup and supported industries.
servers:
  - url: https://api.targetsmarter.com/api/v1
security:
  - ApiKeyBearer: []
paths:
  /companies/techstack:
    get:
      summary: Detect company website tech stack
      description: >-
        Detects technologies used by a company’s website (best-effort) using
        HTML signatures, HTTP headers, and DNS/nameserver hints.


        Behavior:

        - Normalizes `website` to `domain_root`

        - Finds or creates the company by `domain_root`

        - If any tech observations exist within the last 6 months: returns
        cached results (latest observation per technology)

        - Otherwise: fetches the site, detects tech, stores observations, and
        returns fresh results


        If the site cannot be fetched (HTTP status >= 400 or empty response),
        the API returns 502.
      operationId: companyTechStack
      parameters:
        - name: website
          in: query
          description: >-
            Website or domain to analyze. Normalized to a domain root (scheme
            optional). Example: `https://example.com` or `example.com`.
          schema:
            type: string
            maxLength: 2048
          required: true
          examples:
            domain:
              value: stripe.com
            full_url:
              value: https://www.notion.so
      responses:
        '200':
          description: Detected technologies for the company website.
          content:
            application/json:
              schema:
                $ref: 46678b70-4db1-4143-b8f5-937b7a168639
              examples:
                cache:
                  value:
                    company_id: 123
                    domain_root: example.com
                    website: https://example.com
                    source: cache
                    cache_cutoff: '2025-07-27 00:00:00'
                    technologies:
                      - id: 10
                        name: WordPress
                        vendor: Automattic
                        category: CMS
                        last_observed_at: '2026-01-15T12:34:56Z'
                        confidence: 0.95
                        method: html
                        evidence:
                          match: wp-content/wp-includes
                fresh:
                  value:
                    company_id: 456
                    domain_root: stripe.com
                    website: https://stripe.com
                    source: fresh
                    cache_cutoff: '2025-07-27 00:00:00'
                    technologies:
                      - id: 22
                        name: Cloudflare
                        vendor: Cloudflare
                        category: null
                        last_observed_at: '2026-01-27T10:00:00Z'
                        confidence: 0.95
                        method: headers
                        evidence:
                          cf-ray: abc123
        '401':
          description: Unauthorized (missing or invalid API key).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
              examples:
                missing:
                  value:
                    error: missing_api_key
                format:
                  value:
                    error: invalid_api_key_format
                invalid:
                  value:
                    error: invalid_api_key
        '422':
          description: Validation error (e.g., missing/invalid website parameter).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LaravelValidationError'
              examples:
                invalid_website:
                  value:
                    message: The given data was invalid.
                    errors:
                      website:
                        - The website field is required.
        '502':
          description: >-
            Website fetch failed (cannot retrieve content/headers for
            detection).
          content:
            application/json:
              schema:
                $ref: e4ebcea2-9dfa-4fe3-9f97-6c4264ac2359
              examples:
                fetch_failed:
                  value:
                    company_id: 456
                    domain_root: stripe.com
                    website: https://stripe.com
                    source: fresh
                    error: Unable to fetch site content for tech detection.
                    http_status: 403
components:
  schemas:
    AuthError:
      type: object
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: string
          enum:
            - missing_api_key
            - invalid_api_key_format
            - invalid_api_key
    LaravelValidationError:
      type: object
      additionalProperties: true
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: APIKey
      description: 'Use `Authorization: Bearer <prefix>.<secret>`.'

````