Build Leaving-Soon Watchlist Alerts from a Streaming Availability API
changes is the field that starts a leaving-soon alert. It contains events, not a ready-made notification list. The accompanying shows object supplies affected-title details; your application must establish their relationship, intersect the events with a watchlist, and decide whether a date is sufficiently certain to display.
That distinction matters when a viewer follows the same film across several services. An expiring offer in one country is not a worldwide departure, and a rental disappearing is not necessarily the end of subscription access.
A leaving-soon alert starts at changes, not title search
Use get-changes with required country, change_type and item_type. The documented, demonstrated item granularity is show; optionally narrow it with show_type. For this feature, change_type=expiring selects reported future expirations. removed describes past removals; it cannot provide advance warning. new, updated and upcoming serve other catalog workflows.
Discover supported markets through get-countries, then inspect get-country for the selected country's services and add-ons. Do not assume that a familiar service operates everywhere. catalogs accepts up to 32 comma-separated selectors, matching any selected catalog. A bare service includes its supported access types; an access-specific selector such as prime.subscription narrows that scope. Use directory IDs, not display names. get-genres supplies IDs for separate genre-filtered discovery, not departure timestamps.
A documented future-query example is:
https://api.opendata-api.com/api/project/streaming-availability/get-changes?key=YOUR_API_KEY&country=us&catalogs=netflix&change_type=expiring&item_type=show
Confirm the catalog in the directory before running it. This is an example filter combination, not a promised populated response. Obtain an authorized platform key from the dashboard; keep query URLs out of logs and shared screenshots. No streaming-account password or session is required. Reading or copying this example sends no request.
Read the changes array beside the shows object
The observed response established these container types inside the gateway's data:
| Field | Shape | Role |
|---|---|---|
changes | Array | Catalog-change records to examine |
shows | Object | Affected-title details to associate with records |
hasMore | Boolean | Whether traversal should continue |
nextCursor | String when supplied | Opaque continuation value; optional in the contract |
Diagnose the envelope and containers before writing a join. HTTP success and the gateway's code / message / data business status are separate checks. The following validator expects an already-decoded gateway response after an HTTP-status check:
def change_page(envelope):
if not isinstance(envelope, dict) or envelope.get("code") != 200:
raise ValueError("Gateway business failure; inspect code and message")
page = envelope.get("data")
if not isinstance(page, dict):
raise ValueError("Expected an operation object inside data")
if not isinstance(page.get("changes"), list):
raise ValueError("Expected changes array")
if not isinstance(page.get("shows"), dict):
raise ValueError("Expected shows object")
if not isinstance(page.get("hasMore"), bool):
raise ValueError("Expected hasMore boolean")
if page["hasMore"] and not isinstance(page.get("nextCursor"), str):
raise ValueError("Continuation requires nextCursor")
return page
An empty changes array is not, by itself, a failure. Conversely, an unexpected shape must not become a reassuring "nothing is leaving" result.
Match affected shows to a watchlist with stable identifiers
Inspect a returned change record before defining the adapter. Documentation illustrates showId, changeType, streamingOptionType, timestamp, link and service, but those nested fields and the exact change-to-show reference mapping were not independently established by the observed container checks. Do not turn that illustration into a guaranteed schema.
If your response exposes showId, confirm which key in shows it references. Retain unresolved records for diagnosis rather than guessing by title. After confirming the mapping, compare the affected show's stable identifiers with your stored watchlist IDs. Keep IDs as strings and preserve namespaces: an IMDb tt identifier is not a bare TMDB number.
For watchlist onboarding, get-show accepts a catalog ID, IMDb IDs such as tt0120338, or TMDB forms such as movie/597 and tv/1396. Resolve those identities once rather than title-searching on every poll. Title search requires both title and country, returns candidates without cursor pagination, and may match a film with no viewing offer in that country. A title match establishes neither local access nor an expiration.
APIs for similar apps can be requested through the contact page, and private source-code deployment is available.
Keep country, catalog and date filters fixed while nextCursor advances
For expiring and upcoming, inclusive from and to use Unix seconds within today through 31 days ahead. Historical types use the past 31 days. Pin explicit bounds once per polling run; recomputing them on each page changes the query.
After the diagnosis above, this bounded Python iterator requests one fixed seven-day window. It uses the documented future filters, not a claim that any departure will be returned:
import os
import time
import requests
URL = "https://api.opendata-api.com/api/project/streaming-availability/get-changes"
start = int(time.time())
fixed = {
"country": "us", "catalogs": "netflix",
"change_type": "expiring", "item_type": "show",
"from": start, "to": start + 7 * 86400,
"include_unknown_dates": "false", "output_language": "en",
}
def pages(max_pages=100):
cursor = None
seen = set()
for _ in range(max_pages):
params = {**fixed, "key": os.environ["OPENDATA_API_KEY"]}
if cursor is not None:
params["cursor"] = cursor
response = requests.get(URL, params=params, timeout=30)
response.raise_for_status()
page = change_page(response.json())
yield page
if not page["hasMore"]:
return
cursor = page["nextCursor"]
if not cursor or cursor in seen:
raise ValueError("Missing or repeated continuation cursor")
seen.add(cursor)
raise RuntimeError("Page budget reached; traversal is incomplete")
The HTTP client URL-encodes the cursor. Preserve it unchanged, along with every other parameter. Store the original window beside any resumable cursor; do not mark a budget-limited or failed traversal complete. The documented page size is 25 changes, not 25 distinct watchlisted titles. Cursor traversal does not establish snapshot isolation.
Deduplicate alert candidates across polling runs
After validating nested fields, form candidates from the watchlist intersection, not every title in shows. Preserve country, service, add-on context and access type. Subscription, rental, purchase, free and add-on options represent different access conditions; none proves that a particular viewer is entitled to watch.
Build an application-owned event identity from the confirmed show identifier, country, catalog or offer context, change type and known event time. Include item context if your validated records distinguish it. Persist that identity with a uniqueness constraint and a transactional notification outbox. Overlapping polls can then update an existing candidate without sending the same alert twice. No native event-ID guarantee is established here.
Only advance a completed-run marker after all pages and candidate writes finish. A corrected departure date should update the candidate under your notification policy, not silently create an unrelated reminder. Store only needed metadata; exclude API keys and full request URLs.
Keep unknown departure dates out of exact-day countdowns
include_unknown_dates defaults to false and affects future change types only. When enabled, undated records sort as timestamp zero: first ascending, last descending. That sorting convention is not evidence of a departure in 1970, nor permission to substitute tomorrow.
Maintain a separate "departure reported; date unavailable" state. Do not schedule an exact-day countdown from an absent, zero or unvalidated event time. Even a supplied timestamp needs confirmed semantics before it becomes "last day to watch" in the viewer's timezone. Handle unknown-date records separately from dated reminders so a later date correction can be reconciled.
What the feed cannot promise about a last day to watch
A complete traversal covers the selected query, not every licensing change worldwide. Future expirations may be unreported; empty results do not guarantee that nothing will leave. The bounded windows are not an unlimited historical archive, so maintain your own retained observations for longer analysis.
This independent streaming availability API supports an alert feature without requiring an official Netflix API, but it is not an official interface to an individual streaming service. Its viewing links lead to service title pages, not playable streams, regional unblocking or subscription access. Phrase notifications as reported availability changes and leave uncertain dates visibly uncertain: the feed cannot guarantee the final moment a viewer can press play.