An interesting question. Presumably you don't have control over the third-party API, and there is no way to query for recently dropped records.
What you could do in this case is have a scheduled Big Data Analytic with two sources, one being the output layer that your Python script is looking at, and the other being an HTTP Poller for your third-party API. Then you can use Join Features within a real time analytic to join the results from your third-party API feed to the output layer, using "Retain all features regardless of join results".
Then, you can detect which features from the output layer have no matching records in the third-party API (e.g. COUNT 0), and flag those for deletion, e.g. by setting the end date to the past, or setting another field that your Python script can use to detect which features need to be purged from the output layer, or writing them to another layer that maintains a list of pending deletions.
It should also be possible to do something similar within a Real Time Analytic, using an HTTP Poller feed that looks at your existing output layer, rather than having a scheduled big data analytic. That might be a bit more efficient with resources, as a Feed plus a Real Time Analytic will generally consume less resources than a Big Data Analytic, and it also avoids duplicate calls to the third-party API as the Feed for that can be reused, and it may not even require a second Real Time Analytic as a single analytic can contain multiple data flows.
However, if using a Real Time Analytic for this, then there is the question of whether the two feeds are in step with one another, and how quickly records should expire. You would have to set the Join Time Window appropriately, to be more than the polling interval of the third-party API feed, but probably less than two polling intervals.
I hope that makes sense. I think the general idea I am suggesting will work but may need some polishing to achieve just what you want, and I may not have explained it very well. Please feel free to reach out if it needs further clarification.