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

# Search content

> Search the Kanarie content index with a JSON body. Supports API key auth or x402 fallback.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/content/search
openapi: 3.1.0
info:
  title: Kanarie API
  description: >-
    Crypto content search, project intelligence, mindshare, fundamentals, and
    wallet data APIs.
  version: 1.0.0
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.kanarie.xyz
    description: Production
security:
  - bearerAuth: []
  - kanarieApiKey: []
tags:
  - name: Health
    description: Service health endpoints.
  - name: Content
    description: Search content and rank project or handle mentions.
  - name: Projects
    description: Search, filter, map, and analyze crypto projects.
  - name: Data
    description: Virality and fundamentals datasets.
  - name: Wallets
    description: Smart money and wallet PnL datasets.
paths:
  /api/v1/content/search:
    post:
      tags:
        - Content
      summary: Search content
      description: >-
        Search the Kanarie content index with a JSON body. Supports API key auth
        or x402 fallback.
      operationId: postContentSearch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentSearchRequest'
            examples:
              semantic:
                summary: Semantic content search
                value:
                  search_mode: semantic
                  query: latest DeFi trends on Solana
                  content_types:
                    - posts
                    - tweets
                    - news
                  ecosystems:
                    - solana
                  limit: 10
                  include_analysis: true
              recent:
                summary: Recent content by ecosystem and category
                value:
                  search_mode: recent
                  content_types:
                    - posts
                    - tweets
                  ecosystems:
                    - ethereum
                    - solana
                  categories:
                    - defi
                    - ai
                  days_back: 7
                  limit: 25
      responses:
        '200':
          $ref: '#/components/responses/ContentSearchSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ContentSearchRequest:
      type: object
      properties:
        search_mode:
          $ref: '#/components/schemas/SearchMode'
        query:
          type: string
          description: >-
            Semantic query string. Required when search_mode is semantic and
            recommended when search_mode is auto.
        content_types:
          type: array
          items:
            $ref: '#/components/schemas/ContentType'
          description: Content surfaces to search.
          default:
            - posts
            - news
            - developments
            - tweets
            - youtube
        limit:
          type: integer
          description: Maximum number of content items to return.
          minimum: 1
          maximum: 100
          default: 25
        days_back:
          type: integer
          description: Lookback window for recent and auto searches.
          minimum: 1
          maximum: 90
          default: 7
        sort_by:
          $ref: '#/components/schemas/ContentSortBy'
        minimum_relevance_score:
          type: number
          description: >-
            Minimum relevance threshold used to suppress lower-quality semantic
            matches.
          minimum: 0
          maximum: 1
          default: 0.2
        ecosystems:
          type: array
          description: Ecosystem slug filters. Supports up to 5 values.
          maxItems: 5
          items:
            type: string
            enum:
              - bitcoin
              - ethereum
              - solana
              - base
              - optimism
              - arbitrum
              - celestia
              - monad
              - binance-smart-chain
              - bsc
              - megaeth
              - eclipse
              - movement
              - aptos
              - sui
              - avalanche
              - polygon
              - scroll
              - berachain
              - sonic
              - hyperliquid
              - unichain
              - near
              - hedera
              - ronin
              - cosmos
              - ripple
              - bittensor
              - virtuals
              - telegram
              - ton
              - tron
              - cardano
              - zksync
              - blast
              - linea
              - stacks
              - celo
              - starknet
              - sei
              - farcaster
              - abstract
          example:
            - solana
        categories:
          type: array
          description: Category slug filters. Supports up to 5 values.
          maxItems: 5
          items:
            type: string
            enum:
              - defi
              - derivatives
              - rwas
              - rwa
              - nfts
              - nft
              - gaming
              - ai
              - socialfi
              - daos
              - dao
              - memecoins
              - memecoin
              - stablecoins
              - stablecoin
              - ecosystems
              - rollups
              - rollup
              - zk
              - interoperability
              - depin
              - wallets
              - wallet
              - consumer
              - robotics
              - prediction-markets
          example:
            - defi
        project_ids:
          type: array
          description: Project IDs to restrict the search to specific projects.
          maxItems: 25
          items:
            type: integer
        image_limit:
          type: integer
          description: Maximum number of images to include per content item.
          minimum: 1
          maximum: 10
        include_analysis:
          type: boolean
          description: Include AI-generated analysis for semantic searches.
          default: false
        snippet_limit:
          type:
            - integer
            - 'null'
          description: >-
            Maximum number of relevant text snippets to include per item when a
            query is provided.
          minimum: 1
          maximum: 5
    SearchMode:
      type: string
      description: >-
        Search strategy. Use recent for chronological filtering, semantic for
        similarity search, or auto to let Kanarie choose.
      enum:
        - recent
        - semantic
        - auto
      default: auto
    ContentType:
      type: string
      description: Type of content item to include in search results.
      enum:
        - posts
        - news
        - developments
        - tweets
        - youtube
    ContentSortBy:
      type: string
      description: >-
        Result ordering. Use relevance for scored results or date for
        newest-first results.
      enum:
        - date
        - relevance
      default: relevance
    ContentSearchResponse:
      type: object
      required:
        - success
        - error
        - content
      properties:
        success:
          type: boolean
        error:
          type:
            - string
            - 'null'
        content:
          type: array
          items:
            $ref: '#/components/schemas/ObjectAny'
        analysis:
          $ref: '#/components/schemas/ObjectAny'
        metadata:
          $ref: '#/components/schemas/ObjectAny'
      additionalProperties: true
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        details:
          type: array
          items:
            type: string
        reason:
          type: string
      additionalProperties: true
    PaymentRequiredResponse:
      type: object
      required:
        - x402Version
        - error
        - accepts
      properties:
        x402Version:
          type: integer
          example: 2
        error:
          type: string
          example: Payment required
        accepts:
          type: array
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
    RateLimitResponse:
      type: object
      required:
        - error
        - limit
        - plan
        - window
        - retryAfter
      properties:
        error:
          type: string
          example: Rate limit exceeded
        limit:
          type: integer
        plan:
          type: string
          enum:
            - free
            - casual
            - pro
            - enterprise
          example: casual
        window:
          type: string
          example: 15 minutes
        retryAfter:
          type: integer
          example: 900
    ObjectAny:
      type: object
      additionalProperties: true
  responses:
    ContentSearchSuccess:
      description: Content search results.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ContentSearchResponse'
          examples:
            success:
              value:
                success: true
                error: null
                content:
                  - title: DeFi TVL hits new highs
                    summary: Example content item
                    source_name: twitter
                metadata:
                  total_results: 1
                  limit: 10
    BadRequest:
      description: The request body or query parameters failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            validation:
              value:
                error: Validation failed
                details:
                  - limit must be a number between 1 and 100
    Unauthorized:
      description: The API key header is missing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing:
              value:
                error: >-
                  Missing API key. Expected Authorization: Bearer <api-key> or
                  x-kanarie-api-key: <api-key>.
    PaymentRequired:
      description: >-
        x402 payment is required when no API key is present, API-key auth fails
        client-side checks, or an API key exceeds plan limits on an x402-enabled
        endpoint.
      headers:
        X-Payment-Required:
          description: Encoded x402 payment requirements.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PaymentRequiredResponse'
    Forbidden:
      description: >-
        The API key is invalid, inactive, expired, or unauthorized for the
        request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalid:
              value:
                error: Invalid API key
    RateLimited:
      description: >-
        The API key exceeded a route limit on an API-key-only path. x402-enabled
        endpoints normally return payment requirements for over-limit requests.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitResponse'
    InternalError:
      description: The API encountered an internal error while processing the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal:
              value:
                error: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Kanarie API key
      description: >-
        Preferred Kanarie API key authentication using Authorization: Bearer
        <api-key>.
      x-default: YOUR_KANARIE_API_KEY
    kanarieApiKey:
      type: apiKey
      in: header
      name: x-kanarie-api-key
      description: Kanarie API key header for current clients.
      x-default: YOUR_KANARIE_API_KEY

````