LinkPeek System API

Service health, status, and discovery

OpenAPI Specification

linkpeek-system-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: LinkPeek System API
  description: 'Free, open-source URL preview and QR code API. Turn any URL into a clean

    JSON link-preview card and any string into a QR code — no signup, no API

    key required for the free tier (100 requests/day per IP).


    77+ developer utility endpoints covering link previews, QR codes,

    favicons, meta tags, DNS, SSL, security checks, and developer tools.

    Built for Discord/Telegram/Slack bots, bookmark apps, social clients,

    and anyone who needs link metadata without signup friction.


    **Quickstart:**

    ```

    curl "https://147.15.103.217.sslip.io:5000/api/preview?url=https://github.com"

    ```


    **Pricing:**

    - **Free** — 100 req/day, no auth, just call the endpoint.

    - **Trial** — 50,000 req/day, free 14-day API key via `/api/key?email=`.

    - **Pro** — 50,000 req/day, $1/mo via `/api/subscribe?email=`.


    Pro keys work immediately; attach `?key=lp_pro_...` to any metered

    endpoint to lift the daily quota to 50,000.

    '
  version: 1.19.1
  contact:
    name: LinkPeek
    url: https://github.com/dcn13l/hermes-autonomia
    email: linkpeek@example.com
servers:
- url: https://147.15.103.217.sslip.io:5000
  description: Live production server
security:
- {}
- ApiKeyAuth: []
tags:
- name: System
  description: Service health, status, and discovery
paths:
  /api/status:
    get:
      tags:
      - System
      summary: Service manifest and endpoint catalogue
      description: 'Self-describing service manifest — returns the current version,

        uptime, and the full list of dynamically-registered API routes

        with their allowed methods. Unmetered (no rate limit). The

        canonical discovery endpoint for SDK clients and landing pages.

        '
      responses:
        '200':
          description: Service status and route inventory.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
              example:
                ok: true
                service: LinkPeek
                version: 1.19.1
                uptime_seconds: 86412.5
                endpoints:
                - path: /api/preview
                  methods:
                  - GET
                - path: /api/qr
                  methods:
                  - GET
                - path: /api/status
                  methods:
                  - GET
                free_daily_limit: 100
                pro_daily_limit: 50000
                docs: /api/status
                health: /api/health
  /api/health:
    get:
      tags:
      - System
      summary: Health check
      description: 'Lightweight health check. Returns service status, today''s request

        count, and the active revenue/payment method. Suitable for

        uptime monitoring and load balancer health probes.

        '
      responses:
        '200':
          description: Service is healthy.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthResponse'
              example:
                ok: true
                today:
                  day: '2026-08-09'
                  count: 1542
                revenue:
                  pro_price_usd: 1
                  pay_method: paypal
                  subscribe_url: /api/subscribe?email=…
  /api/key:
    get:
      tags:
      - System
      summary: Issue a 14-day trial API key
      description: 'Issues a free 14-day trial API key (50,000 req/day), returned in

        the JSON response. No payment required.

        '
      parameters:
      - name: email
        in: query
        required: true
        description: Email address to associate with the trial key.
        schema:
          type: string
          format: email
      responses:
        '200':
          description: Trial key issued.
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_key:
                    type: string
                    description: Trial API key (e.g. lp_trial_...).
                  plan:
                    type: string
                    example: trial
                  trial_days:
                    type: integer
                    example: 14
                  expires:
                    type: string
                    format: date-time
        '400':
          description: Missing or invalid email.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/subscribe:
    get:
      tags:
      - System
      summary: Subscribe to Pro ($1/mo) and mint a Pro API key
      description: 'Mints a Pro API key (50,000 req/day, never expires) and returns

        a self-serve payment link (Stripe, PayPal, or manual email).

        The key works immediately — `paid:false` is a reconciliation flag

        the operator flips to true when the PayPal/Stripe notification arrives.

        '
      parameters:
      - name: email
        in: query
        required: true
        description: Email address for the Pro account.
        schema:
          type: string
          format: email
      responses:
        '200':
          description: Pro key minted with payment instructions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_key:
                    type: string
                    description: Pro API key (e.g. lp_pro_...).
                  pay_url:
                    type: string
                    format: uri
                    description: Payment link (Stripe/PayPal/mailto).
                  pay_method:
                    type: string
                    enum:
                    - stripe
                    - paypal
                    - manual_email
                  price_usd:
                    type: integer
                    example: 1
                  instructions:
                    type: string
        '400':
          description: Missing or invalid email.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/health/json:
    get:
      tags:
      - System
      summary: Machine-friendly health (fixed structure)
      description: 'Fixed-structure health check omitting human-readable adapters

        (currency symbols, subscribe_url). Returns ok, version, uptime,

        today''s count, now_iso, and endpoint_count.

        '
      responses:
        '200':
          description: Machine-friendly health info.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  service:
                    type: string
                  version:
                    type: string
                  uptime_seconds:
                    type: number
                  today:
                    type: object
                    properties:
                      day:
                        type: string
                      count:
                        type: integer
                  now_iso:
                    type: string
                    format: date-time
                  free_daily_limit:
                    type: integer
                  pro_daily_limit:
                    type: integer
                  endpoint_count:
                    type: integer
components:
  schemas:
    HealthResponse:
      type: object
      properties:
        ok:
          type: boolean
          example: true
        today:
          type: object
          properties:
            day:
              type: string
              description: Current day (YYYY-MM-DD).
            count:
              type: integer
              description: Total requests today.
        revenue:
          type: object
          properties:
            pro_price_usd:
              type: integer
              description: Monthly Pro price in USD.
            pay_method:
              type: string
              enum:
              - stripe
              - paypal
              - manual_email
              description: Active payment method.
            subscribe_url:
              type: string
              description: Endpoint URL to subscribe to Pro.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Machine-readable error code or human-readable message.
        url:
          type: string
          description: The URL that was attempted (when applicable).
        detail:
          type: string
          description: Additional context (varies by endpoint).
        max:
          type: integer
          description: Maximum allowed value when a limit is exceeded.
        got:
          type: integer
          description: The submitted value that exceeded the limit.
    RouteInfo:
      type: object
      properties:
        path:
          type: string
          description: URL path pattern.
        methods:
          type: array
          items:
            type: string
          description: Allowed HTTP methods.
    StatusResponse:
      type: object
      properties:
        ok:
          type: boolean
          example: true
        service:
          type: string
          example: LinkPeek
        version:
          type: string
          example: 1.19.1
        uptime_seconds:
          type: number
          description: Server uptime in seconds.
        endpoints:
          type: array
          items:
            $ref: '#/components/schemas/RouteInfo'
          description: Full list of registered API routes.
        free_daily_limit:
          type: integer
          example: 100
        pro_daily_limit:
          type: integer
          example: 50000
        docs:
          type: string
          example: /api/status
        health:
          type: string
          example: /api/health
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: key
      description: 'Optional API key for Trial/Pro tiers (lifts daily quota to 50,000).

        Obtain via `/api/key?email=` (free 14-day trial) or

        `/api/subscribe?email=` (Pro, $1/mo). Free tier requires no key.

        '