# Renfe train calling points API

Get Renfe calling points by train number and day via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as days_ahead, number, output, and retrieve structured data including source train-number string, selected service date, stop station code, source boarding flag, and source alighting flag for stop list, and service context.

Documentation: https://openany.si/market/apis/renfe/renfe-train-calling-points-api/?offering=bd13db91-6e18-433f-915b-49c98a38bb02
API ID: bd13db91-6e18-433f-915b-49c98a38bb02
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/renfe/v1/train
Page update time: 2026-12-03T02:46:48.310Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:46:45.540Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Renfe train calling points API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "number": {
          "type": "string",
          "description": "Train number, e.g. 02070."
        },
        "date": {
          "type": "string",
          "description": "Day, YYYY-MM-DD. Give this or `days_ahead`."
        },
        "days_ahead": {
          "type": "integer",
          "description": "Day as days from today (0-365), when `date` is not given."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      },
      "required": [
        "number"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "cached": {
      "type": "boolean"
    },
    "credits_used": {
      "type": "integer"
    },
    "date": {
      "type": "string"
    },
    "fetched_at": {
      "type": "string"
    },
    "first_departure": {
      "type": "string"
    },
    "line": {
      "type": "string"
    },
    "number": {
      "type": "string"
    },
    "operator": {
      "type": "string"
    },
    "stops": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean"
          },
          "alighting": {
            "type": "boolean"
          },
          "arrival": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ]
          },
          "boarding": {
            "type": "boolean"
          },
          "code": {
            "type": "string"
          },
          "departure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "distance_km": {
            "type": "number"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "skipped": {
            "type": "boolean"
          }
        }
      }
    },
    "train_type": {
      "type": "string"
    },
    "type_code": {
      "type": "string"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/renfe/v1/train?days_ahead=120&number=02070&output=json&raw=0' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "cached": false,
  "credits_used": 1,
  "date": "2027-03-19",
  "fetched_at": "2026-11-19T12:25:20.856Z",
  "first_departure": "2027-03-19T06:00:00Z",
  "line": "AVE MADRID PTA.AT-SEVILLA S.J.",
  "number": "02070",
  "operator": "AV",
  "stops": [
    {
      "active": true,
      "alighting": true,
      "arrival": null,
      "boarding": true,
      "code": "60000",
      "departure": "2027-03-19T06:00:00Z",
      "distance_km": 0,
      "name": "MADRID-PUERTA DE ATOCHA-ALMUDENA GRANDES",
      "skipped": false
    },
    {
      "active": true,
      "alighting": true,
      "arrival": "2027-03-19T06:53:00Z",
      "boarding": true,
      "code": "37200",
      "departure": "2027-03-19T06:55:00Z",
      "distance_km": 0.2,
      "name": "CIUDAD REAL",
      "skipped": false
    },
    {
      "active": true,
      "alighting": true,
      "arrival": "2027-03-19T07:09:00Z",
      "boarding": true,
      "code": "37700",
      "departure": "2027-03-19T07:11:00Z",
      "distance_km": 0.2,
      "name": null,
      "skipped": false
    },
    {
      "active": true,
      "alighting": true,
      "arrival": "2027-03-19T07:53:00Z",
      "boarding": true,
      "code": "50500",
      "departure": "2027-03-19T07:55:00Z",
      "distance_km": 0.3,
      "name": "CÓRDOBA-JULIO ANGUITA",
      "skipped": false
    },
    {
      "active": true,
      "alighting": true,
      "arrival": "2027-03-19T08:48:00Z",
      "boarding": true,
      "code": "51003",
      "departure": null,
      "distance_km": 0.5,
      "name": "SEVILLA-SANTA JUSTA",
      "skipped": false
    }
  ],
  "train_type": "AVE",
  "type_code": "AV1"
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- apish: https://openany.si/market/apis/renfe/renfe-train-calling-points-api/?offering=bd13db91-6e18-433f-915b-49c98a38bb02

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
