Skip to main content
GET
/
api
/
workflows
/
polymarket
/
getTags
Get Tags
curl --request GET \
  --url https://api-v2.swaps.xyz/api/workflows/polymarket/getTags \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api-v2.swaps.xyz/api/workflows/polymarket/getTags"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api-v2.swaps.xyz/api/workflows/polymarket/getTags', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api-v2.swaps.xyz/api/workflows/polymarket/getTags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api-v2.swaps.xyz/api/workflows/polymarket/getTags"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api-v2.swaps.xyz/api/workflows/polymarket/getTags")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-v2.swaps.xyz/api/workflows/polymarket/getTags")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "id": "<string>",
    "label": "<string>",
    "slug": "<string>",
    "forceShow": true,
    "publishedAt": "<string>",
    "createdBy": 123,
    "updatedBy": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "forceHide": true,
    "isCarousel": true,
    "requiresTranslation": true
  }
]
{
"error": "<string>",
"code": 123,
"details": {}
}
{
"error": "<string>",
"code": 123,
"details": {}
}
{
"error": "<string>",
"code": 123,
"details": {}
}

Authorizations

x-api-key
string
header
required

API key for authentication. Contact Swaps.xyz to obtain an API key.

Query Parameters

limit
integer

Number of tags to return

Required range: 1 <= x <= 100
offset
integer
default:0

Zero-based index of first tag to return

Required range: x >= 0
slug
string

Filter by tag slug

Response

Array of tags

id
string
required

Unique tag identifier

label
string | null

Human-readable tag label

slug
string | null

URL-friendly tag identifier

forceShow
boolean | null

Whether to force show this tag

publishedAt
string | null

Tag publication timestamp (format: YYYY-MM-DD HH:mm:ss.SSS+00)

createdBy
integer | null

ID of user who created the tag

updatedBy
integer | null

ID of user who last updated the tag

createdAt
string<date-time> | null

Tag creation timestamp

updatedAt
string<date-time> | null

Tag last update timestamp

forceHide
boolean | null

Whether to force hide this tag

Whether this tag is a carousel tag

requiresTranslation
boolean | null

Whether this tag requires translation