> [!WARNING]
> [Zyte API](../../zyte-api/get-started.md#zyte-api) is replacing Smart Proxy Manager. It is
> no longer possible to sign up to Smart Proxy Manager. If you are an
> existing Smart Proxy Manager user, see spm-migrate.

# Using Smart Proxy Manager with Node.js

> [!NOTE]
> All the code in this documentation has been tested with Node.js v14.15.1 and postman-request 2.88.1-postman.30.

Making use of [postman-request](https://github.com/postmanlabs/postman-request):

```javascript
var request = require('postman-request');
var fs = require('fs');


var proxyRequest = request.defaults({
    'proxy': 'http://<API KEY>:@proxy.zyte.com:8011'
});

var options = {
    url: 'https://toscrape.com',
    ca: fs.readFileSync("/path/to/zyte-ca.crt"),
    requestCert: true,
    rejectUnauthorized: true
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(response.headers);
        console.log(body);
    }
    else{
        console.log(error, response, body);
    }
}

proxyRequest(options, callback);
```

To get `zyte-ca.crt`, see [Installing the Zyte CA certificate](../../misc/ca.md#ca).
