Your first API call
Find a company with the Vieu API, then use the returned identifiers to retrieve its profile or account plan.
Just exploring? Try the embedded example below with fictional sample data and no API key.
Get an API key
Ask your tenant administrator to create a key under Settings → API keys with the account:read-write scope. Store it in your server environment:
export VIEU_API_KEY="your-api-key"
Send the key in the x-api-key header. A tenant-scoped key automatically identifies your tenant. Legacy keys need a tenantId query parameter for tenant-scoped routes. See authentication.
Find an account
Search accepts exactly one of query, linkedInUrl, webDomain, companyId, or accountId. Start with a domain you know.
- cURL
- JavaScript
- Python
curl 'https://api.vieu.com/api/v2/accounts/search?webDomain=vieu.com' \
--header "x-api-key: $VIEU_API_KEY"
// Node.js 20+; run on your server.
const url = new URL('https://api.vieu.com/api/v2/accounts/search');
url.searchParams.set('webDomain', 'vieu.com');
const response = await fetch(url, {
headers: { 'x-api-key': process.env.VIEU_API_KEY },
});
const body = await response.json();
if (!response.ok) throw new Error(JSON.stringify(body));
console.log(body.companies);
# Install the requests package before running.
import os
import requests
response = requests.get(
"https://api.vieu.com/api/v2/accounts/search",
params={"webDomain": "vieu.com"},
headers={"x-api-key": os.environ["VIEU_API_KEY"]},
timeout=15,
)
response.raise_for_status()
print(response.json()["companies"])
Understand the response
The response contains up to five matching companies. The following is fictional sample data; your results depend on your tenant.
{
"companies": [
{
"companyId": "COMP-082e0318-8f24-4e21-a2ad-9259dfeef211",
"name": "Northstar",
"linkedInUrl": null,
"imageUrl": null,
"verified": true,
"accountId": "665f1c2e9b1a4c0012a3b4c5",
"hasAccountPlan": true
}
]
}
companyId identifies the company globally. accountId identifies its plan within your tenant; it can be null when no account plan exists. An empty companies array is a valid result.
Try this request
- cURL
- JavaScript
- Python
curl 'https://api.vieu.com/api/v2/accounts/search?query=Northstar' \
--header "x-api-key: $VIEU_API_KEY"
const response = await fetch("https://api.vieu.com/api/v2/accounts/search?query=Northstar", {
headers: { 'x-api-key': process.env.VIEU_API_KEY }
});
const body = await response.json();
if (!response.ok) throw new Error(JSON.stringify(body));
console.log(body);
import os
import requests
response = requests.get(
"https://api.vieu.com/api/v2/accounts/search?query=Northstar",
headers={"x-api-key": os.environ["VIEU_API_KEY"]},
timeout=15,
)
response.raise_for_status()
print(response.json())
Send a request to inspect the response.
Next: turn the result into context
Read an account profile, discover warm connections, or inspect every parameter in the API reference.