Iteration Layer
Menu

Extract Terms and Conditions

Extract clause types, obligations, limitations, and governing law from terms and conditions documents.

Who this is for

Legal agencies, compliance teams, and e-commerce platforms use this recipe to extract key clauses from vendor or partner terms — pulling out termination conditions, liability caps, data handling provisions, and governing law for contract review and risk assessment.

Request
curl -X POST https://api.iterationlayer.com/document-extraction/v1/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [
      {
        "type": "url",
        "name": "vendor-terms-cloudpeak.pdf",
        "url": "https://example.com/contracts/vendor-terms-cloudpeak-2026.pdf"
      }
    ],
    "schema": {
      "fields": [
        {
          "name": "document_title",
          "type": "TEXT",
          "description": "Title of the terms document"
        },
        {
          "name": "effective_date",
          "type": "DATE",
          "description": "Effective date of the terms"
        },
        {
          "name": "parties",
          "type": "TEXT",
          "description": "Parties to the agreement"
        },
        {
          "name": "termination_clause",
          "type": "TEXTAREA",
          "description": "Termination conditions and notice period"
        },
        {
          "name": "liability_limitation",
          "type": "TEXTAREA",
          "description": "Liability limitation or cap"
        },
        {
          "name": "indemnification",
          "type": "TEXTAREA",
          "description": "Indemnification obligations"
        },
        {
          "name": "data_handling",
          "type": "TEXTAREA",
          "description": "Data processing and privacy provisions"
        },
        {
          "name": "governing_law",
          "type": "TEXT",
          "description": "Governing law and jurisdiction"
        },
        {
          "name": "payment_terms",
          "type": "TEXT",
          "description": "Payment terms and conditions"
        },
        {
          "name": "auto_renewal",
          "type": "BOOLEAN",
          "description": "Whether the agreement auto-renews"
        }
      ]
    }
  }'
Response
{
  "success": true,
  "data": {
    "document_title": {
      "value": "CloudPeak SaaS Master Services Agreement",
      "confidence": 0.99,
      "citations": ["CloudPeak SaaS Master Services Agreement"]
    },
    "effective_date": {
      "value": "2026-04-01",
      "confidence": 0.98,
      "citations": ["Effective Date: April 1, 2026"]
    },
    "parties": {
      "value": "CloudPeak Solutions B.V. and Whitmore Legal Advisors LLP",
      "confidence": 0.98,
      "citations": ["between CloudPeak Solutions B.V. (\"Provider\") and Whitmore Legal Advisors LLP (\"Customer\")"]
    },
    "termination_clause": {
      "value": "Either party may terminate with 90 days written notice. CloudPeak may terminate immediately for non-payment after a 30-day cure period. Upon termination, Customer data is exported within 30 days and deleted within 90 days.",
      "confidence": 0.96,
      "citations": ["Either party may terminate this Agreement upon ninety (90) days prior written notice", "Provider may terminate immediately if Customer fails to cure non-payment within thirty (30) days"]
    },
    "liability_limitation": {
      "value": "Total aggregate liability is capped at the fees paid during the 12 months preceding the claim. Neither party is liable for indirect, consequential, incidental, or punitive damages.",
      "confidence": 0.95,
      "citations": ["aggregate liability shall not exceed the total fees paid during the twelve (12) months preceding the event", "neither party shall be liable for any indirect, consequential, incidental, or punitive damages"]
    },
    "indemnification": {
      "value": "CloudPeak indemnifies Customer against third-party IP infringement claims arising from use of the service. Customer indemnifies CloudPeak against claims arising from Customer's data or misuse of the platform.",
      "confidence": 0.94,
      "citations": ["Provider shall indemnify Customer against third-party claims alleging intellectual property infringement", "Customer shall indemnify Provider against claims arising from Customer Data"]
    },
    "data_handling": {
      "value": "CloudPeak processes data as a data processor under GDPR. All data is stored in EU-based data centers (Frankfurt, Amsterdam). A Data Processing Agreement is incorporated by reference. Sub-processors require prior written consent.",
      "confidence": 0.96,
      "citations": ["Provider acts as a data processor under GDPR", "Data stored in EU-based data centers", "Data Processing Agreement incorporated by reference"]
    },
    "governing_law": {
      "value": "Laws of the Netherlands. Disputes resolved in the courts of Amsterdam.",
      "confidence": 0.98,
      "citations": ["governed by the laws of the Netherlands", "courts of Amsterdam shall have exclusive jurisdiction"]
    },
    "payment_terms": {
      "value": "Net 30 from invoice date. Invoices issued quarterly in advance. Late payments accrue interest at 1.5% per month.",
      "confidence": 0.97,
      "citations": ["Payment due within thirty (30) days of invoice", "invoiced quarterly in advance", "late payments shall accrue interest at 1.5% per month"]
    },
    "auto_renewal": {
      "value": true,
      "confidence": 0.97,
      "citations": ["Agreement automatically renews for successive one-year terms unless either party provides sixty (60) days written notice"]
    }
  }
}
Request
import { IterationLayer } from "iterationlayer";
const client = new IterationLayer({ apiKey: "YOUR_API_KEY" });

