Stashr Search API

Hybrid semantic + keyword search

GitHub OpenAPI

Operations 1

POST /v1/search Search bookmarks #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/stashr-me:stashr-me-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

stashr-me-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@stashr.me
    name: Stashr support
    url: https://stashr.me/contact
  description: 'Agent- and CLI-focused access to a user''s Stashr library: search by meaning, read saves in full, save URLs, and manage tags, notes, favorites, and collections. Authenticate with a scoped stashr_ API key (Settings → API keys) or an OAuth token audience-bound to /v1. GET /v1 needs no credential and describes the API. Every response carries X-Request-Id and RateLimit headers (240 requests per minute per account; see RateLimit-Policy). Versioning: the major version is in the path (/v1). Backwards-compatible additions (new fields, endpoints, enum values, filters) ship without a version bump; breaking changes get a new major version, and the old one keeps working for at least 6 months after the replacement ships and is announced with Deprecation and Sunset headers plus a Link rel="deprecation" on the affected endpoints. Deprecation policy: https://stashr.me/docs/api-versioning'
  termsOfService: https://stashr.me/terms
  title: Stashr Search API
  version: 1.0.0
servers:
- description: Production
  url: https://stashr.me
security:
- bearerAuth: []
tags:
- description: Hybrid semantic + keyword search
  name: Search
paths:
  /v1/search:
    post:
      description: Search whole bookmarks or rank individual images by their AI vision captions, using the same hybrid semantic + keyword engine as the web app. Image-ranked pages include tileOrder entries with bookmarkId, ref, and caption. Ranking covers the top 200 fused candidates — narrow with filters rather than paging deep. Cursors are bound to their query/filters/state; reusing one with different inputs returns 422.
      operationId: searchBookmarks
      requestBody:
        content:
          application/json:
            schema:
              properties:
                cursor:
                  description: nextCursor value from the previous page of the same search
                  type: string
                filters:
                  $ref: '#/components/schemas/BookmarkFilters'
                limit:
                  maximum: 100
                  minimum: 1
                  type: integer
                query:
                  description: What to look for, 1 to 200 characters
                  maxLength: 200
                  minLength: 1
                  type: string
                rankMode:
                  default: post
                  description: post ranks whole bookmarks; image ranks individual images by caption
                  enum:
                  - post
                  - image
                  type: string
                state:
                  default: active
                  enum:
                  - active
                  - archived
                  - all
                  type: string
                view:
                  default: full
                  description: summary returns a compact page (bounded snippets, no raw content) — prefer it for agent discovery
                  enum:
                  - full
                  - summary
                  type: string
              required:
              - query
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    oneOf:
                    - $ref: '#/components/schemas/BookmarkPage'
                    - $ref: '#/components/schemas/BookmarkSummaryPage'
                required:
                - data
                type: object
          description: One page of ranked results (full or summary view)
          headers:
            RateLimit-Policy:
              description: The limiter policy, e.g. "per-minute";q=240;w=60 (quota q per window of w seconds)
              schema:
                type: string
            RateLimit:
              description: Live window state, e.g. "per-minute";r=239;t=58 (r requests remaining, t seconds until reset)
              schema:
                type: string
            RateLimit-Limit:
              schema:
                type: integer
            RateLimit-Remaining:
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the window resets (delta, not epoch)
              schema:
                type: integer
            X-Request-Id:
              description: Echoes the request's X-Request-Id, or a generated id
              schema:
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Malformed request (error.code bad_request or invalid_json)
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Missing, invalid, or expired credentials (error.code unauthorized)
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: A Pro plan or active trial is required (error.code payment_required)
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: The credential lacks the required scope (error.code forbidden)
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: The resource does not exist or belongs to another account (error.code not_found)
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Validation failed; error.details.issues lists the fields (error.code validation_error)
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too many requests (error.code rate_limited); wait Retry-After seconds, also given as error.retryAfterMs
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Something failed on Stashr's side (error.code internal_error); retryable
      summary: Search bookmarks
      tags:
      - Search
