  We introduce a numerical method for identifying topological order in
two-dimensional models based on one-dimensional bulk operators. The idea is to
identify approximate symmetries supported on thin strips through the bulk that
behave as string operators associated to an anyon model. We can express these
ribbon operators in matrix product form and define a cost function that allows
us to efficiently optimize over this ansatz class. We test this method on spin
models with abelian topological order by finding ribbon operators for
$\mathbb{Z}_d$ quantum double models with local fields and Ising-like terms. In
addition, we identify ribbons in the abelian phase of Kitaev's honeycomb model
which serve as the logical operators of the encoded qubit for the quantum
error-correcting code. We further identify the topologically encoded qubit in
the quantum compass model, and show that despite this qubit, the model does not
support topological order. Finally, we discuss how the method supports
generalizations for detecting nonabelian topological order.
