check_time_availability
Check if a time period likely has data in an SDMX dataflow, using content constraints to rule out empty periods before querying.
Instructions
Check whether a specific time period is likely to have data in a dataflow.
Uses the Actual ContentConstraint (FREQ values + TimeRange) to quickly
rule out periods that definitely have no data, without querying the data
itself. The constraint only tells us what CAN'T exist — a "plausible"
result means "worth querying", not "guaranteed to have data".
Use after identifying a dataflow and before building a data URL.
For confirmed availability, query the data directly via build_data_url().
Three-valued result:
- "no": constraint rules this out — don't bother querying
- "plausible": period within range and frequency matches — worth trying
- "plausible_different_frequency": data exists in this time window but
at different granularity (e.g. querying monthly but only annual exists)
Args:
dataflow_id: The dataflow to check
query_period: The period to check (e.g. "2010", "2010-Q1", "2010-01", "2010-W05")
agency_id: The agency (uses session endpoint if not specified)
endpoint: Optional endpoint key (e.g. "FBOS", "ECB") to target a
specific provider for this call only. Defaults to the session's
current endpoint.
Returns:
TimeAvailabilityResult with availability classification and reasoning
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endpoint | No | ||
| agency_id | No | ||
| dataflow_id | Yes | ||
| query_period | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| overlap | Yes | Time overlap: 'full', 'partial', or 'none' | |
| query_end | Yes | End of query period (ISO date) | |
| dataflow_id | Yes | Dataflow checked | |
| query_start | Yes | Start of query period (ISO date) | |
| availability | Yes | 'no' (ruled out), 'plausible' (worth querying), or 'plausible_different_frequency' (data exists but at different granularity) | |
| query_period | Yes | Period that was queried | |
| api_calls_made | No | Number of API calls made | |
| interpretation | Yes | Step-by-step reasoning | |
| recommendation | Yes | Suggested next action | |
| discovery_level | No | time_availability | |
| implied_frequency | Yes | Implied frequency: A, S, Q, M, W, or D | |
| constraint_time_end | No | Latest date in constraint TimeRange | |
| available_frequencies | Yes | FREQ codes from the constraint | |
| constraint_time_start | No | Earliest date in constraint TimeRange |