components:
  schemas:
    BookmarkPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Bookmark'
          type: array
        nextCursor:
          nullable: true
          type: string
        searchDegraded:
          description: 'Present when search retrieval quality was reduced: semantic_unavailable (embedding failed, lexical-only) or image_rank_unavailable (no captions, fell back to post ranking)'
          items:
            enum:
            - semantic_unavailable
            - image_rank_unavailable
            type: string
          type: array
      required:
      - items
      - nextCursor
      type: object
    Media:
      properties:
        altText:
          nullable: true
          type: string
        duration:
          nullable: true
          type: number
        height:
          nullable: true
          type: integer
        ref:
          description: Stable media ref usable with the media preview
          type: string
        storedUrl:
          nullable: true
          type: string
        thumbUrl:
          description: 800px webp derivative of storedUrl, when generated. Prefer it for previews/grids; storedUrl is the full-resolution archive.
          nullable: true
          type: string
        type:
          enum:
          - image
          - video
          type: string
        url:
          type: string
        width:
          nullable: true
          type: integer
      required:
      - ref
      - type
      - url
      type: object
    Author:
      nullable: true
      properties:
        avatarUrl:
          nullable: true
          type: string
        displayName:
          nullable: true
          type: string
        profileUrl:
          nullable: true
          type: string
        username:
          type: string
      required:
      - username
      type: object
    BookmarkFilters:
      properties:
        authorMode:
          default: include
          enum:
          - include
          - exclude
          type: string
        authors:
          items:
            description: An author username ("naval"), optionally platform-scoped ("twitter:naval")
            type: string
          type: array
        capturedAfter:
          description: Only bookmarks saved on/after this ISO-8601 date or datetime (inclusive)
          type: string
        capturedBefore:
          description: Only bookmarks saved before this ISO-8601 date or datetime (exclusive)
          type: string
        capturedWithin:
          description: Only bookmarks saved in the last N days, as "<N>d" (1d–3650d), counted in UTC days including today. "7d" = today and the 6 days before
          pattern: ^[1-9][0-9]{0,3}d$
          type: string
        contentTypeMode:
          default: include
          enum:
          - include
          - exclude
          type: string
        contentTypes:
          items:
            description: 'A content type ("article"), optionally platform-scoped ("twitter:article"). Valid types: repo, image, post, video, comment, article, page, snippet, event, link, listing'
            type: string
          type: array
        excludeTags:
          items:
            description: A tag name the bookmark must not have (ANDed with tags/tagMode). "__untagged__" excludes untagged bookmarks
            type: string
          type: array
        favorite:
          items:
            enum:
            - favorite
            - not-favorite
            type: string
          type: array
        media:
          items:
            enum:
            - image
            - video
            - any-media
            - text-only
            type: string
          type: array
        mediaMode:
          default: include
          enum:
          - include
          - exclude
          type: string
        note:
          items:
            enum:
            - has-note
            - no-note
            type: string
          type: array
        platformMode:
          default: include
          enum:
          - include
          - exclude
          type: string
        platforms:
          items:
            description: Platform id. X/Twitter is "twitter".
            enum:
            - github
            - instagram
            - reddit
            - linkedin
            - tiktok
            - twitter
            - web
            - youtube
            - facebook
            - hackernews
            type: string
          type: array
        postedAfter:
          description: Only bookmarks originally posted on/after this ISO-8601 date or datetime (inclusive). Bookmarks without a known post date are excluded
          type: string
        postedBefore:
          description: Only bookmarks originally posted before this ISO-8601 date or datetime (exclusive). Bookmarks without a known post date are excluded
          type: string
        postedWithin:
          description: Only bookmarks originally posted in the last N days, as "<N>d" (1d–3650d), counted in UTC days including today. Bookmarks without a known post date are excluded
          pattern: ^[1-9][0-9]{0,3}d$
          type: string
        tagMode:
          default: include_any
          enum:
          - include_any
          - include_all
          - exclude_any
          - exclude_all
          type: string
        tags:
          items:
            description: A tag name from /v1/tags
            type: string
          type: array
      type: object
    Tag:
      properties:
        color:
          type: string
        count:
          description: Active bookmarks currently carrying this tag
          type: integer
        id:
          format: uuid
          type: string
        name:
          type: string
      required:
      - id
      - name
      - color
      - count
      type: object
    BookmarkSummaryPage:
      properties:
        degraded:
          description: Present when search retrieval quality was reduced; see BookmarkPage.searchDegraded
          items:
            enum:
            - semantic_unavailable
            - image_rank_unavailable
            type: string
          type: array
        items:
          items:
            $ref: '#/components/schemas/BookmarkSummaryHit'
          type: array
        nextCursor:
          nullable: true
          type: string
        rankMode:
          description: The ranking that actually ran
          enum:
          - post
          - image
          type: string
        requestedRankMode:
          description: Present only when rankMode differs from what was requested
          enum:
          - post
          - image
          type: string
      required:
      - items
      - nextCursor
      - rankMode
      type: object
    Bookmark:
      additionalProperties: true
      properties:
        author:
          $ref: '#/components/schemas/Author'
        capturedAt:
          format: date-time
          type: string
        content:
          description: Portable Text blocks holding the full body
          items:
            type: object
          type: array
        contentCreatedAt:
          format: date-time
          nullable: true
          type: string
        contentType:
          description: 'One of: repo, image, post, video, comment, article, page, snippet, event, link, listing'
          type: string
        deletedAt:
          format: date-time
          nullable: true
          type: string
        id:
          format: uuid
          type: string
        isFavorite:
          type: boolean
        media:
          items:
            $ref: '#/components/schemas/Media'
          type: array
        note:
          nullable: true
          type: string
        platform:
          description: Platform id. X/Twitter is "twitter".
          enum:
          - github
          - instagram
          - reddit
          - linkedin
          - tiktok
          - twitter
          - web
          - youtube
          - facebook
          - hackernews
          type: string
        platformId:
          type: string
        tags:
          items:
            $ref: '#/components/schemas/Tag'
          type: array
        title:
          description: Present on titled content such as X articles
          nullable: true
          type: string
        url:
          format: uri
          type: string
      required:
      - id
      - platform
      - contentType
      - url
      - tags
      - content
      - media
      - capturedAt
      type: object
    BookmarkSummaryHit:
      description: 'Compact discovery view of a bookmark: bounded text snippet, tag names, and lightweight media refs — no raw content blocks or platformData.'
      properties:
        archived:
          type: boolean
        author:
          nullable: true
          type: string
        capturedAt:
          format: date-time
          type: string
        contentCreatedAt:
          format: date-time
          nullable: true
          type: string
        contentType:
          type: string
        favorite:
          type: boolean
        id:
          format: uuid
          type: string
        matchedMedia:
          description: 'Present on image-ranked search hits: the ranked image and its AI caption'
          properties:
            altText:
              nullable: true
              type: string
            caption:
              type: string
            height:
              nullable: true
              type: integer
            ref:
              type: string
            type:
              type: string
            url:
              nullable: true
              type: string
            width:
              nullable: true
              type: integer
          type: object
        media:
          items:
            properties:
              altText:
                nullable: true
                type: string
              ref:
                type: string
              type:
                type: string
            required:
            - ref
            - type
            type: object
          type: array
        mediaCount:
          type: integer
        platform:
          type: string
        tags:
          items:
            type: string
          type: array
        text:
          description: Bounded plain-text snippet (max 600 chars)
          type: string
        title:
          description: Real title only; null when the source has none
          nullable: true
          type: string
        url:
          type: string
      required:
      - id
      - title
      - url
      - platform
      - contentType
      - author
      - capturedAt
      - contentCreatedAt
      - favorite
      - archived
      - tags
      - text
      - media
      - mediaCount
      type: object
    ErrorEnvelope:
      description: The one error shape every 4xx and 5xx response uses. Branch on error.code, show error.message to humans, and retry only when error.retryable is true.
      properties:
        error:
          properties:
            code:
              description: Stable machine-readable code
              enum:
              - bad_request
              - forbidden
              - internal_error
              - invalid_json
              - not_found
              - payment_required
              - rate_limited
              - unauthorized
              - validation_error
              type: string
            details:
              description: 'Code-specific context: validation issues, allowed values, or resolution hints'
            message:
              description: Human-readable explanation
              type: string
            retryAfterMs:
              description: 'Present on 429: how long to wait before retrying, matching the Retry-After header'
              type: integer
            retryable:
              description: True for rate limits and server errors, false for anything the caller must change
              type: boolean
          required:
          - code
          - message
          - retryable
          type: object
        requestId:
          description: Correlates with the X-Request-Id header
          type: string
      required:
      - error
      - requestId
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: Stashr OAuth access token or API key
      description: Use an OAuth access token audience-bound to /v1, or a scoped stashr_ API key for non-interactive clients.
      scheme: bearer
      type: http
externalDocs:
  description: Stashr API reference (human docs; add .md for Markdown)
  url: https://stashr.me/docs/api
x-deprecation-policy:
  breakingChanges: Shipped as a new major version (/v2) alongside the old one, never in place
  deprecationSignals:
  - Deprecation header (RFC 9745) with the date it took effect
  - Sunset header (RFC 8594) with the date it stops working
  - 'Link: <migration notes>; rel="deprecation"'
  minimumNoticeMonths: 6
  url: https://stashr.me/docs/api-versioning
  versioning: URL path (/v1)