Base Path /api/ai-for-lawyers
GET

List Lawyer AI Tools

GET /api/ai-for-lawyers

Returns paginated lawyer AI tools. Default sort is rankScore DESC — the highest-quality, most-engaged tools surface first. Supports rich filtering by practice area, functional role, compliance flags, pricing, and full-text search.

Query Parameters — Pagination & Search
ParamTypeDefaultDescription
pagenumber1Page number (1-based)
limitnumber20Results per page (max 200)
searchstringFull-text search across name, tagline, and description
Query Parameters — Filtering
ParamTypeDefaultDescription
practiceAreastringFilter by practice area slug (see Filter Values)
functionalstringFilter by functional role slug (see Filter Values)
pricingModelenumfree | freemium | paid | enterprise
featuredbooleantrue to return only featured tools
verifiedbooleantrue to return only verified tools
apiAccessbooleantrue to return only tools with API access
tagsstringComma-separated tag slugs, each ANDed (tool must have all)
minPricenumberMinimum startingPrice in USD
maxPricenumberMaximum startingPrice in USD
Query Parameters — Compliance Flags

Boolean filters. Pass true to include only tools that carry the specified compliance flag in their typeFilters array.

ParamtypeFilters slugDescription
abaModelRulescompliance:aba-model-rulesABA Model Rules compliant
stateBarscompliance:state-barsState bar compliant
gdprcompliance:gdprGDPR compliant
soc2compliance:soc2SOC 2 certified
ccpacompliance:ccpaCCPA compliant
noTrainingcompliance:no-trainingDoes NOT train on user/client data
dataResidencycompliance:data-residencyOffers data residency controls
onPremisecompliance:on-premiseOn-premise deployment available
Query Parameters — Sorting
ParamTypeDefaultDescription
sortByenumrankrank | createdAt | rating | viewCount | reviewCount | name | startingPrice
sortOrderenumdescasc | desc
topRatedbooleanShortcut: overrides sort to rating DESC. rankScore is still used as tiebreaker.
Default sort is rank. This maps to rankScore DESC, ensuring the best-quality tools always appear first — even under filters. When any other sortBy is used, rankScore DESC is applied as an automatic secondary tiebreaker to keep results stable.
Response
200 — Tool list
{
  "success": true,
  "data": {
    "tools": [
      {
        "id": "tool_abc",
        "slug": "contract-ai-pro",
        "name": "ContractAI Pro",
        "singleLineDescription": "AI contract review in seconds",
        "logoUrl": "https://...",
        "screenshotUrls": ["https://..."],
        "toolType": "lawyer",
        "tags": ["contract", "ai-review"],
        "pricingModel": "paid",
        "startingPrice": 49,
        "featured": true,
        "verified": true,
        "apiAccess": false,
        "viewCount": 3420,
        "clickCount": 891,
        "upvoteCount": 204,
        "rating": 4.7,
        "reviewCount": 38,
        "rankScore": 1284.3,
        "typeFilters": [
          "practice:contract-review",
          "practice:corporate",
          "func:document-drafting",
          "func:contract-analysis",
          "compliance:gdpr",
          "compliance:soc2"
        ],
        "createdAt": "2024-11-15T00:00:00.000Z",
        "publishedAt": "2024-11-16T00:00:00.000Z",
        "user": { "id": "u1", "username": "legaltech_founder", "avatar": "https://..." }
      }
    ],
    "pagination": {
      "total": 120,
      "page": 1,
      "limit": 20,
      "totalPages": 6
    }
  }
}
GET

Filter Options

GET /api/ai-for-lawyers/filters

Returns all valid filter values for building the sidebar. Static response — no database query. Cached by CDN for 24 hours (Cache-Control: public, max-age=86400).

