> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.termina.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.termina.ai/_mcp/server.

# Extract Key Findings and Company Description from a scan PDF

POST https://app.termina.ai/api/v1/group/{group_id}/deal/{deal_id}/file/{file_id}/extract-key-findings

Downloads the scan PDF attached to the deal, locates the Key Findings and Company Description pages, runs structured LLM extraction over both pages concurrently, and returns the combined result. Company description extraction is best-effort and may return null.

Reference: https://docs.termina.ai/api-reference/deal-management/deal/extract-key-findings

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://app.termina.ai` (Production server, default)
- `https://app.termina.dev` (Development server)
- `http://localhost:8000` (Local development server)

## Request

### Path parameters

- `group_id` (integer, required)
- `deal_id` (integer, required)
- `file_id` (integer, required)

## Response

### 200

Successful Response

- `key_findings` (ExtractedKeyFindings, required) — Structured key findings extraction
- `company_description` (ExtractedCompanyDescription, optional, nullable) — Structured company description extracted from a nearby page, if found

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### ExtractedKeyFindings

Structured extraction of a Key Findings PDF page.

- `company_name` (string, required) — Company name from the page
- `overall_assessment` (string, required) — Left-panel narrative assessment text
- `scan_type` (string, required) — Type of scan (e.g., 'Quality of Growth Scan')
- `findings` (list of ExtractedFinding, required) — Ordered list of scorecard findings
- `what_could_go_right` (string, optional, default: ) — Upside scenario text from the bottom of the scorecard table, if present
- `page_number` (integer, optional, default: 0) — 1-indexed page number where Key Findings was found (set by server)

### ExtractedCompanyDescription

Structured extraction of a Company Description PDF page.

- `title` (string, required) — One-line company title/tagline from the page header
- `company` (string, required) — Company description text
- `products` (string, required) — Products/services description text
- `customers` (string, required) — Target customers description text
- `image_url` (string, optional, default: ) — URL of the extracted page image (set by server)
- `page_number` (integer, optional, default: 0) — 1-indexed page number (set by server)

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (ValidationErrorCtx, optional)

### ExtractedFinding

A single finding row from the Key Findings scorecard table.

- `topic` (string, required) — Section topic (e.g., 'Growth', 'Retention', 'Unit Economics')
- `score_level` (enum, required) — Performance score level
  - Allowed values: `significant_positive`, `positive`, `neutral`, `risk`, `significant_risk`, `blind_spot`
- `tldr` (string, required) — Short qualifier after the topic (e.g., 'Recent Spike', 'Stable', 'Strong')
- `description` (string, required) — Full narrative paragraph for this finding

### ValidationErrorLocItems

### ValidationErrorCtx

## Examples

**Response**

```json
{
  "key_findings": {
    "company_name": "string",
    "overall_assessment": "string",
    "scan_type": "string",
    "findings": [
      {
        "topic": "string",
        "score_level": "significant_positive",
        "tldr": "string",
        "description": "string"
      }
    ],
    "what_could_go_right": "",
    "page_number": 0
  },
  "company_description": {
    "title": "string",
    "company": "string",
    "products": "string",
    "customers": "string",
    "image_url": "",
    "page_number": 0
  }
}
```

**SDK Code**

```python
import requests

url = "https://app.termina.ai/api/v1/group/1/deal/1/file/1/extract-key-findings"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.termina.ai/api/v1/group/1/deal/1/file/1/extract-key-findings';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.termina.ai/api/v1/group/1/deal/1/file/1/extract-key-findings"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.termina.ai/api/v1/group/1/deal/1/file/1/extract-key-findings")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.termina.ai/api/v1/group/1/deal/1/file/1/extract-key-findings")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.termina.ai/api/v1/group/1/deal/1/file/1/extract-key-findings', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.termina.ai/api/v1/group/1/deal/1/file/1/extract-key-findings");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.termina.ai/api/v1/group/1/deal/1/file/1/extract-key-findings")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```