# Batch processing and exports

> Process thousands of company IDs at once. Bulk verification, database enrichment and exports in PDF, Markdown or JSON.

When you need to process thousands of companies at once, calling the endpoint in a loop is the wrong route. Batch processing accepts the whole list and prepares the result for collection.

## The problem

A loop over thousands of company IDs is slow, runs into limits, and on interruption leaves it unclear where it stopped. The solution then gets wrapped in a bespoke queue with retries – work that need not be done.

The second problem is the output. If somebody outside the engineering team needs the result, JSON will not do.

## How FirmAPI solves it

You submit the list of company IDs in one request and receive a batch identifier. Progress is polled by status query, the finished result downloaded in one go.

Typical uses: initial enrichment of an existing database, monthly re-checking of a customer portfolio, supplier checks before a period close.

A company detail can also be exported individually, in whichever format suits its reader: PDF to attach to a file, Markdown for documentation or as input for a language model, JSON for further processing.

## Exporting a company detail

```
GET /v1/company/ico/51636549?format=pdf
GET /v1/company/ico/51636549?format=md
GET /v1/company/ico/51636549?format=json
```

## Data used
- RPO – Legal Entities Register
- Register of Financial Statements
- Tax Authority – VAT payers
- Social Insurance Agency – debtors
- Insolvency Register

## Frequently asked questions

### How many company IDs fit in one batch?

The limit depends on the plan. Larger lists can be split across several batches that run in parallel.

### How is a batch billed?

The same as individual calls – by the number of entities processed. A batch is faster and more reliable, not cheaper.

### What is the Markdown format for?

It is readable both by people and by language models. If you are building an assistant that answers questions about a company, Markdown output is a better input than raw JSON.