const result = await client.extractDocument({
  files: [
    {
      type: "url",
      name: "vendor-terms-cloudpeak.pdf",
      url: "https://example.com/contracts/vendor-terms-cloudpeak-2026.pdf",
    },
  ],
  schema: {
    fields: [
      { name: "document_title", type: "TEXT", description: "Title of the terms document" },
      { name: "effective_date", type: "DATE", description: "Effective date of the terms" },
      { name: "parties", type: "TEXT", description: "Parties to the agreement" },
      { name: "termination_clause", type: "TEXTAREA", description: "Termination conditions and notice period" },
      { name: "liability_limitation", type: "TEXTAREA", description: "Liability limitation or cap" },
      { name: "indemnification", type: "TEXTAREA", description: "Indemnification obligations" },
      { name: "data_handling", type: "TEXTAREA", description: "Data processing and privacy provisions" },
      { name: "governing_law", type: "TEXT", description: "Governing law and jurisdiction" },
      { name: "payment_terms", type: "TEXT", description: "Payment terms and conditions" },
      { name: "auto_renewal", type: "BOOLEAN", description: "Whether the agreement auto-renews" },
    ],
  },
});
Response
{
  "success": true,
  "data": {
    "document_title": {
      "value": "CloudPeak SaaS Master Services Agreement",
      "confidence": 0.99,
      "citations": ["CloudPeak SaaS Master Services Agreement"]
    },
    "effective_date": {
      "value": "2026-04-01",
      "confidence": 0.98,
      "citations": ["Effective Date: April 1, 2026"]
    },
    "parties": {
      "value": "CloudPeak Solutions B.V. and Whitmore Legal Advisors LLP",
      "confidence": 0.98,
      "citations": ["between CloudPeak Solutions B.V. (\"Provider\") and Whitmore Legal Advisors LLP (\"Customer\")"]
    },
    "termination_clause": {
      "value": "Either party may terminate with 90 days written notice. CloudPeak may terminate immediately for non-payment after a 30-day cure period. Upon termination, Customer data is exported within 30 days and deleted within 90 days.",
      "confidence": 0.96,
      "citations": ["Either party may terminate this Agreement upon ninety (90) days prior written notice", "Provider may terminate immediately if Customer fails to cure non-payment within thirty (30) days"]
    },
    "liability_limitation": {
      "value": "Total aggregate liability is capped at the fees paid during the 12 months preceding the claim. Neither party is liable for indirect, consequential, incidental, or punitive damages.",
      "confidence": 0.95,
      "citations": ["aggregate liability shall not exceed the total fees paid during the twelve (12) months preceding the event", "neither party shall be liable for any indirect, consequential, incidental, or punitive damages"]
    },
    "indemnification": {
      "value": "CloudPeak indemnifies Customer against third-party IP infringement claims arising from use of the service. Customer indemnifies CloudPeak against claims arising from Customer's data or misuse of the platform.",
      "confidence": 0.94,
      "citations": ["Provider shall indemnify Customer against third-party claims alleging intellectual property infringement", "Customer shall indemnify Provider against claims arising from Customer Data"]
    },
    "data_handling": {
      "value": "CloudPeak processes data as a data processor under GDPR. All data is stored in EU-based data centers (Frankfurt, Amsterdam). A Data Processing Agreement is incorporated by reference. Sub-processors require prior written consent.",
      "confidence": 0.96,
      "citations": ["Provider acts as a data processor under GDPR", "Data stored in EU-based data centers", "Data Processing Agreement incorporated by reference"]
    },
    "governing_law": {
      "value": "Laws of the Netherlands. Disputes resolved in the courts of Amsterdam.",
      "confidence": 0.98,
      "citations": ["governed by the laws of the Netherlands", "courts of Amsterdam shall have exclusive jurisdiction"]
    },
    "payment_terms": {
      "value": "Net 30 from invoice date. Invoices issued quarterly in advance. Late payments accrue interest at 1.5% per month.",
      "confidence": 0.97,
      "citations": ["Payment due within thirty (30) days of invoice", "invoiced quarterly in advance", "late payments shall accrue interest at 1.5% per month"]
    },
    "auto_renewal": {
      "value": true,
      "confidence": 0.97,
      "citations": ["Agreement automatically renews for successive one-year terms unless either party provides sixty (60) days written notice"]
    }
  }
}
Request
from iterationlayer import IterationLayer
client = IterationLayer(api_key="YOUR_API_KEY")

