> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baselayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Guide: Exporting PDF Reports

> Save a completed Business Search as a PDF for underwriting files, compliance records and audits.

Baselayer generates comprehensive PDF reports for any completed Business Search. These reports include all verification results and ordered add-ons (Website Analysis, Industry Prediction, Liens, Litigation) in a single document - ideal for underwriting files, compliance documentation, and audit trails.

This guide covers how to export PDFs through both the Console and API. For understanding what data appears in Business Search results, see [Business Search: Basics](https://docs.baselayer.com/docs/business-search-basics.md). For verification workflows that lead to PDF export, see [Business Search: Best Practices](https://docs.baselayer.com/docs/business-search-1.md).

***

## Prerequisites

Before exporting a PDF report, ensure:

* **Business Search is completed** - PDFs can only be generated for searches with `state: COMPLETED`
* **Search results are available** - You have the search ID from a completed Business Search
* **API key** (for API exports) - See [Authentication](https://docs.baselayer.com/docs/authentication.md)

**Note**: PDFs include only the products and add-ons that were ordered with the original search. If you didn't request Website Analysis during the search, or run a Lien Search on the business, they won't appear in the PDF.

***

## 1. What the PDF Report Contains

Each PDF export is a comprehensive snapshot of the Business Search results at the time of generation.

### Core KYB Data (Always Included)

Every PDF report contains:

* **Business Identity**
  * Legal business name and structure, registration details and standing
* **Verification Signals**
  * Business name, address, TIN, officer and website match level (if all provided)
* **Risk Assessment**
  * KYB and Risk Ratings (A-F scale)
* **Business Profile**
  * Addresses, officers and registered agents, registrations, watchlist screening results

### Optional Add-Ons (If Ordered with Search)

The PDF includes additional sections only if these products were requested in the original search:

* **Industry Prediction** (Order.NaicsPrediction)
  * NAICS, MCC, and SIC codes, industry keywords, confidence scores and risk classification
* **Website Analysis** (Order.WebsiteAnalysis)
  * Discovered website URL, domain metadata, legitimacy indicators, information found on site
* **Liens** (if lien search was conducted)
  * UCC filings, tax liens, including details and status
* **Litigation & Bankruptcy** (if docket search was conducted)
  * Court cases and filings, bankruptcy proceedings

**Important**: To include Industry Prediction and Website Analysis in the PDF, they must be ordered when you create the Business Search using the `options` parameter. Liens and litigation come from the most recent Lien and Docket Searches your organization ran on the business before exporting. You cannot retroactively add products to an existing PDF.

This makes the PDF a complete, portable record of the entire KYB evaluation as it was performed.

***

## 2. Exporting a PDF in the Console

**Step 1**: Navigate to the Business Search result page in the [Baselayer Console](https://console.baselayer.com)

**Step 2**: Click the **Download PDF** button (icon) at the top right of the search results

**Step 3**: The PDF will generate and download to your device automatically

![](https://mintcdn.com/baselayer-81245324/y8jjNyo-CIhfj2Df/images/Screenshot_2025-12-06_at_20.38.14.png?fit=max\&auto=format\&n=y8jjNyo-CIhfj2Df\&q=85\&s=52861f4087ef296d326783db41badba2)

**When to use Console export:**

* Manual underwriting review
* One-off compliance documentation
* Sharing results with team members who don't have API access
* Quick verification for customer inquiries.

***

## 3. Exporting a PDF via API

Generate and download a PDF report programmatically using the export endpoint:

```bash theme={null}
curl --request POST \
  --url https://api.baselayer.com/searches/{search_id}/export \
  --header 'X-API-Key: <API_KEY>' \
  --output business_report.pdf
```

**Path Parameter:**

* `search_id` - The unique identifier of the completed Business Search

**Response:**

* Content-Type: `application/pdf`
* Binary PDF file (streamed directly to the output file)

**Response handling in code:**

Python example:

```python theme={null}
import requests

search_id = "b2f7c648-d931-4cb6-b38d-9db8bf410d21"
response = requests.post(
    f"https://api.baselayer.com/searches/{search_id}/export",
    headers={"X-API-Key": "YOUR_API_KEY"}
)

if response.status_code == 200:
    with open(f"report_{search_id}.pdf", "wb") as f:
        f.write(response.content)
    print("PDF saved successfully")
else:
    print(f"Error: {response.status_code}")
```

Node.js example:

```javascript theme={null}
const fs = require('fs');
const https = require('https');

const searchId = 'b2f7c648-d931-4cb6-b38d-9db8bf410d21';
const file = fs.createWriteStream(`report_${searchId}.pdf`);

const options = {
  hostname: 'api.baselayer.com',
  path: `/searches/${searchId}/export`,
  method: 'POST',
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
};

https.request(options, (response) => {
  response.pipe(file);
  file.on('finish', () => {
    file.close();
    console.log('PDF saved successfully');
  });
}).end();
```

***

## 4. Automating PDF Generation in Your Workflow

Many teams integrate PDF exports directly into their underwriting and compliance workflows. Here are proven automation patterns:

* **On Approval/Funding**: generate PDFs automatically when applications are approved
* **Batch PDF Export for Audit**: export PDFs for all searches in a date range
* **Webhook-Triggered Export**: generate PDF immediately when search completes

### Common Integration Points

* **CRM/LOS**: Attach PDFs to customer records in Salesforce, HubSpot, or loan origination systems
* **Document Storage**: Save to S3, Google Cloud Storage, Azure Blob, or internal document management
* **Compliance Systems**: Route PDFs to audit trail systems or regulatory reporting tools
* **Manual Review Queues**: Attach PDFs to flagged applications for analyst review
* **Customer Portals**: Provide PDFs to customers for transparency and record-keeping

Because the export endpoint only requires the search ID, integration is lightweight and can be added to any workflow step.

***

## 5. Common Issues

### "The export API returns 404 Not Found"

**Cause**: Search ID doesn't exist or you don't have access to it.

**Solutions:**

* Verify the search ID is correct
* Ensure the search belongs to your organization
* Check that you're using the right API key

### "The PDF is missing Website Analysis / Industry data"

**Cause**: These add-ons weren't requested when the Business Search was created.

**Solution**:

* Order add-ons must be specified in the original search request using the `options` parameter
* You cannot add products to a completed search
* To include add-ons, create a new Business Search with `options: ["Order.WebsiteAnalysis", "Order.NaicsPrediction"]`

### "Export endpoint returns 422"

**Cause**: The search hasn't completed yet (state is still PENDING or EXECUTING). Failed searches and searches with no matched business also return 422 and can't be exported.

**Solutions:**

* Wait for the search to complete before exporting PDF
* Check search status: `GET /searches/{id}/status`
* Listen for `BusinessSearch.completed` webhook before triggering PDF export

### "PDF generation seems slow"

**Expected timing**: PDF generation can take up to 30 seconds for reports with many add-ons.

**If taking longer:**

* Check your network connection
* Verify Baselayer API status at status.baselayer.com
* Contact support if consistently taking >30 seconds

***

## 6. Next Steps

**Understand what's in the PDF:**

* [Business Search: Basics](https://docs.baselayer.com/docs/business-search-basics.md) - Overview of verification data included in reports
* [Scores & Ratings](https://docs.baselayer.com/docs/baselayer-scores-ratings.md) - Interpret KYB and Risk ratings in PDFs
* [Online Presence: Best Practices](https://docs.baselayer.com/docs/web-presence-orderables.md) - Add Website Analysis and Industry data to future reports

**Build automated workflows:**

* [Webhooks at Baselayer](https://docs.baselayer.com/docs/webhooks-at-baselayer.md) - Trigger PDF export when searches complete
* [Business Search: Batch Searches](https://docs.baselayer.com/docs/batch-search-how-to-run-bulk-searches-in-baselayer.md) - Export PDFs for bulk verification results
* [Portfolio Monitoring](https://docs.baselayer.com/docs/portfolio-monitoring.md) - Generate compliance reports over time

**API Documentation:**

* [API Reference](https://docs.baselayer.com/api-reference) - Complete endpoint specifications
* [Authentication](https://docs.baselayer.com/docs/authentication.md) - Manage API keys for automation

***

## 7. Summary

PDF exports transform Business Search results into comprehensive, portable audit records that include all KYB verification data and ordered add-ons.

**Key capabilities:**

* **Console**: One-click download for manual workflows
* **API**: Programmatic export for automation (`POST /searches/{id}/export`)
* **Complete records**: All verification signals, ratings, and add-ons in one document
* **Easy integration**: Binary PDF response works with any storage system

**Use PDF exports to:**

* Document underwriting decisions
* Maintain compliance and audit trails
* Automate end-to-end verification workflows
* Share verification results with stakeholders

For help automating PDF exports or integrating with your document management system, contact your Baselayer account manager.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.