Response
200 — Filter options
{
  "success": true,
  "data": {
    "practiceAreas": [
      { "label": "Contract Review",   "value": "contract-review"   },
      { "label": "Litigation",          "value": "litigation"          },
      { "label": "Corporate",           "value": "corporate"           },
      { "label": "IP & Patents",        "value": "ip-patents"           },
      { "label": "Employment Law",      "value": "employment"          },
      { "label": "Real Estate Law",     "value": "real-estate"         },
      { "label": "Tax Law",             "value": "tax"                 },
      { "label": "Immigration",         "value": "immigration"         },
      { "label": "Compliance",          "value": "compliance"          },
      { "label": "Family Law",          "value": "family-law"          },
      { "label": "Criminal Defense",    "value": "criminal-defense"    }
    ],
    "functional": [
      { "label": "Document Drafting",    "value": "document-drafting"    },
      { "label": "Legal Research",        "value": "legal-research"       },
      { "label": "Contract Analysis",    "value": "contract-analysis"   },
      { "label": "Due Diligence",         "value": "due-diligence"        },
      { "label": "E-Discovery",           "value": "e-discovery"          },
      { "label": "Document Review",       "value": "document-review"      },
      { "label": "Legal Summarization",   "value": "legal-summarization"  },
      { "label": "Citation Checking",    "value": "citation-checking"   },
      { "label": "Regulatory Tracking",  "value": "regulatory-tracking"  },
      { "label": "Workflow Automation",  "value": "workflow-automation"  },
      { "label": "Legal Aid",            "value": "legal-aid"            },
      { "label": "Courts",               "value": "courts"               }
    ],
    "complianceFlags": [
      { "label": "ABA Model Rules",         "value": "abaModelRules",   "slug": "compliance:aba-model-rules" },
      { "label": "State Bar Compliant",     "value": "stateBars",       "slug": "compliance:state-bars"      },
      { "label": "GDPR Compliant",          "value": "gdpr",            "slug": "compliance:gdpr"            },
      { "label": "SOC 2 Certified",         "value": "soc2",            "slug": "compliance:soc2"            },
      { "label": "CCPA Compliant",          "value": "ccpa",            "slug": "compliance:ccpa"            },
      { "label": "No Client Data Training", "value": "noTraining",     "slug": "compliance:no-training"     },
      { "label": "Data Residency",          "value": "dataResidency",  "slug": "compliance:data-residency"  },
      { "label": "On-Premise Available",    "value": "onPremise",      "slug": "compliance:on-premise"      }
    ],
    "pricingModels": ["free", "freemium", "paid", "enterprise"],
    "sortFields": ["rank", "createdAt", "rating", "viewCount", "reviewCount", "name", "startingPrice"]
  }
}
GET

Tool Counts by Category

GET /api/ai-for-lawyers/tool-counts

Returns tool counts grouped by practice area and functional category. Useful for rendering count badges next to filter options. Cached for 5 minutes.

Response
200 — Counts
{
  "success": true,
  "data": {
    "practiceAreas": [
      { "label": "Contract Review", "value": "contract-review", "count": 42 },
      { "label": "Litigation",        "value": "litigation",       "count": 18 },
      { "label": "Corporate",         "value": "corporate",         "count": 31 }
    ],
    "functional": [
      { "label": "Document Drafting", "value": "document-drafting", "count": 55 },
      { "label": "Legal Research",    "value": "legal-research",    "count": 48 },
      { "label": "Contract Analysis", "value": "contract-analysis", "count": 37 }
    ]
  }
}
GET

Get Lawyer Tool by Slug

GET /api/ai-for-lawyers/:slug

Returns a single lawyer tool's full details including full description, metadata, and last 10 reviews. Only returns tools where toolType = "lawyer" — other types return 404. Increments viewCount once per visitor per day (cookie-based deduplication).

