# Spanish Constitutional Court Rulings — Tribunal Constitucional (`jungle_synthesizer/tribunal-constitucional-spain-jurisprudence-scraper`) Actor

Scrapes every Sentencia, Auto and Declaración issued by the Spanish Constitutional Court since 1980. Returns the full bench, dissenting opinions, descriptors, cited legislation and full text, keyed on ECLI.

- **URL**: https://apify.com/jungle\_synthesizer/tribunal-constitucional-spain-jurisprudence-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Business, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 record scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Spanish Constitutional Court Rulings — Tribunal Constitucional Scraper

Scrape the complete jurisprudence of Spain's Constitutional Court, published by the [Tribunal Constitucional's HJ database](https://hj.tribunalconstitucional.es). Returns every Sentencia, Auto and Declaración issued since 1980 — full deciding bench, dissenting opinions, subject-matter descriptors, cited legislation and the complete resolution text — for roughly 35,000 resolutions, keyed on ECLI.

***

### Tribunal Constitucional Scraper Features

- Extracts every Sentencia, Auto and Declaración the court has issued since 1980 — the complete constitutional jurisprudence of Spain, not a search result you have to page through yourself.
- Returns the full deciding bench per resolution: every magistrate who sat, the ponente (rapporteur), and — when it happened — who filed a dissenting opinion.
- Carries the court's own doctrinal thesaurus: subject-matter descriptors, constitutional-concept descriptors, and every piece of legislation the resolution cites.
- Full resolution text in one record — background, legal reasoning, ruling and any dissenting opinions, not just a summary.
- Filter by resolution type and year range, or leave both at their defaults for the full 1980-to-present sweep.
- Every record carries an ECLI (European Case Law Identifier), the standard key for joining onto other legal datasets.

***

### Who Uses Spanish Constitutional Court Data?

- **Legal-AI teams** — build a training or retrieval corpus of Spanish constitutional law with real citations attached.
- **Constitutional-law faculty** — pull the entire case history from 1980 to present for research, casebooks, or teaching material.
- **Litigation strategists** — study which magistrates dissent on which subject matter, which is judicial-behavior data most directories don't expose.
- **Compliance and policy teams** — track constitutional rulings that touch legislation affecting your sector.
- **Legal publishers and data vendors** — feed structured case metadata, keyed on ECLI, into a citation or cross-reference database.

***

### How the Tribunal Constitucional Scraper Works

1. Set a year range and the resolution types you want — Sentencia, Auto, Declaración, or all three — or leave the input at its defaults.
2. The scraper walks the court's own archive year by year, so a full run holds a bounded, finishable dataset instead of an open-ended search result.
3. Each resolution comes back as one record: identifying details, the full bench, dissenting votes, descriptors, cited legislation, a court-authored summary, and the complete text.
4. Adjust `yearFrom`, `yearTo` or `resolutionTypes` to scope a run to exactly the slice you need.

***

### Input

```json
{
  "maxItems": 100,
  "resolutionTypes": ["SENTENCIA", "AUTO", "DECLARACION"],
  "yearFrom": 1980,
  "yearTo": 2025
}
```

| Field             | Type    | Default                                | Description |
|-------------------|---------|----------------------------------------|-------------------------------------------------------------------------------|
| `maxItems`        | Integer | `10`                                   | Maximum number of resolutions to return. The full corpus is roughly 35,000 resolutions since 1980 — raise this (and yearFrom/yearTo, if needed) to pull the complete history across one or more runs. |
| `resolutionTypes` | Array   | `["SENTENCIA", "AUTO", "DECLARACION"]` | Which resolution types to include. Leave at the default to cover every type the court issues. |
| `yearFrom`        | Integer | `1980`                                 | First year to include. The court's HJ database starts at 1980. |
| `yearTo`          | Integer | current year                           | Last year to include. Leave blank for the current year. |

***

### Tribunal Constitucional Scraper Output Fields

```json
{
  "resolution_id": "32018",
  "ecli": "ECLI:ES:TC:2025:192",
  "resolution_type": "SENTENCIA",
  "resolution_number": "192",
  "resolution_year": "2025",
  "is_bis": false,
  "resolution_date": "2025-12-16",
  "publication_date_boe": "2026-01-24",
  "boe_reference": "BOE-A-2026-1758",
  "appeal_type": "Recurso de inconstitucionalidad",
  "appeal_number": "6562",
  "appeal_year": "2024",
  "is_consolidated": false,
  "chamber": "Pleno",
  "rapporteur": "doña María Luisa Balaguer Callejón",
  "magistrates": ["don Cándido Conde-Pumpido Tourón", "doña Inmaculada Montalbán Huertas"],
  "has_dissenting_opinion": true,
  "dissenting_magistrates": ["don Ricardo Enríquez Sancho", "don Enrique Arnaldo Alcubilla"],
  "subject_matter": ["Indulto", "Leyes singulares"],
  "descriptors": ["Amnistía", "Estado de Derecho"],
  "cited_legislation": ["Constitución española, de 27 de diciembre de 1978"],
  "summary": "Se declara la pérdida sobrevenida de objeto del recurso de inconstitucionalidad...",
  "full_text": "El Pleno del Tribunal Constitucional, compuesto por...",
  "source_url": "https://hj.tribunalconstitucional.es/es/Resolucion/Show/32018",
  "scraped_at": "2026-09-28T12:00:00.000Z"
}
```

| Field                    | Type    | Description |
|--------------------------|---------|----------------------------------------------------------------------------------|
| `resolution_id`          | String  | Stable internal id for the resolution. |
| `ecli`                   | String  | European Case Law Identifier: `ECLI:ES:TC:<year>:<number>`. |
| `resolution_type`        | String  | `SENTENCIA`, `AUTO` or `DECLARACION`. |
| `resolution_number`      | String  | Resolution number within its year. |
| `resolution_year`        | String  | Resolution year. |
| `is_bis`                 | Boolean | Whether this is a "bis" (duplicate-numbered) resolution. |
| `resolution_date`        | String  | Date the resolution was issued (`YYYY-MM-DD`). |
| `publication_date_boe`   | String  | Date published in the BOE, Spain's official gazette (`YYYY-MM-DD`). Null until publication catches up on very recent resolutions. |
| `boe_reference`          | String  | BOE publication reference. |
| `appeal_type`            | String  | Type of appeal — Recurso de inconstitucionalidad, Recurso de amparo, and others. |
| `appeal_number`          | String  | Primary appeal's docket number. |
| `appeal_year`            | String  | Primary appeal's docket year. |
| `is_consolidated`        | Boolean | Whether this resolution consolidates more than one appeal. |
| `chamber`                | String  | Deciding body: Pleno, Sala Primera, Sala Segunda, or a Sección. |
| `rapporteur`             | String  | The ponente magistrate(s) for this resolution. |
| `magistrates`            | Array   | Full bench for this resolution. |
| `has_dissenting_opinion` | Boolean | Whether one or more votos particulares (dissenting opinions) were filed. |
| `dissenting_magistrates` | Array   | Magistrates who filed a dissenting opinion. |
| `subject_matter`         | Array   | Material-concept descriptors — the court's MATERIA facet. |
| `descriptors`            | Array   | Constitutional-concept descriptors — the court's own doctrinal thesaurus. |
| `cited_legislation`      | Array   | Legislation cited in the resolution. |
| `summary`                | String  | Court-authored summary. |
| `full_text`              | String  | Full resolution text — background, legal reasoning, ruling and dissents. |
| `source_url`             | String  | Canonical URL for this resolution. |
| `scraped_at`             | String  | Timestamp when the record was scraped. |

***

### FAQ

#### How do I scrape Spanish Constitutional Court rulings?

Run the Tribunal Constitucional Scraper with a `maxItems` value and, optionally, a year range or resolution-type filter. It returns one record per resolution — identifying details, bench, dissenting votes, descriptors, cited legislation and full text — with no login or search form to fill in yourself.

#### How much does this actor cost to run?

Pricing is pay-per-result at roughly $0.001 per resolution, plus a small per-run charge. Filter to a year range or resolution type to control run size, or check the Apify pricing tab on this actor's page for exact current rates.

#### What data can I get from the Tribunal Constitucional?

Every Sentencia, Auto and Declaración since 1980 — around 35,000 resolutions in total. Each record includes the ECLI, resolution dates, the full deciding bench, the ponente, dissenting opinions and who filed them, subject-matter and doctrinal descriptors, cited legislation, a court-authored summary, and the complete resolution text.

#### Can I filter by resolution type?

Yes. Set `resolutionTypes` to any combination of `SENTENCIA`, `AUTO` and `DECLARACION`. Combine it with `yearFrom`/`yearTo` to scope a run to a specific slice of the court's history.

#### Do I need an account or API key for the Tribunal Constitucional site?

No. The court's jurisprudence database is public, and this actor needs no login, API key, or account of any kind to run.

***

### Need More Features?

Need custom fields, a different filter, or a related Spanish court's jurisprudence? [File an issue](https://console.apify.com/actors/issues) or get in touch.

### Why Use the Tribunal Constitucional Scraper?

- **Complete, not partial** — a year-by-year sweep of the full 1980-to-present archive, so you get the entire body of Spanish constitutional jurisprudence in one bounded dataset instead of a page of search results.
- **Judicial-behavior data, not just text** — the full bench, the ponente, and every dissenting opinion come back structured, which turns the dataset into something you can analyze, not just read.
- **Built to join** — every record carries an ECLI, cited legislation and doctrinal descriptors, so it slots straight into a broader legal corpus without extra cleanup.

# Actor input Schema

## `sp_intended_usage` (type: `string`):

What will this data feed? E.g. lead lists, KYB checks, price tracking.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

We'll personally help with your use case. No spam.

## `maxItems` (type: `integer`):

Maximum number of resolutions to return. The full corpus is roughly 35,000 resolutions since 1980 — raise this (and, if needed, yearFrom/yearTo) to pull the complete history across one or more runs.

## `resolutionTypes` (type: `array`):

Which resolution types to include. Leave at the default to cover every type the court issues.

## `yearFrom` (type: `integer`):

First ANNO\_RESOLUCION to include. The court's HJ database starts at 1980.

## `yearTo` (type: `integer`):

Last ANNO\_RESOLUCION to include. Leave blank for the current year.

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "maxItems": 10,
  "resolutionTypes": [
    "SENTENCIA",
    "AUTO",
    "DECLARACION"
  ],
  "yearFrom": 1980
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "maxItems": 10,
    "resolutionTypes": [
        "SENTENCIA",
        "AUTO",
        "DECLARACION"
    ],
    "yearFrom": 1980
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/tribunal-constitucional-spain-jurisprudence-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "maxItems": 10,
    "resolutionTypes": [
        "SENTENCIA",
        "AUTO",
        "DECLARACION",
    ],
    "yearFrom": 1980,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/tribunal-constitucional-spain-jurisprudence-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "maxItems": 10,
  "resolutionTypes": [
    "SENTENCIA",
    "AUTO",
    "DECLARACION"
  ],
  "yearFrom": 1980
}' |
apify call jungle_synthesizer/tribunal-constitucional-spain-jurisprudence-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jungle_synthesizer/tribunal-constitucional-spain-jurisprudence-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/c6Kq10HNpaQseweuQ/builds/ySmfvD2yT1vNEcxT1/openapi.json
