API Endpoints

All available endpoints with request parameters and direct test links

GET /api/search

Search companies with optional name, category, location, employee-count, and shareholder-residency filters. Returns lightweight paginated results by default; add include_total=true when you need an exact total count.

Query Parameters
  • q string (optional)
  • category string (optional)
  • location string (optional)
  • employee_limit int (optional)
  • residency enum: all | estonian | non_estonian (optional, default: all)
  • limit int (default: 20)
  • page int (default: 1)
  • include_total boolean (default: false)
Try it now
GET /api/category-search

Search companies by category or activity using EMTAK categories from the company registry data. Returns paginated results.

Query Parameters
  • category string
  • limit int (default: 20)
  • page int (default: 1)
Try it now
GET /api/domains

Find the most likely company domain using Serper search. Returns the top result and extracted domain.

Query Parameters
  • q string
Try it now
GET /api/procurement

Search procurement notices by company name (case-insensitive partial match).

Query Parameters
  • q string
  • limit int (default: 20)
  • page int (default: 1)
  • full bool (default: false)
  • role string (optional)
Try it now
GET /api/company/{code}

Get complete company data by registration code. Returns all available information including financial data.

Path Parameters
  • code string (8 digits)
Try it now
GET /api/leaders/{code}

Get company leaders by registration code. Returns the leaders payload stored for the company.

Path Parameters
  • code string (8 digits)
Try it now
GET /api/global-filters

List companies with shareholder data and split the shareholders into Estonian vs non-Estonian groups using aadress_riik, where EST means Estonian and null means non-Estonian. You can combine residency with the regular Estonia company filters.

Query Parameters
  • q string (optional)
  • category string (optional)
  • location string (optional)
  • employee_limit int (optional)
  • residency all | estonian | non_estonian
  • limit int (default: 20)
  • page int (default: 1)
Try it now
GET /api/shareholders/{code}

Get company shareholders by registration code. Returns the shareholder payload stored for the company.

Path Parameters
  • code string (8 digits)
Try it now
GET /api/estonia/company/{code}/financial-reports

Get Estonia company financial report headers by registration code, including filing metadata and whether line-item details are available for each report.

Parameters
  • code string (path)
  • limit int (query, default: 20, max: 200)
  • offset int (query, default: 0)
Try it now
GET /api/estonia/financial-reports/{report_id}/details

Get one Estonia financial report by report ID together with all imported report line items.

Path Parameters
  • report_id integer
Try it now
GET /api/advanced-search

Search with multiple filters: name, status, location, and more. Advanced filtering capabilities.

Query Parameters
  • name string
  • status string
  • location string
POST /api/bulk-search

Search multiple companies by registration codes in a single request. Efficient for batch operations.

Request Body
  • codes string[]
GET /api/autocomplete

Get company name suggestions for autocomplete. Real-time suggestions as users type.

Query Parameters
  • q string
  • limit int (default: 10)
  • page int (default: 1)
GET /search/estonia/v2

Proxy the Estonia Business Register autocomplete API. Pass q and result; this endpoint does not support pagination, and limit, page, and offset are ignored.

Query Parameters
  • q string (required)
  • result int (default: 10, max returned items)
Try it now
GET /api/stats

Get database statistics and counts. Useful for monitoring and analytics.

Try it now
GET /api/table-stats

Get row count estimates for all base tables across all schemas (fast, uses PostgreSQL stats).

Try it now
GET /api/health

Check API and database health status. Returns service availability and metrics.

Try it now
GET /api/latvia/search

Search Latvia companies by name (case-insensitive partial match). Optional filters are available for status, company type, and registration-date range. Returns paginated results.

Query Parameters
  • q string
  • status string (optional)
  • company_type string (optional)
  • registered_from date YYYY-MM-DD (optional)
  • registered_to date YYYY-MM-DD (optional)
  • limit int (default: 20)
  • page int (default: 1)
Try it now
GET /api/latvia/company/{code}

Get complete Latvia company data by registration code. Returns all available information.

Path Parameters
  • code string
Try it now
GET /api/latvia/company/{code}/financial-statements

Get Latvia company financial statements by registration code, including company summary and paginated statement rows.

Parameters
  • code string (path)
  • limit int (query, default: 20, max: 200)
  • offset int (query, default: 0)
Try it now
GET /api/latvia/company/{code}/income-statements

Get Latvia company income statements by registration code, enriched with filing metadata and paginated result rows.

Parameters
  • code string (path)
  • limit int (query, default: 20, max: 200)
  • offset int (query, default: 0)