result = client.extract_document(
    files=[
        {
            "type": "url",
            "name": "vendor-terms-cloudpeak.pdf",
            "url": "https://example.com/contracts/vendor-terms-cloudpeak-2026.pdf",
        }
    ],
    schema={
        "fields": [
            {"name": "document_title", "type": "TEXT", "description": "Title of the terms document"},
            {"name": "effective_date", "type": "DATE", "description": "Effective date of the terms"},
            {"name": "parties", "type": "TEXT", "description": "Parties to the agreement"},
            {"name": "termination_clause", "type": "TEXTAREA", "description": "Termination conditions and notice period"},
            {"name": "liability_limitation", "type": "TEXTAREA", "description": "Liability limitation or cap"},
            {"name": "indemnification", "type": "TEXTAREA", "description": "Indemnification obligations"},
            {"name": "data_handling", "type": "TEXTAREA", "description": "Data processing and privacy provisions"},
            {"name": "governing_law", "type": "TEXT", "description": "Governing law and jurisdiction"},
            {"name": "payment_terms", "type": "TEXT", "description": "Payment terms and conditions"},
            {"name": "auto_renewal", "type": "BOOLEAN", "description": "Whether the agreement auto-renews"},
        ]
    },
)
Response
{
  "success": true,
  "data": {
    "document_title": {
      "value": "CloudPeak SaaS Master Services Agreement",
      "confidence": 0.99,
      "citations": ["CloudPeak SaaS Master Services Agreement"]
    },
    "effective_date": {
      "value": "2026-04-01",
      "confidence": 0.98,
      "citations": ["Effective Date: April 1, 2026"]
    },
    "parties": {
      "value": "CloudPeak Solutions B.V. and Whitmore Legal Advisors LLP",
      "confidence": 0.98,
      "citations": ["between CloudPeak Solutions B.V. (\"Provider\") and Whitmore Legal Advisors LLP (\"Customer\")"]
    },
    "termination_clause": {
      "value": "Either party may terminate with 90 days written notice. CloudPeak may terminate immediately for non-payment after a 30-day cure period. Upon termination, Customer data is exported within 30 days and deleted within 90 days.",
      "confidence": 0.96,
      "citations": ["Either party may terminate this Agreement upon ninety (90) days prior written notice", "Provider may terminate immediately if Customer fails to cure non-payment within thirty (30) days"]
    },
    "liability_limitation": {
      "value": "Total aggregate liability is capped at the fees paid during the 12 months preceding the claim. Neither party is liable for indirect, consequential, incidental, or punitive damages.",
      "confidence": 0.95,
      "citations": ["aggregate liability shall not exceed the total fees paid during the twelve (12) months preceding the event", "neither party shall be liable for any indirect, consequential, incidental, or punitive damages"]
    },
    "indemnification": {
      "value": "CloudPeak indemnifies Customer against third-party IP infringement claims arising from use of the service. Customer indemnifies CloudPeak against claims arising from Customer's data or misuse of the platform.",
      "confidence": 0.94,
      "citations": ["Provider shall indemnify Customer against third-party claims alleging intellectual property infringement", "Customer shall indemnify Provider against claims arising from Customer Data"]
    },
    "data_handling": {
      "value": "CloudPeak processes data as a data processor under GDPR. All data is stored in EU-based data centers (Frankfurt, Amsterdam). A Data Processing Agreement is incorporated by reference. Sub-processors require prior written consent.",
      "confidence": 0.96,
      "citations": ["Provider acts as a data processor under GDPR", "Data stored in EU-based data centers", "Data Processing Agreement incorporated by reference"]
    },
    "governing_law": {
      "value": "Laws of the Netherlands. Disputes resolved in the courts of Amsterdam.",
      "confidence": 0.98,
      "citations": ["governed by the laws of the Netherlands", "courts of Amsterdam shall have exclusive jurisdiction"]
    },
    "payment_terms": {
      "value": "Net 30 from invoice date. Invoices issued quarterly in advance. Late payments accrue interest at 1.5% per month.",
      "confidence": 0.97,
      "citations": ["Payment due within thirty (30) days of invoice", "invoiced quarterly in advance", "late payments shall accrue interest at 1.5% per month"]
    },
    "auto_renewal": {
      "value": true,
      "confidence": 0.97,
      "citations": ["Agreement automatically renews for successive one-year terms unless either party provides sixty (60) days written notice"]
    }
  }
}
Request
package main

