Most "does this part fit?" questions in e-commerce get answered with a lookup table: part A replaces part B because somebody typed it into a spreadsheet. That breaks down for commodity electrical parts, where thousands of part numbers are really just a handful of ratings. For those, it's better to encode the substitution rules and check any candidate against the original part.
Run capacitors in air conditioners and heat pumps are a clean example. The label on the old part tells you nearly everything you need, and the rules for a safe replacement are short:
Capacitance (µF, also printed MFD) must match exactly. A dual-run label like 45 + 5 MFD means 45 µF for the compressor (HERM) and 5 µF for the fan. The tolerance printed next to it (±5% or ±6%) is the normal manufacturing range. It doesn't let you pick a different size.
Voltage must be the same or higher. A 440 V part can replace a 370 V part. A 370 V part can never replace a 440 V one.
Type must match.…