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

# Semantic search grouped into categories

> Runs the same search as `POST /v1/discover/endpoints` and groups the matches into categories, with a match count for each. Use it to see which parts of the catalog fit a query. Counts only cover the top matches. The response has the same shape as `GET /public/v1/categories`.



## OpenAPI

````yaml https://monid.ai/openapi.json post /v1/discover/categories
openapi: 3.1.0
info:
  title: Monid API
  version: 0.1.0
  description: >-
    Agentic payment platform for data. Agents use it to discover and buy data on
    demand. Authenticated routes take a Monid API key as a Bearer token. Errors
    return `{ code, message }`. List endpoints use cursor pagination.
servers:
  - url: https://api.monid.ai
    description: Production
security: []
paths:
  /v1/discover/categories:
    post:
      tags:
        - Discover
      summary: Semantic search grouped into categories
      description: >-
        Runs the same search as `POST /v1/discover/endpoints` and groups the
        matches into categories, with a match count for each. Use it to see
        which parts of the catalog fit a query. Counts only cover the top
        matches. The response has the same shape as `GET /public/v1/categories`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscoverCategoriesRequest'
      responses:
        '200':
          description: Category nodes with semantic match counts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCategoriesResponse'
        '400':
          description: >-
            Bad request. The input failed validation, and `message` says which
            field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized. The API key is missing, invalid, expired or revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden. The API key lacks the scope this operation needs, or has
            no workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Rate limited. Wait the number of seconds in the `Retry-After`
            header, then retry. The `RateLimit-Limit`, `RateLimit-Remaining` and
            `RateLimit-Reset` headers describe the limit that applied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - Bearer: []
