API Endpoints

All available endpoints with detailed documentation

GET /api/search

Search companies by name (case-insensitive partial match). Returns paginated results with company details.

Query Parameters
  • q string
  • limit int (default: 20)
  • offset int (default: 0)
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)
  • offset int (default: 0)
  • 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/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)
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

# Basic search
response = requests.get("http://localhost:5000/api/search",
    params={"q": "tech", "limit": 5}
)
data = response.json()
print(f"Found {data['total']} companies")

# 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 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, limit = 20) {
    const response = await fetch(
        `/api/search?q=${query}&limit=${limit}`
    );
    const data = await response.json();
    return data;
}

// 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 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&limit=5"

# 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"

# 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 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

Why choose our API for your Estonian company data needs

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

Get up and running in minutes