Path Parameters
ParamTypeDescription
slugstringTool URL slug, e.g. contract-ai-pro
Response
200 — Full tool detail
{
  "success": true,
  "data": {
    "id": "tool_abc",
    "slug": "contract-ai-pro",
    "name": "ContractAI Pro",
    "singleLineDescription": "AI contract review in seconds",
    "description": "Full long-form description...",
    "websiteUrl": "https://contractai.io",
    "logoUrl": "https://...",
    "screenshotUrls": ["https://..."],
    "toolType": "lawyer",
    "pricingModel": "paid",
    "startingPrice": 49,
    "featured": true,
    "verified": true,
    "apiAccess": false,
    "viewCount": 3420,
    "clickCount": 891,
    "upvoteCount": 204,
    "rating": 4.7,
    "reviewCount": 38,
    "rankScore": 1284.3,
    "typeFilters": [
      "practice:contract-review", "practice:corporate",
      "func:document-drafting", "func:contract-analysis",
      "compliance:gdpr", "compliance:soc2"
    ],
    "typeMetadata": {
      "practiceAreas": ["contract-review", "corporate"],
      "functional": ["document-drafting", "contract-analysis"],
      "compliance": {
        "abaModelRules": true,
        "stateBars": false,
        "gdpr": true,
        "soc2": true,
        "ccpa": false,
        "trainsOnUserData": false,
        "dataResidency": true,
        "onPremise": false
      },
      "security": {
        "certifications": ["ISO 27001", "SOC 2 Type II"],
        "encryption": true,
        "retentionDays": 30
      },
      "targetUsers": ["Solo practitioners", "BigLaw associates"],
      "founded": 2022,
      "headquarters": "San Francisco, CA",
      "funding": "Series A",
      "roiMetrics": ["Saves 5 hrs/week on contract review"],
      "attorneyVerifiedCount": 150
    },
    "tags": ["contract", "ai-review", "nda"],
    "reviews": [
      {
        "id": "rev_1",
        "rating": 5,
        "comment": "Cut our contract review time by 80%",
        "createdAt": "2025-01-10T00:00:00.000Z",
        "user": { "username": "atty_jane", "avatar": "https://..." }
      }
    ],
    "_count": { "bookmarks": 89 },
    "user": { "id": "u1", "username": "legaltech_founder", "avatar": "https://..." }
  }
}
404 — Wrong type or not found
{ "success": false, "error": "Tool not found" }

Lawyer Metadata Schema

When creating or updating a tool with toolType: "lawyer", pass these fields inside the typeMetadata object. The backend extracts filterable fields and writes them to typeFilters automatically — you do not set typeFilters directly.

typeMetadata — Lawyer Tool (all fields)
{
  // ── Filterable fields ─────────────────────────────────────────────
  // These drive the typeFilters array and the sidebar filter UI.

  "practiceAreas": ["contract-review", "corporate"],
  // Array of practice area slugs. Up to 20. Each writes "practice:{value}" to typeFilters.

  "functional": ["document-drafting", "legal-research"],
  // Array of functional role slugs. Up to 20. Each writes "func:{value}" to typeFilters.

  "compliance": {
    "abaModelRules":   true,   // → "compliance:aba-model-rules"
    "stateBars":       true,   // → "compliance:state-bars"
    "gdpr":            true,   // → "compliance:gdpr"
    "soc2":            true,   // → "compliance:soc2"
    "ccpa":            true,   // → "compliance:ccpa"
    "trainsOnUserData": false, // false → "compliance:no-training"
    "dataResidency":   true,   // → "compliance:data-residency"
    "onPremise":       false   // true → "compliance:on-premise"
  },

  // ── Display-only fields ───────────────────────────────────────────
  // Not filterable via query params. Stored in typeMetadata and shown on the detail page.

  "security": {
    "certifications": ["ISO 27001", "SOC 2 Type II"],
    "encryption": true,
    "retentionDays": 30
  },

  "targetUsers": ["Solo practitioners", "Law firms", "In-house legal teams"],
  "founded": 2022,
  "headquarters": "San Francisco, CA",
  "funding": "Series A",
  "roiMetrics": ["Saves 5 hrs/week on contract review", "85% accuracy on clause risk scoring"],
  "attorneyVerifiedCount": 150
}

Filter Values

All accepted values for practiceArea and functional query parameters. Use these exact slug strings when filtering or submitting tool metadata.

