Back to Documentation
SDKs & Libraries
Official client libraries to integrate FirmAPI into your application in minutes.
PHP SDK
PHP 8.1+Official PHP client for FirmAPI. Requires PHP 8.1+ and supports Laravel auto-discovery.
Installation
composer require firmapi/php-sdk
Quick Start
Lookup by ICO
use FirmApi\Client;
// Create a client with your API key
$client = new Client('your-api-key');
// Look up a company by ICO (base data only – fast)
$company = $client->company->byIco('51636549')->get();
echo $company['data']['name']; // "Version Two s. r. o."
echo $company['data']['address']['city']; // "Bratislava"
// Include enrichment data with fluent methods
$company = $client->company->byIco('51636549')
->withTax()
->withFinancials()
->withDebtorStatus()
->get();
echo $company['data']['tax']['dic']; // "2120622389"
echo $company['data']['financials']['revenue']; // 12500000
// Or get everything at once
$full = $client->company->byIco('51636549')->withAll()->get();
Search
// Search by name
$results = $client->search->byName('Version Two');
foreach ($results as $company) {
echo $company->ico . ' - ' . $company->name;
}
// Autocomplete (Select2-compatible)
$suggestions = $client->search->autocomplete('vers', limit: 5);
Batch Lookup
// Batch lookup by ICO (Starter plan+)
$batch = $client->batch->byIco([
'51636549',
'12345678',
'87654321',
]);
echo $batch->found; // 2
echo $batch->not_found; // 1
All Available Methods
| Method | Description | Returns |
|---|---|---|
$client->company->byIco($ico) |
Look up a company by ICO (registration number) | CompanyQuery |
$client->company->byId($id) |
Look up a company by internal ID | CompanyQuery |
$client->company->byOrsrId($id) |
Look up a company by ORSR ID | CompanyQuery |
->withTax()->withFinancials()->... |
Chain enrichment scopes (tax, financials, insolvency, etc.) | CompanyQuery |
->withAll() |
Include all available enrichment data | CompanyQuery |
->get() |
Execute the query and return company data | Company |
$client->search->byName($name) |
Search companies by name | Company[] |
$client->search->byIco($ico) |
Search companies by partial ICO | Company[] |
$client->search->autocomplete($q) |
Autocomplete search (Select2-compatible) | AutocompleteResult[] |
$client->search->advanced([...]) |
Advanced multi-field search | Company[] |
$client->batch->byIco([...])
Starter+
|
Batch lookup by multiple ICOs | BatchResult |
$client->batch->byNames([...])
Starter+
|
Batch lookup by multiple names | BatchResult |
$client->account->usage() |
Get current period usage statistics | Usage |
$client->account->quota() |
Get remaining quota for current period | Quota |
$client->account->history($days) |
Get usage history | UsageHistory |
JavaScript / TypeScript SDK
TypeScriptOfficial JavaScript client for FirmAPI. Works in Node.js and modern browsers with full TypeScript support.
Installation
npm install firmapi
Quick Start
Lookup by ICO
import { FirmApi } from 'firmapi';
// Create a client with your API key
const client = new FirmApi('your-api-key');
// Look up a company by ICO (base data only – fast)
const company = await client.company.byIco('51636549');
console.log(company.data.name); // "Version Two s. r. o."
console.log(company.data.address.city); // "Bratislava"
// Include enrichment data with fluent methods
const detailed = await client.company.byIco('51636549')
.withTax()
.withFinancials()
.withDebtorStatus();
console.log(detailed.data.tax.dic); // "2120622389"
console.log(detailed.data.financials.revenue); // 12500000
// Or get everything at once
const full = await client.company.byIco('51636549').withAll();
Search
// Search by name
const results = await client.search.byName('Version Two');
for (const company of results) {
console.log(`${company.ico} - ${company.name}`);
}
// Autocomplete (Select2-compatible)
const suggestions = await client.search.autocomplete('vers', { limit: 5 });
Batch Lookup
// Batch lookup by ICO (Starter plan+)
const batch = await client.batch.byIco([
'51636549',
'12345678',
'87654321',
]);
console.log(batch.found); // 2
console.log(batch.notFound); // 1
All Available Methods
| Method | Description | Returns |
|---|---|---|
client.company.byIco(ico) |
Look up a company by ICO (registration number) | CompanyQuery |
client.company.byId(id) |
Look up a company by internal ID | CompanyQuery |
client.company.byOrsrId(id) |
Look up a company by ORSR ID | CompanyQuery |
.withTax().withFinancials().... |
Chain enrichment scopes (tax, financials, insolvency, etc.) | CompanyQuery |
.withAll() |
Include all available enrichment data | CompanyQuery |
client.search.byName(name) |
Search companies by name | Promise<Company[]> |
client.search.byIco(ico) |
Search companies by partial ICO | Promise<Company[]> |
client.search.autocomplete(q) |
Autocomplete search (Select2-compatible) | Promise<AutocompleteResult[]> |
client.search.advanced({...}) |
Advanced multi-field search | Promise<Company[]> |
client.batch.byIco([...])
Starter+
|
Batch lookup by multiple ICOs | Promise<BatchResult> |
client.batch.byNames([...])
Starter+
|
Batch lookup by multiple names | Promise<BatchResult> |
client.account.usage() |
Get current period usage statistics | Promise<Usage> |
client.account.quota() |
Get remaining quota for current period | Promise<Quota> |
client.account.history(days) |
Get usage history | Promise<UsageHistory> |