Unsplash · Capability

Unsplash API — Topics

Unsplash API — Topics. 3 operations. Lead operation: List Topics. Self-contained Naftiko capability covering one Unsplash business surface.

Run with Naftiko UnsplashTopics

What You Can Do

GET
Listtopics — List Topics
/v1/topics
GET
Gettopic — Get a Topic
/v1/topics/{id-or-slug}
GET
Gettopicphotos — Get Topic Photos
/v1/topics/{id-or-slug}/photos

MCP Tools

list-topics

List Topics

read-only idempotent
get-topic

Get a Topic

read-only idempotent
get-topic-photos

Get Topic Photos

read-only idempotent

Capability Spec

unsplash-topics.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Unsplash API — Topics
  description: 'Unsplash API — Topics. 3 operations. Lead operation: List Topics. Self-contained Naftiko capability covering
    one Unsplash business surface.'
  tags:
  - Unsplash
  - Topics
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    UNSPLASH_API_KEY: UNSPLASH_API_KEY
capability:
  consumes:
  - type: http
    namespace: unsplash-topics
    baseUri: https://api.unsplash.com
    description: Unsplash API — Topics business capability. Self-contained, no shared references.
    resources:
    - name: topics
      path: /topics
      operations:
      - name: listtopics
        method: GET
        description: List Topics
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ids
          in: query
          type: string
          description: Comma-separated list of topic IDs or slugs to filter
        - name: page
          in: query
          type: integer
        - name: per_page
          in: query
          type: integer
        - name: order_by
          in: query
          type: string
    - name: topics-id_or_slug
      path: /topics/{id_or_slug}
      operations:
      - name: gettopic
        method: GET
        description: Get a Topic
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id_or_slug
          in: path
          type: string
          description: Topic ID or slug
          required: true
    - name: topics-id_or_slug-photos
      path: /topics/{id_or_slug}/photos
      operations:
      - name: gettopicphotos
        method: GET
        description: Get Topic Photos
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id_or_slug
          in: path
          type: string
          description: Topic ID or slug
          required: true
        - name: page
          in: query
          type: integer
        - name: per_page
          in: query
          type: integer
        - name: orientation
          in: query
          type: string
        - name: order_by
          in: query
          type: string
    authentication:
      type: bearer
      token: '{{env.UNSPLASH_API_KEY}}'
  exposes:
  - type: rest
    namespace: unsplash-topics-rest
    port: 8080
    description: REST adapter for Unsplash API — Topics. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/topics
      name: topics
      description: REST surface for topics.
      operations:
      - method: GET
        name: listtopics
        description: List Topics
        call: unsplash-topics.listtopics
        with:
          ids: rest.ids
          page: rest.page
          per_page: rest.per_page
          order_by: rest.order_by
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/topics/{id-or-slug}
      name: topics-id-or-slug
      description: REST surface for topics-id_or_slug.
      operations:
      - method: GET
        name: gettopic
        description: Get a Topic
        call: unsplash-topics.gettopic
        with:
          id_or_slug: rest.id_or_slug
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/topics/{id-or-slug}/photos
      name: topics-id-or-slug-photos
      description: REST surface for topics-id_or_slug-photos.
      operations:
      - method: GET
        name: gettopicphotos
        description: Get Topic Photos
        call: unsplash-topics.gettopicphotos
        with:
          id_or_slug: rest.id_or_slug
          page: rest.page
          per_page: rest.per_page
          orientation: rest.orientation
          order_by: rest.order_by
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: unsplash-topics-mcp
    port: 9090
    transport: http
    description: MCP adapter for Unsplash API — Topics. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-topics
      description: List Topics
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: unsplash-topics.listtopics
      with:
        ids: tools.ids
        page: tools.page
        per_page: tools.per_page
        order_by: tools.order_by
      outputParameters:
      - type: object
        mapping: $.
    - name: get-topic
      description: Get a Topic
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: unsplash-topics.gettopic
      with:
        id_or_slug: tools.id_or_slug
      outputParameters:
      - type: object
        mapping: $.
    - name: get-topic-photos
      description: Get Topic Photos
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: unsplash-topics.gettopicphotos
      with:
        id_or_slug: tools.id_or_slug
        page: tools.page
        per_page: tools.per_page
        orientation: tools.orientation
        order_by: tools.order_by
      outputParameters:
      - type: object
        mapping: $.