Skip to content
  • Auto
  • Light
  • Dark
Get Started

List

List
get/v1/search/vals

Search for vals across the platform

Query Parameters
limitnumber

Maximum items to return in each paginated response

minimum1
maximum100
offsetnumber

Number of items to skip in order to deliver paginated results

minimum0
querystring

Search query

minLength1
maxLength256
Returns
dataarray of object
curl https://api.val.town/v1/search/vals \
    -d '{}'
200 Example
{
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "author": {
        "id": "00000000-0000-0000-0000-000000000000",
        "username": "tmcw"
      },
      "code": "export const count = 1;",
      "createdAt": "2024-06-11T22:05:12.585Z",
      "links": {
        "module": "https://example.com",
        "self": "https://example.com",
        "versions": "https://example.com",
        "endpoint": "https://example.com"
      },
      "name": "counter",
      "privacy": "public",
      "public": true,
      "type": "script",
      "updatedAt": "2019-12-27T18:11:19.117Z",
      "url": "https://val.town/v/tmcw/counter",
      "version": 0
    }
  ],
  "links": {
    "self": "https://example.com",
    "next": "https://example.com",
    "prev": "https://example.com"
  }
}