practiceArea — 11 values
Slug                    Label
─────────────────────────────────────────────
"contract-review"       Contract Review
"litigation"            Litigation
"corporate"             Corporate
"ip-patents"            IP & Patents
"employment"            Employment Law
"real-estate"           Real Estate Law
"tax"                   Tax Law
"immigration"           Immigration
"compliance"            Compliance
"family-law"            Family Law
"criminal-defense"      Criminal Defense
functional — 12 values
Slug                    Label
─────────────────────────────────────────────
"document-drafting"     Document Drafting
"legal-research"        Legal Research
"contract-analysis"     Contract Analysis
"due-diligence"         Due Diligence
"e-discovery"           E-Discovery
"document-review"       Document Review
"legal-summarization"   Legal Summarization
"citation-checking"     Citation Checking
"regulatory-tracking"   Regulatory Tracking
"workflow-automation"   Workflow Automation
"legal-aid"             Legal Aid
"courts"                Courts
compliance flags — 8 values
Query param       typeFilters slug                Label
──────────────────────────────────────────────────────────────────
abaModelRules     "compliance:aba-model-rules"    ABA Model Rules
stateBars         "compliance:state-bars"         State Bar Compliant
gdpr              "compliance:gdpr"               GDPR Compliant
soc2              "compliance:soc2"               SOC 2 Certified
ccpa              "compliance:ccpa"               CCPA Compliant
noTraining        "compliance:no-training"        No Client Data Training
dataResidency     "compliance:data-residency"     Data Residency Controls
onPremise         "compliance:on-premise"         On-Premise Available

Field Internals

How lawyer metadata fields flow through the data model from submission to response.

typeMetadata fieldtypeFilters entry writtenQuery param to filter
practiceAreas: ["contract-review"]practice:contract-review?practiceArea=contract-review
functional: ["legal-research"]func:legal-research?functional=legal-research
compliance.abaModelRules: truecompliance:aba-model-rules?abaModelRules=true
compliance.stateBars: truecompliance:state-bars?stateBars=true
compliance.gdpr: truecompliance:gdpr?gdpr=true
compliance.soc2: truecompliance:soc2?soc2=true
compliance.ccpa: truecompliance:ccpa?ccpa=true
compliance.trainsOnUserData: falsecompliance:no-training?noTraining=true
compliance.dataResidency: truecompliance:data-residency?dataResidency=true
compliance.onPremise: truecompliance:on-premise?onPremise=true
typeFilters is a serialized JSON string in the database. The API deserializes it before returning. Never set typeFilters directly — always set the source fields in typeMetadata and let the service rebuild it.

Prefix Conventions

PrefixMeaningExamples
practice:Practice area categorypractice:contract-review, practice:litigation
func:Functional role / capabilityfunc:document-drafting, func:e-discovery
compliance:Legal/regulatory compliance flagcompliance:gdpr, compliance:no-training

Role Tab Aliases

Some frontend tab/role names are translated to canonical functional slugs before the query executes. This allows the UI to use friendlier or legacy names without breaking existing tools.

Frontend value (?functional=)Resolves toWhy
legal-aid legal-research "Legal aid" tabs often mean research assistance tools — maps to the canonical research slug
courts e-discovery Court-focused tools primarily handle electronic discovery; maps to the e-discovery slug
When submitting tool metadata, always use the canonical slugs (legal-research, e-discovery). The alias mapping only applies to incoming query parameters on the list endpoint, not to tool creation/update.

Filter Glossary

Practice Areas

SlugWhat it covers
contract-review Tools that read, flag issues in, or summarize contracts — NDAs, MSAs, SOWs, employment agreements. Core use case for most legal AI buyers.
litigation Litigation support: case strategy, pleading drafting, deposition prep, settlement analysis, brief summarization.
corporate Corporate legal work: board minutes, M&A due diligence, entity management, securities filings, governance documents.
ip-patents Intellectual property: patent drafting, prior art search, trademark monitoring, IP portfolio management, copyright analysis.
employment Employment and labor law: offer letter generation, HR policy review, termination risk, wage/hour compliance, EEOC research.
real-estate Real estate legal work: lease review, title analysis, zoning research, purchase agreement drafting. Distinct from the real-estate AI tools sub-site.
tax Tax research and compliance: code interpretation, memo drafting, international tax analysis, filing deadline tracking.
immigration Immigration filings: visa applications, USCIS form completion, case status tracking, country-specific requirements.
compliance Regulatory compliance programs: policy gap analysis, horizon scanning, audit readiness, policy drafting for regulated industries.
family-law Family law: divorce filings, custody agreements, prenuptial agreements, support calculations, adoption paperwork.
criminal-defense Criminal defense: case research, sentencing guidelines, motion drafting, witness prep, public defender workflow tools.

Functional Roles

