Stack Exchange · Capability

Stack Exchange API v2.3 — Badges

Badges surface of the Stack Exchange API. 5 operations. Lead operation: List Badges. Self-contained Naftiko capability covering one Stack Exchange business surface.

Run with Naftiko Stack ExchangeQ And ABadges

What You Can Do

GET
Listbadges — List Badges
/v1/badges
GET
Getbadgesbyids — Get Badges by Ids
/v1/badges/{ids}
GET
Listbadgerecipients — List Badge Recipients
/v1/badges/{ids}/recipients
GET
Listnamedbadges — List Named Badges
/v1/badges/name
GET
Listtagbasedbadges — List Tag-Based Badges
/v1/badges/tags

MCP Tools

list-badges

List Badges

read-only idempotent
get-badges-ids

Get Badges by Ids

read-only idempotent
list-badge-recipients

List Badge Recipients

read-only idempotent
list-named-badges

List Named Badges

read-only idempotent
list-tag-based-badges

List Tag-Based Badges

read-only idempotent

Capability Spec

stack-exchange-badges.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stack Exchange API v2.3 — Badges
  description: 'Badges surface of the Stack Exchange API. 5 operations. Lead operation: List Badges. Self-contained Naftiko capability covering one Stack Exchange business surface.'
  tags:
  - Stack Exchange
  - Q And A
  - Badges
  created: '2026-05-29'
  modified: '2026-05-29'
binds:
- namespace: env
  keys:
    STACK_EXCHANGE_KEY: STACK_EXCHANGE_KEY
    STACK_EXCHANGE_ACCESS_TOKEN: STACK_EXCHANGE_ACCESS_TOKEN
