OpenMercantil Contracts API
Public procurement (PLACSP) rankings
Public procurement (PLACSP) rankings
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/openmercantil-contracts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
openapi: 3.2.0
info:
title: OpenMercantil Public Contracts API
version: 1.4.0
description: 'Public JSON API for Spanish company information derived from BORME and other
public sources. OpenMercantil is independent and informational; it is not
the BOE, BORME or Registro Mercantil and does not replace official
certificates or registry extracts. The API is free and public, requires no
API key, and is rate-limited per IP. Versions v1.0 through v1.4 are
available and documented at https://openmercantil.es/api/documentacion.
'
termsOfService: https://openmercantil.es/terminos-de-uso
contact:
name: OpenMercantil
url: https://openmercantil.es/soporte
email: social@openmercantil.es
license:
name: CC BY 4.0 For Derived Public-Data Outputs
url: https://creativecommons.org/licenses/by/4.0/
servers:
- url: https://openmercantil.es
description: Production
tags:
- name: Contracts
description: Public procurement (PLACSP) rankings
paths:
/api/v1/persona/{slug}/contracts:
get:
tags:
- Contracts
summary: List Public Contracts For Person
operationId: getPersonContracts
description: List public procurement (PLACSP) contracts associated with the person (v1.4).
parameters:
- name: slug
in: path
required: true
schema:
type: string
example: amancio-ortega-gaona
responses:
'200':
description: Contracts list
content:
application/json:
schema:
type: object
additionalProperties: true
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
/api/v1/contracts/top-companies:
get:
tags:
- Contracts
summary: Top Companies By Public Contracts
operationId: getTopCompaniesByContracts
description: Ranking of companies by public-procurement contract volume, optionally filtered by province and CNAE (v1.4).
parameters:
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 500
default: 50
- name: province
in: query
required: false
schema:
type: string
example: madrid
- name: cnae
in: query
required: false
schema:
type: string
example: F
responses:
'200':
description: Top companies ranking
content:
application/json:
schema:
type: object
additionalProperties: true
'429':
$ref: '#/components/responses/TooManyRequests'
/api/v1/contracts/top-companies.csv:
get:
tags:
- Contracts
summary: Top Companies By Public Contracts As CSV
operationId: getTopCompaniesByContractsCsv
description: CSV download of the top-companies-by-contracts ranking (v1.4).
parameters:
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 1000
default: 100
responses:
'200':
description: CSV download
content:
text/csv:
schema:
type: string
'429':
$ref: '#/components/responses/TooManyRequests'
/api/v1/contracts/top-persons:
get:
tags:
- Contracts
summary: Top Persons By Public Contracts
operationId: getTopPersonsByContracts
description: Ranking of persons by public-procurement contract volume (v1.4).
parameters:
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 500
default: 30
responses:
'200':
description: Top persons ranking
content:
application/json:
schema:
type: object
additionalProperties: true
'429':
$ref: '#/components/responses/TooManyRequests'
/api/v1/contracts/top-persons.csv:
get:
tags:
- Contracts
summary: Top Persons By Public Contracts As CSV
operationId: getTopPersonsByContractsCsv
description: CSV download of the top-persons-by-contracts ranking (v1.4).
parameters:
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 1000
default: 100
responses:
'200':
description: CSV download
content:
text/csv:
schema:
type: string
'429':
$ref: '#/components/responses/TooManyRequests'
components:
schemas:
ErrorResponse:
type: object
properties:
error:
type: string
message:
type: string
additionalProperties: true
responses:
TooManyRequests:
description: Rate limit exceeded
headers:
Retry-After:
description: Seconds to wait before retrying.
schema:
type: integer
X-RateLimit-Limit:
description: Maximum requests per window (60 per minute by IP on the public anonymous tier).
schema:
type: integer
X-RateLimit-Remaining:
description: Remaining requests in the current window.
schema:
type: integer
X-RateLimit-Reset:
description: Unix timestamp when the rate-limit counter resets.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
securitySchemes:
sessionCookie:
type: apiKey
in: cookie
name: session
description: Session cookie issued after web sign-in, required only for billing endpoints.