The minimum is determined by leakage (dark) current, and response time.
Also, you may want a resistor across the LED, so that 1. it turns off in the short instant where voltage goes to zero, including due to rectification into diode capacitance (consider noise/RF effect), and 2. effectively raising Vf so that it's non-conducting for longer during the zero crossing.
With this information, you should have a better idea how to go about completing the design.
Some drawbacks:
- Datasheets don't always give complete data on frequency response / time delay and operating conditions. OptoSupply PS817 for instance specifies response at Ic = 2mA, for various RL (thus the switching times are also just swinging that much more voltage, i.e. up to 2mA * 10kΩ = 20V, but we don't care about that for a 3.3V/5V/etc. system). What's the response for say 1mA? Or 0.1mA? Or 10mA?
- CTR needs to be factored in, of course. It has a manufacturing spread, and also decreases over time (as the LED wears).
- Dark current is specified at max. 100nA, but it increases exponentially with temperature; at 100°C, it might be 10s, 100s of µA.
- Going for minimum current, leaves high impedance nodes that are more susceptible to interference as well. Some (DM) filtering on the input and output may be desirable, but perhaps shielding, CM filtering, etc. as well. How much attenuation is required, is hard to know from principles: it depends on how the opto itself responds to RF, how it's wired, PCB layout and assembly wiring, etc.
Several of these can at least be tested in the lab (mock up the circuit and test it at whatever parameters are required), though you do lose the design certainty of guaranteed datasheet values. EMC is the hardest, as design/proto labs don't usually have the hardware available to do it (i.e. RF generators and amplifiers, coupling networks, antennas, etc.).
If design assurance is top priority, consider industrial building blocks such as mains detectors. I'm aware of Contact Closure DC Input Modules | Grayhill which are basically fancy optos in a potted module, though I don't know offhand if any exist that respond fast enough to read zero-crossings (heh, after all, frequent drops in the output would be a rather annoying "feature" for a relay interface like that!). All the same, zero-cross is a very simple application, sometimes requiring nothing more than a large resistor; depending on isolation or surge requirements, perhaps such an option is available to you as well.