Get user by ID
import { ParagraphAPI } from "@paragraph-com/sdk"
const api = new ParagraphAPI()
const user = await api.users.get({ id: "AeAOtR8TqKWyzG5apA1R" }).single()curl --request GET \
--url https://public.api.paragraph.com/api/v1/users/{userId}import requests
url = "https://public.api.paragraph.com/api/v1/users/{userId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://public.api.paragraph.com/api/v1/users/{userId}', 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://public.api.paragraph.com/api/v1/users/{userId}",
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://public.api.paragraph.com/api/v1/users/{userId}"
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://public.api.paragraph.com/api/v1/users/{userId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.api.paragraph.com/api/v1/users/{userId}")
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": "<string>",
"publicationId": "<string>",
"walletAddress": "<string>",
"avatarUrl": "<string>",
"name": "<string>",
"bio": "<string>",
"farcaster": {
"username": "<string>",
"displayName": "<string>",
"fid": 123
}
}{
"success": false,
"msg": "<string>"
}{
"success": false,
"msg": "<string>"
}users
Get user by ID
Retrieve detailed information about a specific user
GET
/
v1
/
users
/
{userId}
Get user by ID
import { ParagraphAPI } from "@paragraph-com/sdk"
const api = new ParagraphAPI()
const user = await api.users.get({ id: "AeAOtR8TqKWyzG5apA1R" }).single()curl --request GET \
--url https://public.api.paragraph.com/api/v1/users/{userId}import requests
url = "https://public.api.paragraph.com/api/v1/users/{userId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://public.api.paragraph.com/api/v1/users/{userId}', 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://public.api.paragraph.com/api/v1/users/{userId}",
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://public.api.paragraph.com/api/v1/users/{userId}"
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://public.api.paragraph.com/api/v1/users/{userId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public.api.paragraph.com/api/v1/users/{userId}")
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": "<string>",
"publicationId": "<string>",
"walletAddress": "<string>",
"avatarUrl": "<string>",
"name": "<string>",
"bio": "<string>",
"farcaster": {
"username": "<string>",
"displayName": "<string>",
"fid": 123
}
}{
"success": false,
"msg": "<string>"
}{
"success": false,
"msg": "<string>"
}Path Parameters
Unique identifier of the user
Response
User details retrieved successfully
Unique identifier for the user
ID of the publication this user belongs to
Wallet address of the user
Pattern:
^0x[a-fA-F0-9]{40}$URL to the user's avatar image
Display name of the user
Brief biography of the user (max 500 characters)
Maximum string length:
500Farcaster profile information, if linked
Show child attributes
Show child attributes
⌘I