import il "github.com/iterationlayer/sdk-go"

func main() {
    client := il.NewClient("YOUR_API_KEY")

    result, err := client.ExtractDocument(il.ExtractDocumentRequest{
        Files: []il.FileInput{
            il.FileInput{
                Type: "url",
                Name: "vendor-terms-cloudpeak.pdf",
                Url: "https://example.com/contracts/vendor-terms-cloudpeak-2026.pdf",
            },
        },
        Schema: il.ExtractionSchema{
            Fields: []any{
                il.TextFieldConfig{
                    Name: "document_title",
                    Type: "TEXT",
                    Description: "Title of the terms document",
                },
                il.DateFieldConfig{
                    Name: "effective_date",
                    Type: "DATE",
                    Description: "Effective date of the terms",
                },
                il.TextFieldConfig{
                    Name: "parties",
                    Type: "TEXT",
                    Description: "Parties to the agreement",
                },
                il.TextareaFieldConfig{
                    Name: "termination_clause",
                    Type: "TEXTAREA",
                    Description: "Termination conditions and notice period",
                },
                il.TextareaFieldConfig{
                    Name: "liability_limitation",
                    Type: "TEXTAREA",
                    Description: "Liability limitation or cap",
                },
                il.TextareaFieldConfig{
                    Name: "indemnification",
                    Type: "TEXTAREA",
                    Description: "Indemnification obligations",
                },
                il.TextareaFieldConfig{
                    Name: "data_handling",
                    Type: "TEXTAREA",
                    Description: "Data processing and privacy provisions",
                },
                il.TextFieldConfig{
                    Name: "governing_law",
                    Type: "TEXT",
                    Description: "Governing law and jurisdiction",
                },
                il.TextFieldConfig{
                    Name: "payment_terms",
                    Type: "TEXT",
                    Description: "Payment terms and conditions",
                },
                il.BooleanFieldConfig{
                    Name: "auto_renewal",
                    Type: "BOOLEAN",
                    Description: "Whether the agreement auto-renews",
                },
            },
        },
    })
    if err != nil {
        panic(err)
    }

    _ = result
}
Response
{
  "success": true,
  "data": {
    "document_title": {
      "value": "CloudPeak SaaS Master Services Agreement",
      "confidence": 0.99,
      "citations": ["CloudPeak SaaS Master Services Agreement"]
    },
    "effective_date": {
      "value": "2026-04-01",
      "confidence": 0.98,
      "citations": ["Effective Date: April 1, 2026"]
    },
    "parties": {
      "value": "CloudPeak Solutions B.V. and Whitmore Legal Advisors LLP",
      "confidence": 0.98,
      "citations": ["between CloudPeak Solutions B.V. (\"Provider\") and Whitmore Legal Advisors LLP (\"Customer\")"]
    },
    "termination_clause": {
      "value": "Either party may terminate with 90 days written notice. CloudPeak may terminate immediately for non-payment after a 30-day cure period. Upon termination, Customer data is exported within 30 days and deleted within 90 days.",
      "confidence": 0.96,
      "citations": ["Either party may terminate this Agreement upon ninety (90) days prior written notice", "Provider may terminate immediately if Customer fails to cure non-payment within thirty (30) days"]
    },
    "liability_limitation": {
      "value": "Total aggregate liability is capped at the fees paid during the 12 months preceding the claim. Neither party is liable for indirect, consequential, incidental, or punitive damages.",
      "confidence": 0.95,
      "citations": ["aggregate liability shall not exceed the total fees paid during the twelve (12) months preceding the event", "neither party shall be liable for any indirect, consequential, incidental, or punitive damages"]
    },
    "indemnification": {
      "value": "CloudPeak indemnifies Customer against third-party IP infringement claims arising from use of the service. Customer indemnifies CloudPeak against claims arising from Customer's data or misuse of the platform.",
      "confidence": 0.94,
      "citations": ["Provider shall indemnify Customer against third-party claims alleging intellectual property infringement", "Customer shall indemnify Provider against claims arising from Customer Data"]
    },
    "data_handling": {
      "value": "CloudPeak processes data as a data processor under GDPR. All data is stored in EU-based data centers (Frankfurt, Amsterdam). A Data Processing Agreement is incorporated by reference. Sub-processors require prior written consent.",
      "confidence": 0.96,
      "citations": ["Provider acts as a data processor under GDPR", "Data stored in EU-based data centers", "Data Processing Agreement incorporated by reference"]
    },
    "governing_law": {
      "value": "Laws of the Netherlands. Disputes resolved in the courts of Amsterdam.",
      "confidence": 0.98,
      "citations": ["governed by the laws of the Netherlands", "courts of Amsterdam shall have exclusive jurisdiction"]
    },
    "payment_terms": {
      "value": "Net 30 from invoice date. Invoices issued quarterly in advance. Late payments accrue interest at 1.5% per month.",
      "confidence": 0.97,
      "citations": ["Payment due within thirty (30) days of invoice", "invoiced quarterly in advance", "late payments shall accrue interest at 1.5% per month"]
    },
    "auto_renewal": {
      "value": true,
      "confidence": 0.97,
      "citations": ["Agreement automatically renews for successive one-year terms unless either party provides sixty (60) days written notice"]
    }
  }
}
Template
{
  "name": "Extract terms and conditions in Iteration Layer",
  "nodes": [
    {
      "parameters": {
        "content": "## Extract Terms and Conditions\n\nLegal agencies, compliance teams, and e-commerce platforms use this recipe to extract key clauses from vendor or partner terms — pulling out termination conditions, liability caps, data handling provisions, and governing law for contract review and risk assessment.\n\n**Note:** This workflow uses the Iteration Layer community node (`n8n-nodes-iterationlayer`). Install it via Settings > Community Nodes on self-hosted n8n, or add it directly on n8n Cloud with Verified Community Nodes enabled.",
        "height": 280,
        "width": 500,
        "color": 2
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [200, 40],
      "id": "a4b5c6d7-e8f9-0123-abcd-890123456701",
      "name": "Overview"
    },
    {
      "parameters": {
        "content": "### Step 1: Extract Terms and Conditions\nResource: **Document Extraction**\n\nConfigure the Document Extraction parameters below, then connect your credentials.",
        "height": 160,
        "width": 300,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [475, 100],
      "id": "a4b5c6d7-e8f9-0123-abcd-890123456702",
      "name": "Step 1 Note"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [250, 300],
      "id": "a4b5c6d7-e8f9-0123-abcd-890123456703",
      "name": "Manual Trigger"
    },
    {
      "parameters": {
        "resource": "documentExtraction",
        "schemaInputMode": "rawJson",
        "schemaJson": "{\"fields\":[{\"name\":\"document_title\",\"type\":\"TEXT\",\"description\":\"Title of the terms document\"},{\"name\":\"effective_date\",\"type\":\"DATE\",\"description\":\"Effective date of the terms\"},{\"name\":\"parties\",\"type\":\"TEXT\",\"description\":\"Parties to the agreement\"},{\"name\":\"termination_clause\",\"type\":\"TEXTAREA\",\"description\":\"Termination conditions and notice period\"},{\"name\":\"liability_limitation\",\"type\":\"TEXTAREA\",\"description\":\"Liability limitation or cap\"},{\"name\":\"indemnification\",\"type\":\"TEXTAREA\",\"description\":\"Indemnification obligations\"},{\"name\":\"data_handling\",\"type\":\"TEXTAREA\",\"description\":\"Data processing and privacy provisions\"},{\"name\":\"governing_law\",\"type\":\"TEXT\",\"description\":\"Governing law and jurisdiction\"},{\"name\":\"payment_terms\",\"type\":\"TEXT\",\"description\":\"Payment terms and conditions\"},{\"name\":\"auto_renewal\",\"type\":\"BOOLEAN\",\"description\":\"Whether the agreement auto-renews\"}]}",
        "files": {
          "fileValues": [
            {
              "fileInputMode": "url",
              "fileName": "vendor-terms-cloudpeak.pdf",
              "fileUrl": "https://example.com/contracts/vendor-terms-cloudpeak-2026.pdf"
            }
          ]
        }
      },
      "type": "n8n-nodes-iterationlayer.iterationLayer",
      "typeVersion": 1,
      "position": [500, 300],
      "id": "a4b5c6d7-e8f9-0123-abcd-890123456704",
      "name": "Extract Terms and Conditions",
      "credentials": {
        "iterationLayerApi": {
          "id": "1",
          "name": "Iteration Layer API"
        }
      }
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Extract Terms and Conditions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
Prompt
Extract terms and conditions from the file at [file URL]. Use the extract_document tool with these fields:

- document_title (TEXT): Title of the terms document
- effective_date (DATE): Effective date of the terms
- parties (TEXT): Parties to the agreement
- termination_clause (TEXTAREA): Termination conditions and notice period
- liability_limitation (TEXTAREA): Liability limitation or cap
- indemnification (TEXTAREA): Indemnification obligations
- data_handling (TEXTAREA): Data processing and privacy provisions
- governing_law (TEXT): Governing law and jurisdiction
- payment_terms (TEXT): Payment terms and conditions
- auto_renewal (BOOLEAN): Whether the agreement auto-renews

Related Recipes

Try with your own data

Start the 7-day trial and run this recipe in minutes.