Try it now
GET /api/latvia/income-statements/{statement_id}

Get a single Latvia income statement by statement ID.

Path Parameters
  • statement_id integer
Try it now
GET /api/latvia/autocomplete

Get Latvia company name suggestions for autocomplete. Real-time suggestions as users type.

Query Parameters
  • q string
  • limit int (default: 10)
Try it now
GET /api/lithuania/search

Search Lithuania legal entities by name (case-insensitive partial match). Returns paginated results.

Query Parameters
  • q string
  • limit int (default: 20)
  • offset int (default: 0)
  • full bool (default: false)
Try it now
GET /api/lithuania/company/<code>

Fetch Lithuania company data by registration code (ja_kodas).

Path Parameters
  • code string
Try it now
GET /api/lithuania/balance-sheet

Fetch Lithuania balance sheet rows by company code (ja_kodas). Returns paginated line items.

Query Parameters
  • ja_kodas string
  • limit int (default: 100)
  • offset int (default: 0)
Try it now
GET /api/lithuania/profit-loss

Fetch Lithuania profit and loss rows by company code (ja_kodas). Returns paginated line items.

Query Parameters
  • ja_kodas string
  • limit int (default: 100)
  • offset int (default: 0)
Try it now
GET /api/lithuania/ngos

Fetch Lithuania NGO by company code (ja_kodas).

Query Parameters
  • ja_kodas string
Try it now

Code Examples

Get started quickly with these code snippets

Python
# Search companies by name
import requests

# Search with optional filters, page 2
response = requests.get("http://localhost:5000/api/search",
    params={"category": "software", "location": "tartu", "employee_limit": 25, "residency": "non_estonian", "limit": 5, "page": 2}
)
data = response.json()
print(data["results"][0])

# Request exact totals only when needed
response = requests.get("http://localhost:5000/api/search",
    params={"q": "tech", "limit": 5, "include_total": True}
)
data_with_total = response.json()
print(f"Found {data_with_total['total']} companies")

# Search companies by category
response = requests.get("http://localhost:5000/api/category-search",
    params={"category": "Programmeerimine", "limit": 5, "page": 1}
)
category_data = response.json()
print(f"Found {category_data['total']} category matches")

# Lithuania legal entities search
response = requests.get("http://localhost:5000/api/lithuania/search",
    params={"q": "uab", "limit": 5}
)
lt_data = response.json()
print(f"Found {lt_data['total']} LT entities")

# Lithuania company by registration code
response = requests.get("http://localhost:5000/api/lithuania/company/110005648")
lt_company = response.json()
print(lt_company)

# Lithuania balance sheet by company code
response = requests.get("http://localhost:5000/api/lithuania/balance-sheet",
    params={"ja_kodas": "110005648", "limit": 5}
)
bs_data = response.json()
print(f"Found {bs_data['total']} balance sheet rows")

# Lithuania profit and loss by company code
response = requests.get("http://localhost:5000/api/lithuania/profit-loss",
    params={"ja_kodas": "110005648", "limit": 5}
)
pl_data = response.json()
print(f"Found {pl_data['total']} profit & loss rows")

# Lithuania NGO by company code
response = requests.get("http://localhost:5000/api/lithuania/ngos",
    params={"ja_kodas": "303530932"}
)
ngo_data = response.json()
print(ngo_data)

# Get company by registration code
response = requests.get("http://localhost:5000/api/company/12345678")
company = response.json()
print(f"Company: {company['name']}")

# Get company leaders by registration code
response = requests.get("http://localhost:5000/api/leaders/12345678")
leaders = response.json()
print(leaders)

# Get company shareholders by registration code
response = requests.get("http://localhost:5000/api/shareholders/16752073")
shareholders = response.json()
print(shareholders)

# List companies with non-Estonian shareholders
response = requests.get("http://localhost:5000/api/global-filters",
    params={"residency": "non_estonian", "category": "software", "location": "tartu", "employee_limit": 25, "limit": 5, "page": 1}
)
shareholder_companies = response.json()
print(f"Found {shareholder_companies['total']} companies")

# Search Latvia companies with schema-backed filters
response = requests.get("http://localhost:5000/api/latvia/search",
    params={"q": "tech", "status": "active", "registered_from": "2020-01-01", "limit": 5}
)
latvia_data = response.json()
print(f"Found {latvia_data['total']} Latvia companies")

