# TEAC DYCTEA Spanish Tax Tribunal Doctrine Scraper (`jungle_synthesizer/teac-dyctea-spain-tax-tribunal-resolution-scraper`) Actor

Full corpus of binding doctrine criteria from Spain's TEAC and regional TEAR economic-administrative tribunals. Each record carries the R.G. register number, resolving tribunal, tax concept chain, cited norm and article, and change-of-criterion status for every published criterion.

- **URL**: https://apify.com/jungle\_synthesizer/teac-dyctea-spain-tax-tribunal-resolution-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Business, Automation, Other
- **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

## Spain Tax Tribunal Doctrine Scraper — TEAC & TEAR DYCTEA Criteria

Scrapes the full published doctrine of Spain's Tribunal Económico-Administrativo Central (TEAC) and its regional TEAR tribunals from the Ministry of Finance's DYCTEA database. Returns every binding criterion with its R.G. register number, resolving tribunal, resolution date, tax concept tags, cited statutes and articles, and a change-of-criterion / unifying-doctrine classification — the doctrine that binds the Spanish tax authority (AEAT) on every case it applies to.

***

### Spain Tax Tribunal Doctrine Scraper Features

- Covers the **entire published DYCTEA corpus** — TEAC and every regional TEAR in one sweep, not a filtered search
- Returns the **full criterion text**, not a truncated summary — the actual binding doctrine
- Classifies each criterion's **change-of-criterion** and **unifying-doctrine** status from the resolution's own published text
- Extracts the **cited statutes and articles** and the **tax concept tags** DYCTEA files each criterion under
- Resolves **sibling criteria** — other criteria published under the same resolution
- Resumable — a run that stops partway through picks back up without re-charging for records you already have

***

### Who Uses a Spanish Tax Tribunal Doctrine Scraper?

- **Tax advisory (asesoría fiscal) firms and Big-4 tax practices** — track which TEAC criteria currently bind the AEAT before advising a client or filing a position
- **Tax litigation boutiques** — find prior doctrine and change-of-criterion history relevant to an ongoing dispute
- **Legal research and compliance platforms** — build a structured, diffable dataset of Spanish tax doctrine instead of a search-box lookup
- **Legaltech vendors** — extend a Spanish case-law or regulatory dataset with the tax tribunal layer

***

### How Spain Tax Tribunal Doctrine Scraper Works

1. The scraper reads DYCTEA's published criteria index — no search terms needed, since the full corpus is public
2. It works through every listing page, then visits each criterion's own page for the full text and details
3. Each criterion's resolution type and status are read from the tribunal's own published wording
4. Records land in your dataset as they're found — flat JSON, one row per criterion

***

### Input

```json
{
  "maxItems": 100
}
```

| Field          | Type    | Default | Description |
|----------------|---------|---------|-------------|
| `maxItems`     | Integer | `10`    | Maximum number of criteria to return. `0` runs unlimited — the full published corpus, to exhaustion. |
| `resumeCursor` | String  | —       | Cursor from a previous run's Output. Leave empty for a fresh crawl. |

#### Resuming a large crawl

Every run emits a `resumeCursor` in its Output. If a large crawl stops before it finishes — because it hit `maxItems`, your spend cap (`maxTotalChargeUsd`), or was aborted — start a new run with **the same input** plus that `resumeCursor` to continue from where it left off. The crawl resumes from the queued work the previous run didn't reach.

- You are **not re-charged** for records the earlier run already delivered.
- Resume within your account's run-retention window — on the free tier, roughly your 10 most recent runs. Once the source run is pruned, its `resumeCursor` is no longer valid.
- `resumeCursor` is opaque — supply it unmodified.

***

### Spain Tax Tribunal Doctrine Scraper Output Fields

```json
{
  "criterion_id": "00/03900/2023/00/0/1",
  "rg_number": "00/03900/2023/00/00",
  "tribunal": "TEAC",
  "tribunal_unit": "00",
  "resolution_date": "2026-07-17",
  "resolution_type": "Resolución",
  "criterion_text": "La suspensión cautelar de las deudas como consecuencia de la reclamación económico-administrativa interpuesta frente a las mismas no obstaba a que la Administración pudiera derivar la responsabilidad solidaria...",
  "criterion_status": "criterio reiterado",
  "is_unifying_doctrine": false,
  "tax_concept": ["Deudor principal", "Período voluntario", "Procedimiento de recaudación", "Responsables solidarios", "Suspensión cautelar"],
  "cited_norm": ["Ley 58/2003 General Tributaria LGT"],
  "cited_article": ["42.2.a)", "67.2"],
  "related_criteria": [],
  "resolution_pdf_url": "https://serviciostelematicosext.hacienda.gob.es/TEAC/DYCTEA/textoresolucion.aspx?id=00/03900/2023/00/0/1",
  "source_url": "https://serviciostelematicosext.hacienda.gob.es/TEAC/DYCTEA/criterio.aspx?id=00/03900/2023/00/0/1",
  "scraped_at": "2026-09-28T15:37:42.201Z"
}
```

