docs(gov): document law results with legal labels on /search/gov

ER
3d ago
+132-3

This PR documents the new law result group on /v2/search/gov. It follows @KrisOei's ruling that legal labels don't go on web results ("if we want to add the citations and such to it should make a new one ['law']"). The web result docs and the categories: ["gov"] docs are unchanged.

  • features/gov.mdx: a new "Legal labels" section covering sources: ["law"], a cURL example, the field table (jurisdiction, court, court_type, cites, cited_as, updated_at), an example data.law response, and how to follow a citation through the cites filter.
  • api-reference/endpoint/gov-search.mdx: one sentence pointing to sources: ["law"].
  • api-reference/v2-openapi.json: adds the sources query parameter and body field, and adds law to GovSearchResponse. This matches the API OpenAPI in https://github.com/firecrawl/firecrawl/pull/5354.

English only; translations follow through CI. Merge this after https://github.com/firecrawl/search-index/pull/397 and https://github.com/firecrawl/firecrawl/pull/5354 are deployed.

updated_at on external web results

The search-index API now mixes external web results (firesearch) into gov search by default. Those rows carry no legal labels and no crawl time, so the law group omits updated_at on them instead of serving 0, which would read as a 1970 crawl date. updated_at is present for indexed pages and omitted for external web results. Kris, overrule this if you'd rather keep 0 or drop those rows from law.