How do I get a Spanish company by NIF together with its BORME events?

Two calls: GET /companies/search?country=ES&company_number=<NIF> returns the company, GET /company-events/search?country=ES&company_number=<NIF> returns its BORME acts, newest first.

Call 1: the company

curl 'https://api.prometiam.com/functions/v1/risk-api/companies/search?country=ES&company_number=A15075062' \
  -H 'Authorization: Bearer rk_live_demo_publichn'

Answer of 10 November 2026, shortened (the full object has about 60 fields):

{
  "data": [
    {
      "id": 1741526,
      "match_type": "exact",
      "country": "ES",
      "company_number": "A15075062",
      "company_name": "INDUSTRIA DE DISEÑO TEXTIL, S.A",
      "identifiers": [ { "type": "nif", "value": "A15075062" }, { "type": "vat", "value": "ESA15075062" } ],
      "vat_number": "ESA15075062",
      "vat_number_source": "rule",
      "lei": "549300TTCXZOGZM2EY83",
      "legal_form": "SA",
      "status": "active",
      "founding_date": "1985-06-12",
      "address": "AV. DIPUTACIÓN SIN EDIFICIO INDITEX, 15142, ARTEIXO, LA CORUÑA",
      "register": "BORME (Registro Mercantil)",
      ...
    }
  ],
  "pagination": { "count": 1, "has_more": false, "next_cursor": null },
  "meta": { "search_mode": "company_number_exact", "country": "ES", ... }
}

Call 2: its BORME events

The demo key does not include company events. The call needs a key of your own with the company_events scope (Starter and above; a trial key has 25 calls on it):

curl 'https://api.prometiam.com/functions/v1/risk-api/company-events/search?country=ES&company_number=A15075062&limit=3' \
  -H 'Authorization: Bearer rk_live_...'

Answer fetched on 10 November 2026 with a real key. The text of the acts names the officers appointed, so it is cut here:

{
  "data": [
    {
      "id": 19771872,
      "company_id": 1741526,
      "company_name": "INDUSTRIA DE DISEÑO TEXTIL, S.A",
      "company_number": "A15075062",
      "country": "ES",
      "source": "BORME (Spain)",
      "event_type": "director_change",
      "act_type": "NOMBRAMIENTOS",
      "signal": "leadership_change",
      "event_date": "2026-10-22",
      "event_detail": "INDUSTRIA DE DISEÑO TEXTIL, S.A.(R.M. A CORUÑA).\nNombramientos. Apoderado: ...",
      "notice_url": "https://www.boe.es/borme/dias/2026/10/22/pdfs/BORME-A-2026-204-15.pdf",
      ...
    },
    { "id": 19717006, "event_type": "director_change", "act_type": "NOMBRAMIENTOS", "event_date": "2026-10-06", ... },
    { "id": 19717005, "event_type": "director_change", "act_type": "CESES_DIMISIONES", "event_date": "2026-10-06", ... }
  ],
  "pagination": { "count": 3, "has_more": true, "next_cursor": "2026-10-06_19717005" },
  "meta": { "search_mode": "company_number_exact", ... }
}

Add include=notice to attach the publication behind each event: {"id": 206701, "source": "BORME", "published_date": "2026-10-22", "reference": "BORME-A-2026-204-15", "type": "A", "region": "A CORUÑA", "url": "..."}.

How to read the answer

FieldWhat it tells you
company_number / vat_numberThe NIF, and the VAT number. vat_number_source rule means the number is built from the NIF; check it with GET /vat/{number}.
event_type and act_typeThe normalised type (director_change) and the BORME act (NOMBRAMIENTOS, CESES_DIMISIONES).
event_dateThe BORME publication date of the act.
event_detailThe act as the BORME prints it, served as published. It can name natural persons (officers, attorneys); they are left out of the sample on this page.
notice_urlThe BORME page in the Boletín Oficial del Estado.
pagination.next_cursorPass it back as cursor while has_more is true.

What it costs

The company search costs 1 credit and the events call 2 credits, 3 credits for the pair. Errors are free. Starter EUR 9.99 includes 1,000 credits a month, Professional EUR 29.99 10,000, Scale EUR 99.99 50,000.

Limits

  • The NIF must be a company NIF: an entity letter, seven digits and the control character. A personal DNI or NIE is refused.
  • If a NIF finds nothing under letter A or B, the search can return the company holding the same digits under the other letter (match_type nif_other_letter, with a notice in meta). Confirm the name: the two records can both be stale. The events call stays exact.
  • A company closed by a merger is served as closed; duplicate records are never served.
  • Events come from the BORME, which publishes the acts of the Registro Mercantil, not the register itself. Read the BORME page for the legal text.
  • Credit: Based on data from the Agencia Estatal Boletín Oficial del Estado (BORME).

What can go wrong

  • 400 validation_error: the NIF is malformed, for example A1507506, one character short, or limit is outside 1 to 100.
  • 403 upgrade_required: the key has no company_events scope or its trial calls are used up.
  • 429: rate limit or credits exhausted. Wait for the reset in X-RateLimit-Reset.

Related pages

Sign up · API documentation

The free trial lasts 14 days and includes 500 credits. A card is required and nothing is charged during the trial; it then continues as Starter (EUR 9.99/month) unless you cancel.

Frequently asked questions

Why does the events call need a key of my own?
Events carry the officers named in the BORME acts, so they sit behind the company_events scope: Starter and above, with 25 calls on a trial key. The demo key covers the company search only.
Can I read all events of Spain for one day?
Yes, with the country feed: leave out the company and pass country=ES and date_from (7 days ago by default, at most 31 days back; an older date is a 400). A feed call costs 2 credits. See the recipe for the daily corporate events feed.
Is the NIF the VAT number?
The Spanish VAT number is ES plus the NIF. The API builds it from the NIF and says so in vat_number_source rule; GET /vat/{number} asks the EU VIES service.
Does it return sole traders?
No. The company NIF identifies companies; a personal DNI or NIE is refused with a 400.