components:
  schemas:
    DiscoverCategoriesRequest:
      type: object
      properties:
        q:
          type: string
          minLength: 1
          maxLength: 1000
          description: Natural-language search query.
          example: twitter posts
        minScore:
          type: number
          minimum: 0
          maximum: 2
          description: >-
            Per-call override for the post-rerank score floor — same semantics
            as the legacy POST /v1/discover body field.
          example: 0.2
        includeUnavailable:
          type: boolean
          default: false
          description: >-
            Endpoints currently in outage are hidden by default (the page is
            back-filled from the next ranked candidates). Set true to include
            them — marked `metrics.status: "outage"` and ranked last.
          example: false
        supportsX402:
          type: boolean
          description: >-
            Filter by static eligibility for x402 payment (`POST /x402/v1/run`):
            `true` keeps only payable endpoints, `false` only non-payable ones.
            Omit for all endpoints. Network availability and request/payment
            validation are checked at execution time.
        x402Network:
          type: string
          minLength: 1
          maxLength: 100
          description: >-
            Narrow to endpoints payable via x402 on this customer-payment
            network (CAIP-2 id, e.g. `eip155:8453`). Implies
            `supportsX402=true`; an unknown/unconfigured id returns an empty
            page.
          example: eip155:8453
        readonly:
          type: boolean
          description: >-
            Filter by whether running the endpoint has side effects: `true`
            keeps only endpoints that change nothing — they cannot create,
            modify or delete your workspace resources (phone numbers, files,
            asset libraries) and take no action outside their own response
            (placing a call, sending a message, submitting a form on a website);
            `false` keeps only endpoints that can. Omit for all endpoints. A
            readonly endpoint is still billed.
        effects:
          type: array
          items:
            type: string
            enum:
              - creates
              - updates
              - deletes
          minItems: 1
          description: >-
            Keep only endpoints whose run can have AT LEAST ONE of the named
            effects on your workspace resources (phone numbers, files, asset
            libraries): `creates`, `updates`, `deletes`. Omit for all endpoints.
            Takes precedence over `readonly`. Resource effects only — an
            endpoint with none of them may still take actions outside your
            workspace (`readonly=false` includes those) and is still billed.
          example:
            - creates
            - deletes
      required:
        - q
    PublicCategoriesResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PublicCategoryNode'
          description: >-
            Flat node list: tops (priority order) then leaves/providers
            (alphabetical). Hidden, unlinked, and zero-count nodes omitted.
        totalEndpointCount:
          type: integer
          minimum: 0
          description: >-
            Exact number of catalog-visible endpoints (with `q`: matching the
            query) — drives the All rail count.
      required:
        - items
        - totalEndpointCount
    Error:
      type: object
      properties:
        code:
          type: integer
          description: HTTP status code, duplicated in the body.
          example: 400
        message:
          type: string
          description: Human-readable error description.
          example: Bad Request
        errorCode:
          type: string
          enum:
            - BAD_REQUEST
            - VALIDATION_FAILED
            - INVALID_JSON
            - INVALID_CURSOR
            - UNAUTHENTICATED
            - FORBIDDEN
            - NOT_FOUND
            - CONFLICT
            - GONE
            - PAYLOAD_TOO_LARGE
            - INTERNAL_ERROR
            - NOT_IMPLEMENTED
            - BAD_GATEWAY
            - SERVICE_UNAVAILABLE
            - WALLET_NOT_ACTIVE
            - WALLET_PROVISIONING
            - WALLET_FAILED
            - RATE_LIMITED
            - X402_WORKSPACE_RESOURCES
            - X402_WORKSPACE_ONLY
            - X402_ACCRUING_COST
            - X402_EXCEEDS_SETTLEMENT_WINDOW
            - X402_VALIDITY_WINDOW_TOO_SHORT
            - X402_UNBOUNDED_PRICE
            - X402_SETTLEMENT_FAILED
            - MPP_WORKSPACE_RESOURCES
            - MPP_WORKSPACE_ONLY
            - MPP_ACCRUING_COST
            - MPP_UNBOUNDED_PRICE
            - MPP_PAYMENT_FAILED
            - MPP_CREDENTIAL_REPLAYED
            - MPP_PROOF_REQUIRED
            - MPP_UNAVAILABLE
            - INSUFFICIENT_SCOPE
            - WALLET_INSUFFICIENT_FUNDS
            - MAX_COST_EXCEEDED
            - IDEMPOTENCY_KEY_REUSED
            - IDEMPOTENCY_KEY_IN_USE
            - IDENTITY_PROVIDER_UNKNOWN
            - IDENTITY_LINK_REQUIRES_SESSION
            - IDENTITY_LINK_STATE_INVALID
            - IDENTITY_VERIFICATION_FAILED
            - IDENTITY_ASSURANCE_INSUFFICIENT
            - IDENTITY_PROVIDER_UNAVAILABLE
            - IDENTITY_ALREADY_LINKED
            - IDENTITY_USER_ALREADY_LINKED
            - IDENTITY_LINK_RATE_LIMITED
            - IDENTITY_REQUIRED
            - PROMO_IDENTITY_REDEEMED
            - PROMO_REDEEM_REQUIRES_SESSION
            - PROMO_CODE_REDEEMED_BY_WORKSPACE
            - PROMO_CODE_REDEEMED_BY_USER
            - PROMO_CODE_EXHAUSTED
            - PROMO_NEW_ACCOUNTS_ONLY
            - WEBHOOK_REQUIRES_SESSION
            - WEBHOOK_URL_NOT_ALLOWED
            - WEBHOOK_ENDPOINT_LIMIT
            - WEBHOOK_ROTATION_LIMIT
          description: >-
            Machine-readable reason, present on every error. Either a specific
            code (for example `MAX_COST_EXCEEDED`) or the generic code of the
            HTTP status (for example `NOT_FOUND`). Treat an unknown value as the
            generic meaning of the status.
        hints:
          type: object
          additionalProperties:
            anyOf:
              - type: string
              - type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - command
                      - discover
                      - inspect
                      - run
                      - getRun
                      - stop
                      - releaseResource
                      - topup
                  command:
                    type: string
                  query:
                    type: string
                  provider:
                    type: string
                  endpoint:
                    type: string
                  runId:
                    type: string
                  resourceId:
                    type: string
                  stripe:
                    type: string
                  dashboard:
                    type: string
                  docs:
                    type: string
                  comment:
                    type: string
                required:
                  - kind
          description: >-
            Optional next actions, rendered for the calling client like
            run-response hints (e.g. the paid TinyFish version on a free-quota
            429 — spending permission required).
      required:
        - code
        - message
        - errorCode
    PublicCategoryNode:
      oneOf:
        - $ref: '#/components/schemas/TopCategoryNode'
        - $ref: '#/components/schemas/LeafCategoryNode'
        - $ref: '#/components/schemas/ProviderCategoryNode'
      discriminator:
        propertyName: kind
        mapping:
          top: '#/components/schemas/TopCategoryNode'
          category: '#/components/schemas/LeafCategoryNode'
          provider: '#/components/schemas/ProviderCategoryNode'
    TopCategoryNode:
      type: object
      properties:
        id:
          type: string
          description: Stable node id (e.g. "social-media", "twitter", "apify").
        displayName:
          type: string
          description: >-
            Display label — manifest copy for tops/leaves; resolved provider
            display name for provider nodes.
        description:
          type: string
          description: Short blurb, when available.
        endpointCount:
          type: integer
          minimum: 0
          description: >-
            Live endpoint count (with `q`: endpoints matching the query). Top
            counts are DISTINCT-document counts across their members.
        noMarkup:
          type: string
          enum:
            - all
            - partial
            - none
          description: >-
            DEPRECATED — use `tags` (`no-markup` / `no-markup-partial`). `all`:
            every endpoint in this node is tagged `no-markup` (provider's
            standard rate, no platform fee). `partial`: at least half are.
            `none`: fewer than half. Same scope as `endpointCount`.
          example: all
          deprecated: true
        tags:
          type: array
          items:
            type: string
          description: >-
            Chips, computed per request: the ONE label every active promotion in
            this node shares (e.g. "50% off"), else `promotion` when they
            differ; `free` (a free tier); `no-markup` (every endpoint at the
            provider's standard rate) or `no-markup-partial` (at least half).
            Any tag other than `free`, `promotion`, `no-markup` and
            `no-markup-partial` is a promotion label.
          example:
            - 50% off
            - no-markup
        kind:
          type: string
          enum:
            - top
          description: System group node.
        children:
          type: array
          items:
            type: string
          description: >-
            Ordered member node ids (linked leaves in display order, then
            provider nodes).
      required:
        - id
        - displayName
        - endpointCount
        - noMarkup
        - tags
        - kind
        - children
    LeafCategoryNode:
      type: object
      properties:
        id:
          type: string
          description: Stable node id (e.g. "social-media", "twitter", "apify").
        displayName:
          type: string
          description: >-
            Display label — manifest copy for tops/leaves; resolved provider
            display name for provider nodes.
        description:
          type: string
          description: Short blurb, when available.
        endpointCount:
          type: integer
          minimum: 0
          description: >-
            Live endpoint count (with `q`: endpoints matching the query). Top
            counts are DISTINCT-document counts across their members.
        noMarkup:
          type: string
          enum:
            - all
            - partial
            - none
          description: >-
            DEPRECATED — use `tags` (`no-markup` / `no-markup-partial`). `all`:
            every endpoint in this node is tagged `no-markup` (provider's
            standard rate, no platform fee). `partial`: at least half are.
            `none`: fewer than half. Same scope as `endpointCount`.
          example: all
          deprecated: true
        tags:
          type: array
          items:
            type: string
          description: >-
            Chips, computed per request: the ONE label every active promotion in
            this node shares (e.g. "50% off"), else `promotion` when they
            differ; `free` (a free tier); `no-markup` (every endpoint at the
            provider's standard rate) or `no-markup-partial` (at least half).
            Any tag other than `free`, `promotion`, `no-markup` and
            `no-markup-partial` is a promotion label.
          example:
            - 50% off
            - no-markup
        kind:
          type: string
          enum:
            - category
          description: Leaf category node.
        shortDescription:
          type: string
          description: >-
            Short tile copy (at most 88 characters) for the Tools directory
            tile. Authored separately from `description`, which stays the
            category/provider page copy.
          example: Profiles, posts, hashtags and comments from Instagram.
        parents:
          type: array
          items:
            type: string
          description: Top ids this leaf is linked under (a leaf may have several parents).
      required:
        - id
        - displayName
        - endpointCount
        - noMarkup
        - tags
        - kind
        - shortDescription
        - parents
    ProviderCategoryNode:
      type: object
      properties:
        id:
          type: string
          description: Stable node id (e.g. "social-media", "twitter", "apify").
        displayName:
          type: string
          description: >-
            Display label — manifest copy for tops/leaves; resolved provider
            display name for provider nodes.
        description:
          type: string
          description: Short blurb, when available.
        endpointCount:
          type: integer
          minimum: 0
          description: >-
            Live endpoint count (with `q`: endpoints matching the query). Top
            counts are DISTINCT-document counts across their members.
        noMarkup:
          type: string
          enum:
            - all
            - partial
            - none
          description: >-
            DEPRECATED — use `tags` (`no-markup` / `no-markup-partial`). `all`:
            every endpoint in this node is tagged `no-markup` (provider's
            standard rate, no platform fee). `partial`: at least half are.
            `none`: fewer than half. Same scope as `endpointCount`.
          example: all
          deprecated: true
        tags:
          type: array
          items:
            type: string
          description: >-
            Chips, computed per request: the ONE label every active promotion in
            this node shares (e.g. "50% off"), else `promotion` when they
            differ; `free` (a free tier); `no-markup` (every endpoint at the
            provider's standard rate) or `no-markup-partial` (at least half).
            Any tag other than `free`, `promotion`, `no-markup` and
            `no-markup-partial` is a promotion label.
          example:
            - 50% off
            - no-markup
        kind:
          type: string
          enum:
            - provider
          description: Derived provider node.
        shortDescription:
          type: string
          description: >-
            Short tile copy (at most 88 characters) for the Tools directory
            tile. Authored separately from `description`, which stays the
            category/provider page copy.
          example: AI-powered web search with page content, highlights and summaries.
        provider:
          type: string
          description: Provider slug.
        url:
          type: string
          format: uri
          description: >-
            The provider's own public website, when it declares one
            (`ProviderInfo.url`). Absent otherwise — never null, never empty.
            Provider nodes only: a leaf/top category has no vendor to link to.
            This is display copy, NOT the endpoint-level documentation URL
            (`docUrl`).
          example: https://context.dev
        docsUrl:
          type: string
          format: uri
          description: >-
            The provider's own API documentation, when known
            (`ProviderInfo.docsUrl`). Provider nodes only; absent otherwise.
          example: https://docs.context.dev
        parents:
          type: array
          items:
            type: string
          description: >-
            Top ids this provider node is linked under (a node may have several
            parents).
      required:
        - id
        - displayName
        - endpointCount
        - noMarkup
        - tags
        - kind
        - shortDescription
        - provider
        - parents
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      description: Monid API key
      x-aep-authentication-method: api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.