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

# Mixed Content



## OpenAPI

````yaml POST /mixedcontent
openapi: 3.1.0
info:
  title: Geekflare
  description: Official OpenAPI specification for all Geekflare endpoints.
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://api.geekflare.com
security:
  - x-api-key: []
paths:
  /mixedcontent:
    post:
      tags:
        - api-tool
      summary: Check for mixed content on a site
      operationId: mixedContent
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MixedContentDto'
      responses:
        '200':
          description: Site status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MixedContentResponseDto'
        '400':
          description: Invalid URL.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseErrorResponseDto'
              example:
                timestamp: 1700000000000
                apiStatus: failure
                apiCode: 400
                message: INVALID_URL
                details: The URL must be a valid HTTP or HTTPS URL.
        '422':
          description: Unable to connect to the target website.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseErrorResponseDto'
              example:
                timestamp: 1700000000000
                apiStatus: failure
                apiCode: 422
                message: UNABLE_TO_CONNECT
                details: >-
                  The destination server could not be resolved, refused the
                  connection, timed out, or is redirecting indefinitely.
        '500':
          description: Failed to check for mixed content.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseErrorResponseDto'
              example:
                timestamp: 1700000000000
                apiStatus: failure
                apiCode: 500
                message: MIXED_CONTENT_CHECK_FAILED
                details: Unable to analyze the target webpage for mixed content.
components:
  schemas:
    MixedContentDto:
      type: object
      properties:
        url:
          type: string
          description: Target URL
          example: https://example.com
        followRedirect:
          type: boolean
          description: Whether to follow redirects when checking site status
          example: false
          default: false
        proxyCountry:
          type: string
          description: Proxy country code to route the request
          example: us
      required:
        - url
    MixedContentResponseDto:
      type: object
      properties:
        timestamp:
          type: number
          description: Timestamp of the request in milliseconds
          example: 1783943217189
        apiStatus:
          type: string
          description: API status message
          example: success
          enum:
            - success
            - failure
        apiCode:
          type: number
          description: API status code
          example: 200
        message:
          type: string
          description: >-
            Indicates whether mixed content found or not. It can either be
            "Mixed content(s) found." or "No mixed content found."
          example: Mixed content(s) found.
        meta:
          description: Metadata about the mixed content test
          allOf:
            - $ref: '#/components/schemas/MixedContentMetaDto'
        data:
          description: >-
            Contains either an array of all resources (when no mixed content) or
            an object with insecure/secure arrays (when mixed content found)
          oneOf:
            - type: array
              items:
                type: string
              description: Simple array of all resources when no mixed content found
              example:
                - https://example.com/
                - https://example.com/style.css
                - https://example.com/script.js
            - $ref: '#/components/schemas/MixedContentDataDto'
      required:
        - timestamp
        - apiStatus
        - apiCode
        - message
        - meta
        - data
    BaseErrorResponseDto:
      type: object
      properties:
        timestamp:
          type: number
          description: Timestamp of the request in milliseconds
          example: 1778737930991
        apiStatus:
          type: string
          description: API status message
          example: success
          enum:
            - success
            - failure
        apiCode:
          type: number
          description: API status code
          example: 200
        message:
          type: string
          description: Error message
          example: Invalid URL provided
        details:
          type: string
          description: Detailed error information
          example: The URL must be a valid HTTP or HTTPS URL
      required:
        - timestamp
        - apiStatus
        - apiCode
        - message
    MixedContentMetaDto:
      type: object
      properties:
        url:
          type: string
          description: The tested URL
          example: https://example.com
        proxyCountry:
          type: string
          description: Country used for proxy
          example: United States
        followRedirect:
          type: boolean
          description: Indicates if redirects should be followed
          example: true
        redirectedURL:
          type: string
          description: Final URL after redirection (if any)
          example: https://example.com/
        test:
          description: Metadata about the test execution
          allOf:
            - $ref: '#/components/schemas/TestMetaDto'
      required:
        - url
        - test
    MixedContentDataDto:
      type: object
      properties:
        insecure:
          description: List of insecure (HTTP) resources found on the page
          example:
            - http://example.com/style.css
            - http://example.com/script.js
          type: array
          items:
            type: string
        secure:
          description: List of secure (HTTPS) resources found on the page
          example:
            - https://example.com/
            - https://fonts.googleapis.com/css?family=Open+Sans
            - data:image/svg+xml;base64,PHN2ZyB4bWxucz0i...
          type: array
          items:
            type: string
      required:
        - insecure
        - secure
    TestMetaDto:
      type: object
      properties:
        id:
          type: string
          description: Unique test identifier
          example: mxqx9v9y0742lap6altwdteqd28t23nq
      required:
        - id
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key required for all endpoints

````