Skip to main content
GET
/
v1
/
user
/
lookup
Lookup user
curl --request GET \
  --url https://relay.bayse.markets/v1/user/lookup
import requests

url = "https://relay.bayse.markets/v1/user/lookup"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://relay.bayse.markets/v1/user/lookup', 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://relay.bayse.markets/v1/user/lookup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$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://relay.bayse.markets/v1/user/lookup"

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

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://relay.bayse.markets/v1/user/lookup")
.asString();
require 'uri'
require 'net/http'

url = URI("https://relay.bayse.markets/v1/user/lookup")

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

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "id": "68eea9d8-a0fe-4534-ae88-b71e2f4f5c8f",
  "tag": "mulumba",
  "imageUrl": "https://cdn.bayse.markets/profile-images/mulumba.jpg"
}

Overview

Look up a user by their tag (username) or user ID to get their public profile info. Provide either tag or userId, not both.
Requires read authentication. Include your X-Public-Key header.

Query parameters

tag
string
The user’s tag (username). Case-insensitive.
userId
string
The user’s ID (UUID).

Example request

curl https://relay.bayse.markets/v1/user/lookup?tag=mulumba \
  -H "X-Public-Key: YOUR_PUBLIC_KEY"
curl https://relay.bayse.markets/v1/user/lookup?userId=68eea9d8-a0fe-4534-ae88-b71e2f4f5c8f \
  -H "X-Public-Key: YOUR_PUBLIC_KEY"
const response = await fetch('https://relay.bayse.markets/v1/user/lookup?tag=mulumba', {
  headers: { 'X-Public-Key': 'YOUR_PUBLIC_KEY' },
});
const user = await response.json();
import requests

resp = requests.get(
    'https://relay.bayse.markets/v1/user/lookup',
    params={'tag': 'mulumba'},
    headers={'X-Public-Key': 'YOUR_PUBLIC_KEY'},
)
user = resp.json()
req, _ := http.NewRequest("GET", "https://relay.bayse.markets/v1/user/lookup?tag=mulumba", nil)
req.Header.Set("X-Public-Key", "YOUR_PUBLIC_KEY")
resp, _ := http.DefaultClient.Do(req)

Response

id
string
The user’s unique ID (UUID).
tag
string
The user’s tag (username).
imageUrl
string
URL of the user’s profile image. May be empty if no image is set.
{
  "id": "68eea9d8-a0fe-4534-ae88-b71e2f4f5c8f",
  "tag": "mulumba",
  "imageUrl": "https://cdn.bayse.markets/profile-images/mulumba.jpg"
}

Errors

StatusDescription
400Neither tag nor userId provided, or both provided.
401Missing or invalid API key.
404No user found with the given tag or ID.