Val Town alias API

Many API endpoints accept IDs instead of user-facing names. The alias endpoints let you convert between the user-facing name of a val or another object into an ID that can be used with other API endpoints

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/val-town-alias-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

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

OpenAPI Specification

val-town-alias-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Val Town alias API
  description: 'Val Town’s public API


    OpenAPI JSON endpoint:


    https://api.val.town/openapi.json'
  termsOfService: https://www.val.town/termsofuse
  version: '1'
servers:
- url: https://api.val.town
  description: Production
tags:
- name: alias
  description: 'Many API endpoints

    accept IDs instead of user-facing names. The alias

    endpoints let you convert between the user-facing name of a

    val or another object into an ID that can be used with other

    API endpoints'
paths:
  /v1/alias/{username}:
    get:
      operationId: aliasUsername
      tags:
      - alias
      description: Get basic details about a user, given their username
      parameters:
      - schema:
          type: string
        in: path
        name: username
        required: true
        description: Username of the user who you are looking for
      responses:
        '200':
          description: User object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
  /v2/alias/vals/{username}/{val_name}:
    get:
      operationId: aliasVal2
      tags:
      - alias
      description: Get a val
      parameters:
      - schema:
          type: string
        in: path
        name: username
        required: true
        description: Username of the user whose val you are looking for
      - schema:
          type: string
        in: path
        name: val_name
        required: true
        description: Name of the val you're looking for
      responses:
        '200':
          description: A Val
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Val'
components:
  schemas:
    User:
      type: object
      required:
      - id
      - type
      - bio
      - username
      - profileImageUrl
      - url
      - links
      properties:
        id:
          type: string
          format: uuid
          description: The ID of this user
        type:
          enum:
          - user
          - org
          description: Whether this is a user or an organization
        bio:
          anyOf:
          - type: string
            description: The user’s biography, if they have provided one
          - type: 'null'
        username:
          anyOf:
          - type: string
            description: The user’s handle that they chose for themselves. Does not include the @ symbol
          - type: 'null'
        profileImageUrl:
          anyOf:
          - type: string
            description: URL that points to the user’s profile image, if one exists
            format: uri
          - type: 'null'
        url:
          type: string
          format: uri
          description: URL of this user’s profile on Val Town’s website
        links:
          type: object
          required:
          - self
          properties:
            self:
              type: string
              format: uri
              description: URL of this user on this API
      description: User object
      example:
        id: 00000000-0000-0000-0000-000000000000
        bio: Hello world
        username: tmcw
        url: https://val.town/u/tmcw
        profileImageUrl: null
    Val:
      type: object
      required:
      - name
      - id
      - createdAt
      - privacy
      - author
      - imageUrl
      - description
      - links
      properties:
        name:
          type: string
        id:
          type: string
          format: uuid
          description: The id of the val
        createdAt:
          type: string
          format: date-time
        privacy:
          enum:
          - public
          - unlisted
          - private
          description: This resource's privacy setting. Unlisted resources do not appear on profile pages or elsewhere, but you can link to them.
        author:
          type: object
          required:
          - type
          - id
          - username
          properties:
            type:
              anyOf:
              - type: string
                enum:
                - user
              - type: string
                enum:
                - org
            id:
              type: string
              format: uuid
            username:
              anyOf:
              - type: string
              - type: 'null'
        imageUrl:
          anyOf:
          - type: string
            description: The URL of this val's image
          - type: 'null'
        description:
          anyOf:
          - type: string
          - type: 'null'
        links:
          type: object
          required:
          - self
          - html
          properties:
            self:
              type: string
              format: uri
              description: The URL of this resource on this API
            html:
              type: string
              format: uri
              description: The URL of this resource on Val Town
      description: A Val
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Endpoints that support authorization expect Bearer authentication, using an API token provided from Val Town.
externalDocs:
  url: https://api.val.town/documentation
  description: Find more info here