DatReal

API Documentation

Public API for company information, sanctions checks, and person monitoring. Free access to Latvian company registry data.

Quick Start

The API is available without registration or authentication. All endpoints support CORS, so they can be used directly from the browser.

Base URL: https://datreal.com/api/public/v1

Endpoints

GET

/companies/{regcode}

Get detailed information about a specific company, including sanctions status.

Parameters:

  • regcode (required) - Company registration number

Response includes:

  • Basic information (name, address, legal form)
  • Registration and closure dates
  • Taxpayer rating and VAT status
  • NACE code and description
  • Financial reports
  • Sanctions status (isSanctioned: true/false)
curl "https://datreal.com/api/public/v1/companies/40003245752"
GET

/companies/{regcode}/sanctions

Check if a company is on the sanctions list and get detailed information.

Parameters:

  • regcode (required) - Company registration number
curl "https://datreal.com/api/public/v1/companies/40003245752/sanctions"
GET

/persons/check

Check if a specific person has any company registrations. Used for monitoring specific people.

Parameters:

  • name (required) - Person's full name (min. 2 characters)
  • birthDate (required) - Birth date in ISO format (YYYY-MM-DD)
  • limit (optional) - Max companies per person (1-100, default: 50)

Returns all roles: beneficial owner, officer, member, stockholder, micro-enterprise

curl "https://datreal.com/api/public/v1/persons/check?name=Jānis%20Bērziņš&birthDate=1985-03-15"
GET

/persons/new-registrations

Get new company registrations for a specific person in the last N hours. Used for monitoring specific people via cron jobs.

Parameters:

  • name (required) - Person's full name (min. 2 characters)
  • birthDate (required) - Birth date in ISO format (YYYY-MM-DD)
  • hours (optional) - Time window in hours (1-168, default: 24)
  • limit (optional) - Max companies to return (1-1000, default: 100)
curl "https://datreal.com/api/public/v1/persons/new-registrations?name=Jānis%20Bērziņš&birthDate=1985-03-15&hours=24"
GET

/

API discovery endpoint that returns full documentation in JSON format.

curl "https://datreal.com/api/public/v1"

Technical Details

CORS

All endpoints support CORS with * origin, allowing direct browser access to the API.

Caching

Responses are cached for 30 minutes with 1 hour stale-while-revalidate. Headers: public, s-maxage=1800, stale-while-revalidate=3600

Rate Limits

Rate limits are applied to prevent abuse. Company endpoints: 20 req/10s. Person check: 20 req/10s. New registrations: 10 req/60s.

Error Codes

  • 400 - Invalid request (missing or invalid parameters)
  • 404 - Company not found
  • 429 - Rate limit exceeded
  • 500 - Server error

LLM Setup Guide

Use this guide to configure AI assistants and language models to work with the DatReal API. The prompt below contains all the information an LLM needs to understand and use the API correctly.

Copy for LLM

Copy this prompt and paste it into your LLM (ChatGPT, Claude, etc.) to enable it to use the DatReal API for Latvian company lookups.

# DatReal API Integration Guide

You are integrating with the DatReal public API for Latvian company data. Here is everything you need to know:

## Base URL
https://datreal.com/api/public/v1

## Authentication
No authentication required. The API is publicly accessible.

## Available Endpoints

### 1. Search Companies
GET /companies/search?q={query}&limit={limit}
- q (required): Search query, minimum 2 characters
- limit (optional): Results count, 1-100, default 20
- Returns: Array of matching companies with regcode, name, address, status

### 2. Get Company Details
GET /companies/{regcode}
- regcode (required): Company registration number
- Returns: Full company details including financials, tax rating, VAT status, sanctions status

### 3. Check Sanctions
GET /companies/{regcode}/sanctions
- regcode (required): Company registration number
- Returns: Sanctions status and list of any active sanctions

### 4. Check Person
GET /persons/check?name={name}&birthDate={birthDate}&limit={limit}
- name (required): Full name, minimum 2 characters
- birthDate (required): ISO format YYYY-MM-DD
- limit (optional): Max companies, 1-100, default 50
- Returns: All company associations (board member, shareholder, beneficial owner, etc.)

### 5. New Registrations
GET /persons/new-registrations?name={name}&birthDate={birthDate}&hours={hours}&limit={limit}
- name (required): Full name
- birthDate (required): ISO format YYYY-MM-DD
- hours (optional): Time window 1-168, default 24
- limit (optional): Max results 1-1000, default 100
- Returns: New company registrations for the person within the time window

## Rate Limits
- Company endpoints: 20 requests per 10 seconds
- Person check: 20 requests per 10 seconds
- New registrations: 10 requests per 60 seconds

## Response Format
All responses are JSON. Successful responses return 200 OK.

## Error Codes
- 400: Invalid request (missing or invalid parameters)
- 404: Company or person not found
- 429: Rate limit exceeded
- 500: Server error

## CORS
All endpoints support CORS with * origin, allowing direct browser access.

## Caching
Responses are cached for 30 minutes with stale-while-revalidate of 1 hour.

## Example Usage
To search for a company: GET https://datreal.com/api/public/v1/companies/search?q=example&limit=10
To get company details: GET https://datreal.com/api/public/v1/companies/40003245752
To check sanctions: GET https://datreal.com/api/public/v1/companies/40003245752/sanctions