Does DataStore2 require the game to be published?

Just what the topic name says. I don’t want to publish my game yet, so I need to know.

You need to publish to allow API services so yes.