Skip to main content
This guide walks through the full lien search implementation: submitting a search, retrieving results, and downloading lien documents. Before starting, review Lien Search: Basics for an overview of how the product works, and Liens, Judgments, and Public Records for lien terminology.

Prerequisites

  • An active Baselayer API key
  • A completed Business Search: you will need either the business_id or business_search_id from that result
  • Familiarity with Baselayer’s Business Search API: see Business Search: API Basics if needed

Base URL & Authentication

Base URL:
Authentication: All requests require an API key in the X-API-Key header:

POST /lien_searches accepts three request variants depending on what identifiers you have available. Choose the one that fits your integration.

Option A: Search by business_id

Use the business_id from a previous Baselayer Business Search. The search targets the domestic state of the business unless search_states is specified.
To search specific states instead of the domestic state:

Option B: Search by business_search_id with additional_search_entities

Use the id from a Business Search response. This variant supports additional_search_entities, which lets you search for linked individuals or alternate business names in the same API call - without making separate requests. This is the recommended approach when your workflow requires lien coverage for business officers, guarantors, or beneficial owners alongside the primary business.
additional_search_entities fields:
Note: search_states is required for each entity in additional_search_entities. The main business will still default to its domestic state unless you override it with a top-level search_states field.
For full guidance on when and how to use additional_search_entities, see Lien Search: Best Practices.

Option C: Search by person_id

Use a person_id from an existing Baselayer person record. search_states is required for person-based searches.
For a full guide on searching individuals, see Lien Search for Individuals.

Execution Mode

Lien searches support both synchronous and asynchronous execution. Results are returned directly in the response body on synchronous requests. For async execution, consume results via webhooks (LiensSearch.completed) or by polling /lien_searches/{lien_search_request_id}. One exception: ad-hoc (name-based) lien searches never emit webhooks — for those, poll or use synchronous execution. See Synchronous & Asynchronous Request Execution for setup guidance.

Step 2: Retrieve Results

Synchronous (default): Results are returned directly in the POST response body. Skip ahead to Step 3 — Parse the Response. Asynchronous: Consume results via the LiensSearch.completed webhook or poll /lien_searches/{lien_search_request_id}/status until state is COMPLETED, then retrieve the full result with GET /lien_searches/{lien_search_request_id}. Note that ad-hoc (name-based) lien searches never emit webhooks — for those, poll or use synchronous execution. See Synchronous & Asynchronous Request Execution for full guidance.

Step 3: Parse the Response

The core content of a completed search is the filings array. Example response:
Key fields to evaluate on each filing:
Active lien check: The top-level status is derived by Baselayer from the filing, its amendments, and its lapse date (per the UCC §9-515 rollup rules): a termination amendment produces terminated, a continuation filed within the statutory window keeps the filing active, and otherwise the lapse date decides active vs lapsed. Treat status as the authoritative open/closed signal, with amendments[] and lapse_date as supporting evidence — you do not need to re-derive liveness yourself.
For full guidance on interpreting and classifying results, see Lien Search: Best Practices.

Step 4: Retrieve Lien Documents

PDF documents are available for many filings at no additional cost. Check availability: document_filename is non-null on the filing. Retrieve the document:
This endpoint responds with a 307 redirect to a signed URL for a consolidated PDF of all documents associated with that filing — make sure your HTTP client follows redirects (--location in curl; requests follows them by default).
number_of_pages is descriptive only and does not guarantee a retrievable document. Rely on document_filename being non-null.

Full Example: Business + Guarantor Lien Search (Synchronous)


Where to Go Next