Suggest an editImprove this articleRefine the answer for “How do you create several documents at once?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)To create several documents at once in MongoDB, use `insertMany()`: it takes an array of documents, inserts all of them in a single operation, and returns information about the inserted `_id`s. **Key point:** it's handy when you need to add several documents at once, e.g. a dataset for testing.Shown above the full answer for quick recall.Answer (EN)ImageTo create several documents at once in MongoDB, use the `insertMany()` method. ### Example (Mongo Shell / JavaScript syntax): ```js db.users.insertMany([ { name: "Alex", age: 25 }, { name: "Maria", age: 30 }, { name: "John", age: 20 } ]) ``` ### What `insertMany` does: - takes an **array of documents** - inserts all the records in a single operation - returns information about the inserted `_id`s ### When to use it: - when several documents need to be added at once (e.g. a test dataset) So `insertMany()` is what's used for bulk document creation in MongoDB.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.