SlugWhat it covers
document-drafting AI-assisted generation of legal documents from scratch: contracts, motions, letters, agreements. Includes template-fill and clause suggestions.
legal-research Case law and statutory research: finding precedents, summarizing decisions, answering legal questions with citations. Also covers legal aid research tools.
contract-analysis Analyzing existing contracts to identify risks, obligations, deviations from standard, missing clauses, and renewal dates.
due-diligence Accelerated document review for M&A, financing, or real estate transactions — extracting key terms across large document sets.
e-discovery Electronic discovery workflows: document collection, culling, review, privilege logging, production formatting. Also covers court filing tools.
document-review First-pass or second-pass review of large document collections: relevance screening, redaction, classification, issue tagging.
legal-summarization Summarizing lengthy legal documents — case decisions, depositions, discovery responses, regulatory guidance — into executive-level briefs.
citation-checking Verifying that case citations in briefs and memos are correct, not overruled, and formatted to the required citation style (Bluebook, etc.).
regulatory-tracking Monitoring regulatory changes, new legislation, and agency guidance relevant to a practice area or industry vertical.
workflow-automation Automating repetitive legal workflows: intake forms, deadline calendaring, billing entries, document routing, client communication.
legal-aid Tools designed for pro bono or legal aid contexts, serving self-represented litigants or under-resourced legal services organizations. (Alias → legal-research in filter queries.)
courts Court-facing tools: e-filing, docket monitoring, oral argument prep, court calendar management. (Alias → e-discovery in filter queries.)

Compliance Flags

FlagWhat it certifies
abaModelRules The tool's usage is consistent with ABA Model Rules of Professional Conduct — particularly Rules 1.1 (competence), 1.6 (confidentiality), and 5.3 (supervision of non-lawyers). Critical for US-licensed attorneys.
stateBars The vendor has formal state bar guidance, ethics opinions, or certifications supporting use of this tool by licensed attorneys. Coverage may vary by jurisdiction.
gdpr General Data Protection Regulation (EU/UK) — the tool processes EU personal data lawfully, has a DPA available, and supports data subject rights. Required for any EU-facing legal practice.
soc2 SOC 2 Type II — independent annual audit of the vendor's security, availability, and confidentiality controls. The gold standard for enterprise legal buyers.
ccpa California Consumer Privacy Act — supports consumer data rights (access, deletion, opt-out of sale) for California residents. Relevant for tools used with California clients.
noTraining The vendor contractually commits to not training AI models on user-submitted client data or documents. Directly addresses Rule 1.6 confidentiality obligations and is typically the first question risk/compliance teams ask.
dataResidency The vendor offers geographic data residency controls — e.g., storing data only in the EU or US. Required by some government, financial, and healthcare legal teams.
onPremise The tool can be deployed on-premises or in a private cloud rather than the vendor's shared SaaS infrastructure. Relevant for highly regulated firms (defense contractors, top-tier BigLaw, government agencies).

Example URLs

Default — top ranked tools
GET /api/ai-for-lawyers
Filter by practice area
GET /api/ai-for-lawyers?practiceArea=contract-review
Filter by functional role
GET /api/ai-for-lawyers?functional=e-discovery
Compliance filter — GDPR + no client data training
GET /api/ai-for-lawyers?gdpr=true&noTraining=true
Enterprise tools with SOC 2 and on-premise option
GET /api/ai-for-lawyers?pricingModel=enterprise&soc2=true&onPremise=true
Search + practice area + free tools
GET /api/ai-for-lawyers?search=contract+risk&practiceArea=contract-review&pricingModel=free
Top-rated litigation tools
GET /api/ai-for-lawyers?practiceArea=litigation&topRated=true
Featured + verified, highest ranked first
GET /api/ai-for-lawyers?featured=true&verified=true&sortBy=rank&sortOrder=desc
Budget tools under $50/mo with API access
GET /api/ai-for-lawyers?maxPrice=50&apiAccess=true&sortBy=startingPrice&sortOrder=asc
All compliance flags at once (maximally compliant tools)
GET /api/ai-for-lawyers?abaModelRules=true&gdpr=true&soc2=true&noTraining=true&dataResidency=true
Paginated, sorted by newest
GET /api/ai-for-lawyers?sortBy=createdAt&sortOrder=desc&page=2&limit=10
Get a single tool detail
GET /api/ai-for-lawyers/contract-ai-pro