Recovering the unknown dynamics of a quantum system is an increasingly important task for characterizing noises in quantum devices and for modeling quantum materials. The difficulty of this task is determined by its sample complexity, which denotes the number of measurements required to determine the dynamics to a given accuracy, as well as its computational complexity. We describe a simple scalable algorithm which learns a quantum Hamiltonian or Lindbladian using only local measurements taken in a steady state, such as an eigenstate or a Gibbs state. For systems with short-ranged interactions, the dynamics acting on each spatial domain can be inferred using only observables within that domain. We study numerically the number of measurements required to recover different types of dynamics from their various steady states, and provide matching upper and lower bounds for the scaling of the sample complexity with system size.