Fide (Beta)
Ask or search…
⌃K
Links
🔗

API

The Fide REST API can be used to interact with the Fide database programmatically.

API Resources

https://api.fide.id is the GraphQL Endpoint. Query definitions coming soon!

A simple example of a "blockchain_address" entity query

GraphQL
JavaScript
cURL
Python
C#
Go

Try It Now!

POST Endpint
https://api.fide.id
Query
query getEntity($fide_id: String, $blockchain_address: String) {
entity(input:{fide_id:$fide_id, blockchain_address: $blockchain_address}) {
blockchain_addresses
links
fide_id
}
}
Variables
{
"blockchain_address": "0x0fb213a1af101b1429e6ad3020ad92fb0d25eb1e"
}
Headers
{
"x-api-key": "YOUR_API_KEY"
}
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "YOUR_API_KEY");
​
var graphql = JSON.stringify({
query: "query getEntity($fide_id: String, $blockchain_address: String) {\r\n entity(input:{fide_id:$fide_id, blockchain_address: $blockchain_address}) {\r\n blockchain_addresses\r\n links\r\n fide_id\r\n }\r\n}",
variables: {"blockchain_address":"0x0fb213a1af101b1429e6ad3020ad92fb0d25eb1e"}
})
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: graphql,
redirect: 'follow'
};
​
fetch("https://api.fide.id", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
curl --location 'https://api.fide.id' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '{"query":"query getEntity($fide_id: String, $blockchain_address: String) {\r\n entity(input:{fide_id:$fide_id, blockchain_address: $blockchain_address}) {\r\n blockchain_addresses\r\n links\r\n fide_id\r\n }\r\n}","variables":{"blockchain_address":"0x0fb213a1af101b1429e6ad3020ad92fb0d25eb1e"}}'
import requests
import json
​
url = "https://api.fide.id"
​
payload = "{\"query\":\"query getEntity($fide_id: String, $blockchain_address: String) {\\r\\n entity(input:{fide_id:$fide_id, blockchain_address: $blockchain_address}) {\\r\\n blockchain_addresses\\r\\n links\\r\\n fide_id\\r\\n }\\r\\n}\",\"variables\":{\"blockchain_address\":\"0x0fb213a1af101b1429e6ad3020ad92fb0d25eb1e\"}}"
headers = {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
}
​
response = requests.request("POST", url, headers=headers, data=payload)
​
print(response.text)
​
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.fide.id");
request.Headers.Add("x-api-key", "YOUR_API_KEY");
var content = new StringContent("{\"query\":\"query getEntity($fide_id: String, $blockchain_address: String) {\\r\\n entity(input:{fide_id:$fide_id, blockchain_address: $blockchain_address}) {\\r\\n blockchain_addresses\\r\\n links\\r\\n fide_id\\r\\n }\\r\\n}\",\"variables\":{\"blockchain_address\":\"0x0fb213a1af101b1429e6ad3020ad92fb0d25eb1e\"}}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
​
package main
​
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
​
func main() {
​
url := "https://api.fide.id"
method := "POST"
​
payload := strings.NewReader("{\"query\":\"query getEntity($fide_id: String, $blockchain_address: String) {\\r\\n entity(input:{fide_id:$fide_id, blockchain_address: $blockchain_address}) {\\r\\n blockchain_addresses\\r\\n links\\r\\n fide_id\\r\\n }\\r\\n}\",\"variables\":{\"blockchain_address\":\"0x0fb213a1af101b1429e6ad3020ad92fb0d25eb1e\"}}")
​
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
​
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("x-api-key", "YOUR_API_KEY")
​
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
​
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Last modified 6mo ago