toui API

toui API as documented publicly. Contract generated from the documentation by API Evangelist (2026-11-27); not the provider's own document.

GitHub OpenAPI

Operations 4

GET / GET / #
POST /api/v1/shorten POST /api/v1/shorten #
GET /api/v1/urls/{code} Returns metadata and the lifetime click count for a short code you own. #
GET /api/v1/urls/{code}/stats Returns daily clicks and a country breakdown. #

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/toui-io:toui-io-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

toui-io-openapi-generated.yml Raw ↑
openapi: 3.1.0
info:
  title: toui API
  version: '2026-11-27'
  description: 'GENERATED FROM DOCUMENTATION by API Evangelist on 2026-11-27: 4 operation(s) read from 4 public documentation page(s) (each operation
    names its page in x-source). This is not the provider''s published contract; toui has published no machine-readable contract that the pipeline
    could find. Engine: local.'
  x-evidence-tiers:
    code-example: 2
    documentation: 2
    pages-with-code: 4
    pages-read: 4
  x-generated-from: documentation
  x-provenance: generated
  x-authored-by: API Evangelist
  x-generated: '2026-11-27'
  x-generator: generate-contract-from-docs.py
  x-engine: local
  x-sources:
  - https://toui.io/docs
  - https://toui.io/ja/docs
  - https://toui.io/zh/docs
  - https://github.com/trending
paths:
  /:
    get:
      operationId: get
      tags:
      - Api
      summary: GET /
      x-source: https://github.com/trending
      responses:
        '200':
          description: Success (status as documented)
      x-evidence:
        kind: code-example
        language: curl
        snippet: "curl Config\n Curry\n CWeb\n Cycript\n Cylc\n Cypher\n Cython\n D\n D-ObjDump\n D2\n Dafny\n Darcs Patch\n Dart\n Daslang\n\
          \ DataWeave\n Debian Package Control File\n DenizenScript\n desktop\n Dhall\n Diff\n DIGITAL Command Language\n dircolors\n DirectX\
          \ 3D File\n DM\n DNS Zone\n Dockerfile\n Dogescript\n Dotenv\n DTrace\n Dune\n Dylan\n E\n E-mail\n Eagle\n Earthly\n Easybuild\n EBNF\n\
          \ eC\n Ecere Projects\n ECL\n ECLiPSe\n Ecmarkup\n Edge"
  /api/v1/shorten:
    post:
      operationId: post_api_v1_shorten
      tags:
      - Api
      summary: POST /api/v1/shorten
      x-source: https://toui.io/docs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostApiV1ShortenRequest'
      responses:
        '201':
          description: Success (shape read from the example response on the page)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostApiV1ShortenResponse'
      x-evidence:
        kind: code-example
        language: curl
        snippet: 'curl tab — every endpoint works in any language. Copy npm install toui-js curl toui-js Copy curl -X POST https://toui.io/api/v1/shorten  -H
          "Authorization: Bearer toui_YOUR_API_KEY"  -H "Content-Type: application/json"  -d ''{"url": "https://example.com/a-very-long-link"}''
          Copy import {Toui} from ''toui-js'';

          const toui = new Toui({ apiKey: process.env.TOUI_API_KEY! });

          const {short_url} = await toui'
  /api/v1/urls/{code}:
    get:
      operationId: get_api_v1_urls_code
      tags:
      - Api
      summary: Returns metadata and the lifetime click count for a short code you own.
      x-source: https://toui.io/docs
      parameters:
      - name: code
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1UrlsCodeResponse'
      x-evidence:
        kind: documentation
  /api/v1/urls/{code}/stats:
    get:
      operationId: get_api_v1_urls_code_stats
      tags:
      - Api
      summary: Returns daily clicks and a country breakdown.
      x-source: https://toui.io/docs
      parameters:
      - name: code
        in: path
        required: true
        schema:
          type: string
      - name: days
        in: query
        required: false
        schema:
          type: integer
        description: Number of days to include (max depends on plan).
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1UrlsCodeStatsResponse'
      x-evidence:
        kind: documentation
components:
  schemas:
    PostApiV1ShortenRequest:
      type: object
      properties:
        url:
          type: string
    PostApiV1ShortenResponse:
      type: object
      properties:
        short_url:
          type: string
        short_code:
          type: string
        target_url:
          type: string
        created_at:
          type: string
          format: date-time
    GetApiV1UrlsCodeResponse:
      type: object
      properties:
        short_code:
          type: string
          description: Short code.
        target_url:
          type: string
          description: Original long URL.
        title:
          type: string
          description: Title of the link.
        click_count:
          type: integer
          description: Lifetime click count.
        created_at:
          type: string
          description: Creation timestamp.
        is_active:
          type: boolean
          description: Whether the link is active.
        og_title:
          type: string
          description: Open Graph title.
        og_description:
          type: string
          description: Open Graph description.
        og_image_url:
          type: string
          description: Open Graph image URL.
    GetApiV1UrlsCodeStatsResponse:
      type: object
      properties:
        short_code:
          type: string
          description: Short code.
        target_url:
          type: string
          description: Original long URL.
        total_clicks:
          type: integer
          description: Total clicks over the requested period.
        daily:
          type: array
          description: Array of daily stats objects with date, clicks, unique_visitors.
        countries:
          type: array
          description: Array of country breakdown objects with country and clicks.
        cities:
          type: array
          description: Array of city breakdown objects with country, city, and clicks.
        visible_days:
          type: integer
          description: Plan's visible period in days.
        clamped:
          type: boolean
          description: True if requested days exceed visible period.
        visible_from:
          type: string
          description: First visible date when clamped.
        earlier_clicks:
          type: integer
          description: Clicks before visible_from when clamped.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
security:
- bearer: []
tags:
- name: Api