API Endpoints

All available endpoints with request parameters and direct test links

GET /api/search

Search companies by name with optional category, location, and employee-count filters. Returns paginated results with company details.

Query Parameters
  • q string
  • category string (optional)
  • location string (optional)
  • employee_limit int (optional)
  • limit int (default: 20)
  • page int (default: 1)
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.

Query Parameters
  • 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/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 /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). Returns paginated results.

Query Parameters
  • q string
  • limit int (default: 20)
  • offset int (default: 0)
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 by name with filters, page 2
response = requests.get("http://localhost:5000/api/search",
    params={"q": "tech", "category": "software", "location": "tartu", "employee_limit": 25, "limit": 5, "page": 2}
)
data = response.json()
print(f"Found {data['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", "limit": 5, "page": 1}
)
shareholder_companies = response.json()
print(f"Found {shareholder_companies['total']} 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({
        q: query,
        limit: filters.limit ?? 20,
        page: filters.page ?? 1
    });
    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);
    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?q=tech&category=software&location=tartu&employee_limit=25&limit=5&page=2"

# 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&limit=5&page=1"

# 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