KYB API to verify Spanish companies Tax ID, registry status and directors
Automate the onboarding of Spanish B2B customers and suppliers: check that the tax ID (CIF/NIF)
belongs to a company that exists and is active, who its directors are and what it has filed in the BORME.
One REST call, a JSON response.
Type a tax ID (CIF) or a company name and see the data the API returns: legal name, registry status, CNAE activity code and the latest BORME filings. No sign-up needed.
GET/api/v1/companies?cif={CIF}JSON
Try with
Named official sourcesBORME · Public Procurement Platform · BDNS · GLEIF · VIES · see all
BORME loaded every business dayIncorporations, appointments, dissolutions and insolvencies kept up to date
Companies onlyNo data on individuals, for data protection reasons
Support in under 2 hEmail, phone and WhatsApp on the Pro plan
Know Your Business
What a company KYB checks and what the API covers
KYB is the verification of a company before you onboard it as a customer, supplier or partner.
This is what you can automate with the API for Spanish companies, and what you will need to cover elsewhere.
Check
What the API returns
Plan
The company exists and the tax ID is its ownGET /companies
The legal name of the company behind the tax ID (CIF/NIF) your customer gives you, with its legal form (and its ISO 20275 code) and its LEI code if it has one.
From Free
It is still activeGET /companies
Registry status based on BORME filings: active, dissolved, in insolvency, closed… With status_confidence (high, medium or low) so you know when it may be out of date. How accurate it is.
From Free
Who can sign on its behalfGET /companies/verify
Current directors and officers with their appointment date. Pass the signer's name and it tells you whether they are a current director or the sole shareholder.
Pro
Who controls itGET /companies
The sole shareholder of single-member companies, with the date and the link to the BORME filing, and the group parent company the company reports to GLEIF. If it has several shareholders, the shareholding is not public.
Pro
Where it is and what it doesGET /companies
Full registered address, CNAE activity code and corporate purpose. On Free, CNAE and province.
Pro
Whether it uses a registered-address serviceGET /companies/verify
How many active companies share its exact address. From 10, SHARED_ADDRESS alert; from 50, MASS_ADDRESS (registered-address centre). Not fraud on its own, but the first sign of a shell company. Also the headcount band, when known.
Pro
Recent changes worth a reviewGET /companies/borme
BORME filing history: changes of directors, address or capital.
Pro
Risk signalsGET /companies/risk-profile
Dissolutions, insolvencies and other corporate signals (Pro). Risk and solvency profile (Business).
ProBusiness
Whether it is sanctionedGET /sanctions/screen
The company and its current directors, screened against the EU, UN and OFAC (US) sanctions lists, updated daily. Each match includes its similarity level, programme, country and date of birth so you can confirm or rule it out. Also inside /verify.
Business
Outside the scope of the API
A full KYB usually also needs these two checks. We do not cover them, but this is how to handle them:
Ultimate beneficial owner (UBO)Ask the customer for a UBO declaration, or check Spain's beneficial ownership register (Registro de Titularidades Reales) if you have access as an obliged entity. The API gives you the starting point: the sole shareholder of single-member companies and the group parent company.
Politically exposed persons (PEP)There is no public PEP list in Spain: you will need a dedicated provider. Sanctions lists are covered by the API (Business plan), and the directors it returns can be screened with your PEP provider.
Onboarding B2B
How to automate KYB onboarding with the API
A typical company onboarding flow, end to end.
1
Ask for the tax ID in your sign-up form
The NIF (formerly CIF) is enough to identify a Spanish company. If the customer does not have it at hand, the name search finds it for you.
2
Verify the company in one call
/companies/verify with the tax ID, the legal name you were given and the signer's name checks that the company exists and operates, that the name matches, that the signer is a current director (or the sole shareholder) and, if you ask, the EU VAT number in VIES. It also returns the legal form, the LEI, the parent company and the sole shareholder. It uses 2 requests (Pro).
3
Decide with the recommendation
pass: no alerts; the onboarding can go ahead.
review: insolvency, a name that does not match, a signer who is not a director or a VAT number not in VIES. Send it to review.
fail: struck off, dissolved, in liquidation or with its registry sheet closed. Reject it.
Every alert comes with its reason. If you prefer your own rules, /companies?cif=…&admin=true gives you the data to decide.
4
Keep the evidence
Store the response with its checked_at and the request identifier (X-Request-Id header) as proof of the check you carried out.
5
Monitor your portfolio without using requests
Add your customers and suppliers to /watchlist and we tell you when they file in the BORME or change status or risk level (100 companies on Pro, 1,000 on Business, with webhooks). For one-off checks, /companies/batch looks up 100 tax IDs per request.
GET /api/v1/companies/verify?cif=B12345678&name=…&person=…&vat=true
The tax ID does not have a company format (letter, 7 digits and a check character).
AUTONOMO_NOT_SUPPORTED
It is an individual's tax ID. The API only covers companies, for data protection reasons.
About 1.3 euro cents per verificationOn Pro (€19 a month, 3,000 requests), each /verify uses 2. A Commercial Registry extract (nota simple) costs several euros per company.
Try it for freeThe Sandbox answers with the same structure and the same API key, using test tax IDs.
Named sourcesBORME, the Public Procurement Platform, BDNS, GLEIF and VIES. See all sources.
Key concepts
KYB, KYC and the Spanish tax ID: what to know
Three ideas that prevent mistakes when you set up verification.
01
KYB is not KYC
KYC verifies individuals: who they are and whether their identity is real. KYB verifies companies: that they exist, that they are still active, who runs them and, if your activity requires it, who their ultimate beneficial owner is.
KYCPeople≠KYBCompanies
02
NIF or CIF?
Since 2008 Spanish companies have a NIF; "CIF" is still widely used for it. The API accepts any company's NIF, with or without hyphens. Individuals' NIFs (sole traders, autónomos) are not supported, for data protection reasons.
B-12345678→B12345678
03
Validating the format is not enough
The check digit only tells you the number is well formed. It does not tell you whether the company exists, whether it is active or whether the person signing up has anything to do with it. For that you need to look it up.
Valid format
Does it exist?
Is it active?
Who signs?
Who uses it
Company verification by industry
The same verification flow, used at a different moment in each business.
Fintech and lending
Onboarding Spanish businesses as customers and checking their situation before granting credit or payment terms.
Most used/verify/risk-profile
B2B marketplaces
Onboarding sellers and suppliers after checking that the company exists and is active.
Most used/verify/search
SaaS and invoicing
Business customers set up with the correct legal name and tax address from day one.
Most used/companies/search
Accounting and law firms
Onboarding new clients and reviewing the portfolio regularly to catch dissolutions or insolvencies.
Most used/verify/watchlist
Procurement and suppliers
Supplier due diligence: status, directors and, on Business, public contracts and risk profile.
Most used/verify/contracts
Quick reference
API endpoints for KYB
The ones most used in a company verification. The rest (commercial scoring, newly
incorporated companies, corporate graphs…) are in the docs. If you are looking for the full
Spanish company data API (search, enrichment, BORME
and risk), start there.
Endpoint
What it does in a KYB
Plan
Example
GET /companies/verify
?cif=…&name=…&person=…&vat=true
KYB verification in one call
Exists and operates, name match, signer is a current director or sole shareholder, VAT number in VIES, ISO legal form and LEI, with alerts and a recommendation (pass, review or fail). 2 requests.
PRO / BUS
GET /companies
?cif=…
Company data by tax ID
Legal name, registry status, CNAE code and province. With admin=true, directors and officers (Pro). On Free, the address and corporate purpose are hidden.
FREE
GET /companies/search
?q=…
Search by name
Find a company's tax ID when the customer only gives you its name.
FREE
POST /companies/reconcile
JSON: items[]
Name to tax ID in bulk
Turn your list of customers or suppliers (name and province) into tax IDs. Only matches are charged.
PRO / BUS
POST /companies/batch
JSON: cifs[]
Bulk lookup
Check up to 100 tax IDs in a single request to review your portfolio. Only companies found are charged.
PRO / BUS
GET /companies/borme
?cif=…
BORME filing history
Every filing of the company in the Commercial Registry gazette, for audit and due diligence.
PRO / BUS
POST /watchlist · GET /watchlist/events
JSON: cifs[]
Portfolio monitoring
Alerts when a monitored company files in the BORME or changes status or risk level. Does not use requests.
PRO / BUS
GET /companies/risk-profile
?cif=…
Risk and solvency profile
Risk level and score, dimensions and alerts, calculated from the BORME and annual accounts filings.
BUSINESS
POST /webhooks
JSON: {url, event}
Monitoring webhooks
Changes in the companies you monitor reach your server as a signed POST, with no polling.
KYB verification example in Python, PHP and Node.js
Verify the company, its legal name and the signer in one call, and decide with the recommendation. API key authentication and SDKs for PHP, Node.js and Python.
verify_company.py
import requests
res = requests.get(
"https://spaincompanyapi.com/api/v1/companies/verify",
params={"cif": "B12345678", "name": "Empresa de Ejemplo SL",
"person": "Juan Pérez García", "vat": "true"},
headers={"X-API-KEY": "your_api_key"},
).json()
ifnot res["success"]:
print("Reject or review:", res["error"]) # e.g. COMPANY_NOT_FOUNDelif res["data"]["decision_hint"] == "pass":
print("Onboarding approved")
else:
print("Manual review:", [f["message"] for f in res["data"]["flags"]])
KYB (Know Your Business) is the verification of a company before you work with it: that it exists, that it is still active, who runs it and, if your activity requires it, who its ultimate beneficial owner is. KYC (Know Your Customer) verifies individuals. The API covers the company side for Spain, with data from the BORME.
It helps you identify the legal entity and check its status and directors with BORME data, and leaves you the response as evidence. It does not replace your due diligence policy: it includes the EU, UN and OFAC sanctions lists (Business plan), but not beneficial ownership or PEP lists, which you need to cover elsewhere.
Yes. Send the company NIF (formerly CIF, with or without hyphens) to /companies and you get its legal name and registry status. If no company has that tax ID, the API answers COMPANY_NOT_FOUND. Individuals' tax IDs (sole traders) are not supported, for data protection reasons.
With /companies/verify (Pro plan or higher) you pass the signer's name in person and the API tells you whether they are a current director, with their position and appointment date, in any order of first name and surnames. You can also request the directors with admin=true and compare them yourself. If they are not there, the usual step is to ask for a power of attorney or review the onboarding manually.
Yes. The /companies/verify endpoint (Pro) checks in one call that the company exists and is active, that the name matches, that the signer is a current director and that the VAT number is registered in VIES, and returns pass, review or fail.
We process the BORME every day: incorporations, director appointments and resignations, changes of address or capital, dissolutions, insolvencies and closures are added with each published issue.
Yes. Add it to monitoring (/watchlist): we tell you when a company files in the BORME or changes status or risk level, without using requests (100 companies on Pro, 1,000 on Business, with webhooks). For a one-off check, /companies/batch looks up 100 tax IDs per request. The Free plan allows 2 requests per second; Pro and Business, 20.
READY TO START
Automate your KYB checks for Spanish companies
Connect company verification to your customer and supplier onboarding. Start with 100 free requests.
How we collect, use, and protect your information.
1. Identity of the Data Controller
The data controller of the personal data collected on this platform is Ariel Martinez Hernandez (hereinafter, "SpainCompanyAPI"), with NIF 54994158P and address at República Dominicana 40, Bajo E, 28983, Parla (Madrid). You can contact us at soporte@apiempresas.es.
2. Purposes and Legal Basis
We process your personal data for the following purposes and legal bases:
Provision of the service and account management: Necessary for the performance of the contract (Terms of Use) upon registration.
Billing and collections: Compliance with legal and tax obligations.
Fraud prevention and security: Based on our legitimate interest to keep the platform secure.
Commercial communications and marketing: We rely on our legitimate interest to send you information about products or services similar to those contracted. You can object to this processing by checking the corresponding box during registration or unsubscribing at any time.
3. Data Retention
The data will be kept as long as you maintain your account active and it is necessary to provide the service. Once canceled, they will be kept duly blocked for the period required by applicable legislation (generally up to 5 years for tax and legal reasons).
4. Recipients and International Transfers
We do not sell your data to third parties. We may transfer them to strictly necessary providers (hosting, analytics, payment gateway such as Stripe). Some of these providers (e.g., Google, GitHub) may transfer data outside the EEA. We ensure they comply with the GDPR through standard contractual clauses or equivalent agreements.
Cloudflare Turnstile: We use Cloudflare Turnstile to protect our forms against spam and automated abuse. The use of Turnstile is subject to the Cloudflare Privacy Policy and Terms.
5. Your Rights (ARCO-POL)
You have the right to obtain confirmation as to whether we are processing your data. You also have the right to:
Access your personal data.
Request its rectification if it is inaccurate.
Request its deletion when it is no longer necessary.
Request the limitation or object to its processing.
Request data portability.
You can exercise them by sending an email to soporte@apiempresas.es. Likewise, if you consider that your data has not been properly processed, you have the right to file a claim with the Spanish Data Protection Agency (AEPD).
Last updated: 11/16/2026
Legal
Legal Notice & Terms of Use
Legal conditions for accessing and using the platform.
1. General Information (LSSI-CE)
In compliance with Law 34/2002 on Information Society Services and Electronic Commerce (LSSI-CE), it is reported that the owner of the SpainCompanyAPI web platform is:
Owner: Ariel Martinez Hernandez
NIF: 54994158P
Address: República Dominicana 40, Bajo E, 28983, Parla (Madrid)
Contact: soporte@apiempresas.es
2. Acceptance
By accessing or registering on the service, you acquire the status of User and accept these terms of use in their entirety. If you do not agree, do not use the platform.
3. Permitted Use Conditions
You agree to make appropriate and lawful use of the service. It is strictly prohibited to:
Attempt to access systems or data without authorization.
Interfere with operation by abusing rate limits, malicious scraping, or cyber attacks.
Use the service for illegal purposes or those that harm the rights of third parties.
4. Account and Security
You are solely responsible for maintaining the confidentiality of your credentials (password, API keys) and for all activity that occurs under your account.
5. Intellectual Property
All content on the platform (design, code, structure, and databases) is the exclusive property of Ariel Martinez Hernandez or has the corresponding licenses. Reproduction, distribution, or modification is not allowed without express authorization.
6. Limitation of Liability
The platform is provided "as is." Within the applicable legal framework, SpainCompanyAPI is not liable for direct or indirect damages derived from the use of information obtained through the API, nor for potential service interruptions due to external causes.
7. Jurisdiction and Applicable Law
These conditions are governed by Spanish law. For the resolution of any dispute derived from the use of the service, the parties submit to the courts and tribunals of the city of Madrid, expressly waiving any other jurisdiction that may apply.