Step 1: First you have to create an account in D&B using this online form http://developer.dnb.com/register-v2 and get your Username and Password.
Step 2: You can get connected with D&B direct api via SOAP and REST api.
Soap API Call Example:
To get connected with D&B api using soap client call. Follow the below php code.
After hit this code you can company detail request. As i mentioned this api function in soap client request.
Rest API Example:
To get connected with D&B Direct Rest api, You need an authentication Token to access it. First get the New Token using this POST request.
After that you Success result with new auth token. Use token in below Curl code to get data from D&B Direct api.