openapi: 3.0.3
info:
  title: Tech Stack Detector API
  description: |
    Detect what technologies a website uses — servers, frameworks, CMS, CDNs, analytics,
    JavaScript libraries, CSS frameworks, e-commerce platforms, error monitoring, and more.
    Identifies 203 technologies across 21 categories by analyzing HTTP headers, meta tags,
    script sources, and HTML patterns.

    **Authentication (optional):** Add an `X-API-Key` header for higher limits (5 req/min, 50/day vs anonymous 10/day cap).
    Get a free API key instantly at https://hermesforge.dev/tools/techstack or POST to `/api/keys` with `{}` (anonymous, 20/day) or `{"email": "you@example.com"}` (50/day).

    Without a key: 5 requests per minute per IP. With a free key: 5 req/min, 50/day, 500/month.
  version: "1.2.0"
  contact:
    name: Hermes Agent
    email: hermes-agent@agentmail.to
    url: https://hermesforge.dev/

externalDocs:
  description: Try this tool in the browser
  url: https://hermesforge.dev/tools/techstack

servers:
  - url: https://hermesforge.dev
    description: Production

paths:
  /api/techstack:
    get:
      operationId: detectTechStack
      summary: Detect technologies used by a website
      description: |
        Analyzes the target URL's HTTP headers, HTML meta tags, inline scripts, external
        script sources, and page content patterns to identify the technology stack.
        Detects 203 technologies across 21 categories including: server, framework, CMS, CDN,
        JavaScript framework/library, CSS framework, analytics, security, e-commerce, hosting
        platform, error monitoring, marketing, chat widgets, CDN providers, build tools,
        payment, authentication, image optimization, and consent/privacy.
      parameters:
        - name: url
          in: query
          required: true
          description: URL to analyze. HTTPS prefix is added automatically if missing.
          schema:
            type: string
          example: "https://example.com"
      responses:
        "200":
          description: Tech stack detection completed successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TechStackResult"
              example:
                url: "https://dev.to"
                final_url: "https://dev.to/"
                status_code: 200
                response_time_ms: 312.8
                technologies_detected: 8
                technologies:
                  - name: "Cloudflare"
                    category: "cdn"
                    confidence: "high"
                  - name: "Ruby on Rails"
                    category: "framework"
                    confidence: "medium"
                  - name: "Heroku"
                    category: "platform"
                    confidence: "high"
                  - name: "Google Analytics"
                    category: "analytics"
                    confidence: "high"
                  - name: "Honeybadger"
                    category: "monitoring"
                    confidence: "medium"
                  - name: "Fastly"
                    category: "cdn"
                    confidence: "high"
                  - name: "Turbo"
                    category: "js_library"
                    confidence: "medium"
                  - name: "HSTS"
                    category: "security"
                    confidence: "high"
                summary:
                  cdn: ["Cloudflare", "Fastly"]
                  framework: ["Ruby on Rails"]
                  platform: ["Heroku"]
                  analytics: ["Google Analytics"]
                  monitoring: ["Honeybadger"]
                  js_library: ["Turbo"]
                  security: ["HSTS"]
                meta_generator: null
                server: "cloudflare"
                powered_by: null
                timestamp: "2026-03-04T15:45:00Z"
        "400":
          description: Invalid request (missing or malformed URL).
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "429":
          description: Rate limit exceeded. Try again after the cooldown period.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Detection failed (target unreachable, DNS error, timeout, etc.).
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"

security:
  - ApiKeyAuth: []
  - {}

components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: |
        Optional API key for higher rate limits. Get one free at
        https://hermesforge.dev/tools/techstack or POST /api/keys with {} (anonymous, 20/day) or {"email": "you@example.com"} (50/day).
  schemas:
    TechStackResult:
      type: object
      properties:
        url:
          type: string
          description: The URL that was analyzed.
          example: "https://dev.to"
        final_url:
          type: string
          description: The final URL after following redirects.
          example: "https://dev.to/"
        status_code:
          type: integer
          description: HTTP status code of the response.
          example: 200
        response_time_ms:
          type: number
          format: float
          description: Response time in milliseconds.
          example: 312.8
        technologies_detected:
          type: integer
          description: Total number of technologies detected.
          example: 5
        technologies:
          type: array
          description: List of all detected technologies with category and confidence level.
          items:
            $ref: "#/components/schemas/Technology"
        summary:
          type: object
          description: Technologies grouped by category for quick overview.
          additionalProperties:
            type: array
            items:
              type: string
        meta_generator:
          type: string
          nullable: true
          description: Value of the HTML meta generator tag, if present.
          example: "WordPress 6.4"
        server:
          type: string
          nullable: true
          description: Value of the HTTP Server header, if present.
          example: "nginx/1.24.0"
        powered_by:
          type: string
          nullable: true
          description: Value of the X-Powered-By header, if present.
          example: "Express"
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the detection was performed.
          example: "2026-03-02T08:00:00Z"
    Technology:
      type: object
      properties:
        name:
          type: string
          description: Name of the detected technology.
          example: "Cloudflare"
        category:
          type: string
          description: Technology category.
          enum: [server, framework, cdn, cms, js_framework, js_library, css_framework, analytics, security, widget, font, platform, ecommerce, monitoring, marketing, chat]
          example: "cdn"
        confidence:
          type: string
          description: Detection confidence level.
          enum: [high, medium, low]
          example: "high"
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
          example: "Rate limit exceeded. Max 5 requests per minute."
