We have shown that a single optical atomic clock can be used as a detector for the hypothetical dark matter in the form of stable topological defects, for example, monopoles, strings or domain walls. We exploited differences in the susceptibilities to the fine-structure constant of essential parts of an optical atomic clock, i.e. the atoms and the cavity. We perform an experiment which constrained the strength of atomic coupling to hypothetical dark-matter cosmic objects. Under the conditions of our experiments, the degree of constraint was found to exceed the previously reported limits by more than three orders of magnitude [1].