The /dev/domains interface provides a source of (somewhat) random but valid domain names.
It does this by selecting at random the requested number of names from the Tranco Top 1M list.
You can specify how many random domain names you'd like via the n=<num> parameter. Obviously you can at most request 1 million domain names.
You probably want to call this using e.g., curl(1):
$ curl https://www.netmeister.org/dev/domains?n=10 [ ... ] $