| Field                  | Type    | Description |
|------------------------|---------|-------------|
| `criterion_id`         | String  | DYCTEA's own identifier for this criterion — the stable key across runs. |
| `rg_number`            | String  | Register number (R.G.) of the underlying resolution. |
| `tribunal`             | String  | Resolving tribunal — TEAC, a named TEAR (regional tribunal), or a Sala Desconcentrada. |
| `tribunal_unit`        | String  | DYCTEA's internal code for the resolving tribunal. |
| `resolution_date`      | String  | Date the resolution was issued (ISO-8601). |
| `resolution_type`      | String  | Resolution type: `Resolución`, `Recurso de alzada`, or `Recurso extraordinario de alzada para unificación de criterio`. |
| `criterion_text`       | String  | The full binding doctrine criterion — the sellable payload, not a truncated summary. |
| `criterion_status`     | String  | Doctrine status: `criterio reiterado`, `criterio relevante`, or `cambio de criterio`. |
| `is_unifying_doctrine` | Boolean | `true` when the resolution is marked as unifying doctrine (unificación de criterio). |
| `tax_concept`          | Array   | Tax concept tags this criterion is filed under. |
| `cited_norm`           | Array   | Statutes cited by this criterion. |
| `cited_article`        | Array   | Articles cited across those statutes. |
| `related_criteria`     | Array   | Other criterion IDs published under the same resolution, where applicable. |
| `resolution_pdf_url`   | String  | Link to the full text of the underlying resolution, served as an HTML document. |
| `source_url`           | String  | Canonical DYCTEA URL for this criterion. |
| `scraped_at`           | String  | When this record was collected. |

***

### FAQ

#### How do I scrape TEAC and TEAR tax tribunal doctrine?

Spain Tax Tribunal Doctrine Scraper needs no account and no API key. Set a `maxItems` cap and run it — you get back a dataset of doctrine criteria covering TEAC and every regional TEAR.

#### Does this cover regional TEARs, or only TEAC?

Both. DYCTEA indexes TEAC and every regional TEAR in one database, and this scraper sweeps all of it — `tribunal` tells you which one issued each criterion.

#### What's the difference between `criterion_status` values?

`cambio de criterio` marks a criterion that changes a prior TEAC position — the event a tax practice most needs to catch. `criterio reiterado` marks a criterion that restates an earlier one. `criterio relevante` is the ordinary case: a new or standing criterion with neither marker.

#### Can I get the full text of the underlying resolution, not just the criterion?

Yes — `resolution_pdf_url` links to the full resolution text DYCTEA publishes for each criterion, served as an HTML document.

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

Billed per record via Apify's pay-per-event pricing, plus a small per-run start fee.

***

### Need More Features?

Need custom fields, filters, or a different target site? [File an issue](https://console.apify.com/actors/issues) or get in touch.

### Why Use Spain Tax Tribunal Doctrine Scraper?

- **Complete coverage** — the full published DYCTEA corpus across TEAC and every regional TEAR, not a hand-picked search
- **Full criterion text** — the actual binding doctrine, not a truncated search-result snippet
- **Diffable by design** — R.G. number, tribunal, tax concept chain, cited norm/article and change-of-criterion status as typed fields, so a repeat run tells you exactly what changed
- **Resumable** — a large crawl that gets interrupted picks back up without double-billing you for records it already delivered

# 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.

## `resumeCursor` (type: `string`):

Leave empty for a fresh crawl. To CONTINUE a previous run where it stopped — without paying again for records you already received — paste the `resumeCursor` value from that run's Output (the run's OUTPUT key). Resume promptly: the previous run's data expires with your account's retention window (free tier: your ~10 most recent runs).

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

Maximum number of items to scrape

## 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
}
```

# 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
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/teac-dyctea-spain-tax-tribunal-resolution-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,
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/teac-dyctea-spain-tax-tribunal-resolution-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
}' |
apify call jungle_synthesizer/teac-dyctea-spain-tax-tribunal-resolution-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jungle_synthesizer/teac-dyctea-spain-tax-tribunal-resolution-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/N6NBP7i69OIxsHh22/builds/shHS6EW3uXBWHBhrT/openapi.json