capability:
  consumes:
  - type: http
    namespace: stack-exchange-badges
    baseUri: https://api.stackexchange.com/2.3
    description: Stack Exchange API v2.3 — Badges business capability. Self-contained, no shared references.
    authentication:
      type: apikey
      key: key
      value: '{{env.STACK_EXCHANGE_KEY}}'
      placement: query
    resources:
    - name: badges
      path: /badges
      operations:
      - name: listBadges
        method: GET
        description: List Badges
        inputParameters:
        - name: site
          in: query
          type: string
          required: true
          description: Target Q&A community. Either the api_site_parameter from a `/sites` entry (e.g. `stackoverflow`, `serverfault`, `superuser`) or a full domain (`stackoverflow.com`).
        - name: key
          in: query
          type: string
          required: false
          description: App key from stackapps.com. Raises the daily quota to 10,000/IP.
        - name: filter
          in: query
          type: string
          required: false
          description: Custom response filter id created via /filters/create.
        - name: page
          in: query
          type: integer
          required: false
          description: 1-indexed page number.
        - name: pagesize
          in: query
          type: integer
          required: false
          description: Items per page (max 100).
        - name: sort
          in: query
          type: string
          required: false
          description: sort parameter
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: badges-ids
      path: /badges/{ids}
      operations:
      - name: getBadgesByIds
        method: GET
        description: Get Badges by Ids
        inputParameters:
        - name: ids
          in: path
          type: string
          required: true
          description: Up to 100 semicolon-delimited ids of the resource.
        - name: site
          in: query
          type: string
          required: true
          description: Target Q&A community. Either the api_site_parameter from a `/sites` entry (e.g. `stackoverflow`, `serverfault`, `superuser`) or a full domain (`stackoverflow.com`).
        - name: key
          in: query
          type: string
          required: false
          description: App key from stackapps.com. Raises the daily quota to 10,000/IP.
        - name: filter
          in: query
          type: string
          required: false
          description: Custom response filter id created via /filters/create.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: badges-ids-recipients
      path: /badges/{ids}/recipients
      operations:
      - name: listBadgeRecipients
        method: GET
        description: List Badge Recipients
        inputParameters:
        - name: ids
          in: path
          type: string
          required: true
          description: Up to 100 semicolon-delimited ids of the resource.
        - name: site
          in: query
          type: string
          required: true
          description: Target Q&A community. Either the api_site_parameter from a `/sites` entry (e.g. `stackoverflow`, `serverfault`, `superuser`) or a full domain (`stackoverflow.com`).
        - name: key
          in: query
          type: string
          required: false
          description: App key from stackapps.com. Raises the daily quota to 10,000/IP.
        - name: filter
          in: query
          type: string
          required: false
          description: Custom response filter id created via /filters/create.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: badges-name
      path: /badges/name
      operations:
      - name: listNamedBadges
        method: GET
        description: List Named Badges
        inputParameters:
        - name: site
          in: query
          type: string
          required: true
          description: Target Q&A community. Either the api_site_parameter from a `/sites` entry (e.g. `stackoverflow`, `serverfault`, `superuser`) or a full domain (`stackoverflow.com`).
        - name: key
          in: query
          type: string
          required: false
          description: App key from stackapps.com. Raises the daily quota to 10,000/IP.
        - name: filter
          in: query
          type: string
          required: false
          description: Custom response filter id created via /filters/create.
        - name: page
          in: query
          type: integer
          required: false
          description: 1-indexed page number.
        - name: pagesize
          in: query
          type: integer
          required: false
          description: Items per page (max 100).
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: badges-tags
      path: /badges/tags
      operations:
      - name: listTagBasedBadges
        method: GET
        description: List Tag-Based Badges
        inputParameters:
        - name: site
          in: query
          type: string
          required: true
          description: Target Q&A community. Either the api_site_parameter from a `/sites` entry (e.g. `stackoverflow`, `serverfault`, `superuser`) or a full domain (`stackoverflow.com`).
        - name: key
          in: query
          type: string
          required: false
          description: App key from stackapps.com. Raises the daily quota to 10,000/IP.
        - name: filter
          in: query
          type: string
          required: false
          description: Custom response filter id created via /filters/create.
        - name: page
          in: query
          type: integer
          required: false
          description: 1-indexed page number.
        - name: pagesize
          in: query
          type: integer
          required: false
          description: Items per page (max 100).
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    namespace: stack-exchange-badges-rest
    port: 8080
    description: REST adapter for Stack Exchange API v2.3 — Badges. One Spectral-compliant resource per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/badges
      name: badges
      description: REST surface for badges.
      operations:
      - method: GET
        name: listBadges
        description: List Badges
        call: stack-exchange-badges.listBadges
        with:
          site: rest.site
          key: rest.key
          filter: rest.filter
          page: rest.page
          pagesize: rest.pagesize
          sort: rest.sort
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/badges/{ids}
      name: badges
      description: REST surface for badges.
      operations:
      - method: GET
        name: getBadgesByIds
        description: Get Badges by Ids
        call: stack-exchange-badges.getBadgesByIds
        with:
          ids: rest.ids
          site: rest.site
          key: rest.key
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/badges/{ids}/recipients
      name: recipients
      description: REST surface for badges.
      operations:
      - method: GET
        name: listBadgeRecipients
        description: List Badge Recipients
        call: stack-exchange-badges.listBadgeRecipients
        with:
          ids: rest.ids
          site: rest.site
          key: rest.key
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/badges/name
      name: name
      description: REST surface for badges.
      operations:
      - method: GET
        name: listNamedBadges
        description: List Named Badges
        call: stack-exchange-badges.listNamedBadges
        with:
          site: rest.site
          key: rest.key
          filter: rest.filter
          page: rest.page
          pagesize: rest.pagesize
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/badges/tags
      name: tags
      description: REST surface for badges.
      operations:
      - method: GET
        name: listTagBasedBadges
        description: List Tag-Based Badges
        call: stack-exchange-badges.listTagBasedBadges
        with:
          site: rest.site
          key: rest.key
          filter: rest.filter
          page: rest.page
          pagesize: rest.pagesize
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: stack-exchange-badges-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stack Exchange API v2.3 — Badges. One tool per consumed operation, routed inline through this capability's consumes block.
    tools:
    - name: list-badges
      description: List Badges
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-badges.listBadges
      with:
        site: tools.site
        key: tools.key
        filter: tools.filter
        page: tools.page
        pagesize: tools.pagesize
        sort: tools.sort
      outputParameters:
      - type: object
        mapping: $.
    - name: get-badges-ids
      description: Get Badges by Ids
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-badges.getBadgesByIds
      with:
        ids: tools.ids
        site: tools.site
        key: tools.key
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.
    - name: list-badge-recipients
      description: List Badge Recipients
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-badges.listBadgeRecipients
      with:
        ids: tools.ids
        site: tools.site
        key: tools.key
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.
    - name: list-named-badges
      description: List Named Badges
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-badges.listNamedBadges
      with:
        site: tools.site
        key: tools.key
        filter: tools.filter
        page: tools.page
        pagesize: tools.pagesize
      outputParameters:
      - type: object
        mapping: $.
    - name: list-tag-based-badges
      description: List Tag-Based Badges
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-badges.listTagBasedBadges
      with:
        site: tools.site
        key: tools.key
        filter: tools.filter
        page: tools.page
        pagesize: tools.pagesize
      outputParameters:
      - type: object
        mapping: $.