# Get top domain for company name
response = requests.get("http://localhost:5000/api/domains",
    params={"q": "kontorva"}
)
domain_result = response.json()
print(domain_result)
JavaScript
// Search companies using fetch API
async function searchCompanies(query, filters = {}) {
    const params = new URLSearchParams({
        limit: filters.limit ?? 20,
        page: filters.page ?? 1
    });
    if (query) params.set("q", query);
    if (filters.category) params.set("category", filters.category);
    if (filters.location) params.set("location", filters.location);
    if (filters.employee_limit !== undefined) params.set("employee_limit", filters.employee_limit);
    if (filters.residency) params.set("residency", filters.residency);
    if (filters.include_total) params.set("include_total", "true");
    const response = await fetch(`/api/search?${params.toString()}`);
    const data = await response.json();
    return data;
}

// Search companies by category
async function searchByCategory(category, limit = 20, page = 1) {
    const response = await fetch(
        `/api/category-search?category=${encodeURIComponent(category)}&limit=${limit}&page=${page}`
    );
    return await response.json();
}

// Get company by code
async function getCompany(code) {
    const response = await fetch(`/api/company/${code}`);
    return await response.json();
}

// Get company leaders by code
async function getLeaders(code) {
    const response = await fetch(`/api/leaders/${code}`);
    return await response.json();
}

// Get company shareholders by code
async function getShareholders(code) {
    const response = await fetch(`/api/shareholders/${code}`);
    return await response.json();
}

// List companies by shareholder residency classification
async function listShareholderCompanies(residency = "all", limit = 20, page = 1) {
    const params = new URLSearchParams({
        residency: residency,
        limit: limit,
        page: page
    });
    const response = await fetch(`/api/global-filters?${params.toString()}`);
    return await response.json();
}

// Get top domain for a company name
async function getCompanyDomain(name) {
    const response = await fetch(
        `/api/domains?q=${encodeURIComponent(name)}`
    );
    return await response.json();
}
cURL
# Search for companies
curl "http://localhost:5000/api/search?category=software&location=tartu&employee_limit=25&residency=non_estonian&limit=5&page=2"

# Search with exact total count
curl "http://localhost:5000/api/search?q=tech&limit=5&include_total=true"

# Search companies by category
curl "http://localhost:5000/api/category-search?category=Programmeerimine&limit=5&page=1"

# Search Lithuania legal entities by name
curl "http://localhost:5000/api/lithuania/search?q=uab&limit=5"

# Lithuania company by registration code
curl "http://localhost:5000/api/lithuania/company/110005648"

# Lithuania balance sheet by company code
curl "http://localhost:5000/api/lithuania/balance-sheet?ja_kodas=110005648&limit=5"

# Lithuania profit and loss by company code
curl "http://localhost:5000/api/lithuania/profit-loss?ja_kodas=110005648&limit=5"

# Lithuania NGO by company code
curl "http://localhost:5000/api/lithuania/ngos?ja_kodas=303530932"

# Search procurement notices by company name
curl "http://localhost:5000/api/procurement?q=hiiumaa&limit=5&page=1"

# Get company by registration code
curl "http://localhost:5000/api/company/12345678"

# Get company leaders by registration code
curl "http://localhost:5000/api/leaders/12345678"

# Get company shareholders by registration code
curl "http://localhost:5000/api/shareholders/16752073"

# List companies with non-Estonian shareholders
curl "http://localhost:5000/api/global-filters?residency=non_estonian&category=software&location=tartu&employee_limit=25&limit=5&page=1"

# Search Latvia companies with supported filters
curl "http://localhost:5000/api/latvia/search?q=tech&status=active®istered_from=2020-01-01&limit=5"

# Get top domain for company name
curl "http://localhost:5000/api/domains?q=kontorva"

# Get API health status
curl "http://localhost:5000/api/health"

# Get all table row counts
curl "http://localhost:5000/api/table-stats"

# Bulk search with POST
curl -X POST http://localhost:5000/api/bulk-search   -H "Content-Type: application/json"   -d '{"codes": ["12345678", "87654321"]}'

Features

Core platform strengths behind the Arikaart ai data agent experience

High Performance

Optimized PostgreSQL queries with JSONB indexing for sub-100ms response times.

Reliable & Secure

99.9% uptime with proper input validation and secure API practices.

Advanced Search

Full-text search, partial matching, and multiple filter options.

PostgreSQL JSONB

Flexible JSONB storage for complex company data structures.

RESTful API

Clean, consistent REST endpoints following best practices.

Real-time Data

Access to the latest Estonian company registry information.

Quick Start

Open common endpoints quickly without leaving the docs page