Skip to content

Tags API

Endpoints for retrieving and managing tags used to categorize events and markets.

List All Tags

Get a paginated list of all tags available in the system.

Endpoint: GET /public/api/v1/tags/

Query Parameters

All parameters are optional.

  • page (integer, default: 1) - Page number using 1-based indexing
  • limit (integer, default: 20, max: 100) - Results per page
  • sort (string, default: label) - Sort by field: label, slug, or id
  • order (string, default: asc) - Sort order: asc or desc

Example Request

curl "https://market-api.probable.markets/public/api/v1/tags/?page=1&limit=20&sort=label&order=asc"

Example Response

{
  "tags": [
    {
      "id": 1,
      "label": "Sports",
      "slug": "sports"
    },
    {
      "id": 2,
      "label": "Crypto",
      "slug": "crypto"
    },
    {
      "id": 3,
      "label": "Politics",
      "slug": "politics"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "totalResults": 150,
    "totalPages": 8,
    "hasMore": true,
    "hasPrevPage": false
  }
}

Use Case

Frontend can use this endpoint to populate tag selection dropdowns when creating events/markets or filtering content.

Caching

Results are cached for 5 minutes.

Error Responses

  • 500 - Internal server error