Configure request and collection runs using the Postman Runtime library

The Postman Runtime library supports request sending and collection running in Postman as well as in other interfaces including Newman, Postman's command-line collection runner.

Accessing the Postman Runtime library

The library is an open-source Node.js project you can use for low-level configuration over request sending in your API development and testing projects.

To get started with the Runtime library, check out the repo's README.

You can install the library from npm. The following example code shows a simplified outline of using the Runtime library in conjunction with the Collection SDK:

runtime = require('postman-runtime');
var runner = new runtime.Runner();

//Collection object constructed using the Collection SDK
var collection = new sdk.Collection();, {
  data: [],
  timeout: {
    request: 30000,
    script: 5000
  iterationCount: 1,

  //other options...

function (err, run) {
  //Callbacks to execute as the collection runs

You can use the Runtime library if you need a detailed configuration of your request runs, for example as part of an automation workflow to integrate Postman Collection runs into your development pipeline.

Note that if you only need to run collections, you can use Newman, Postman's command-line tool.

Next steps

Now that you've gotten started with the Runtime library, you might also want to use the Postman API in your continuous integration and continuous deployment (CI/CD) workflow:

  • To learn more about incorporating Postman into your CI/CD workflow, visit CI with Postman API.

Last modified: 2022/07/20

Postmanaut dancing. Illustration.