Answer Local Law Questions With Sources
Build a script that turns legal searches into cited markdown research briefs.
Introduction
30 Second Summary
Legal rules change across places and over time. A confident answer becomes hard to trust when you cannot see the law behind it.
In this project, you will compare a plain chatbot answer with a search of the Firecrawl Government and Legal Index. You will build a script that saves the filtered results as a Markdown brief with links to each government source.
What You'll Build
You will run a local law question through your script and open a clean brief that traces every result back to an official government page.
By the end of this project, you'll have:
- A side-by-side comparison that exposes which answer can be checked against source links.
- A filtered government search that narrows results by jurisdiction and cited law.
- A Markdown legal brief where every result shows its source URL, jurisdiction, and cited laws.
- Secret Mission: An optional challenge to push your cited-source research skills further.
Are there any prerequisites?
You need a terminal with curl available. You can start without an API key at no cost.
Before We Start
A useful legal research comparison needs the same question on both sides. It also needs tools that can expose the sources behind an answer.
This setup gives you a working terminal. You will also lock in the California question that guides the project.
In this step, get ready to:
- Confirm curl can run from your terminal.
- Confirm Python can run from your terminal.
- Choose the California rent increase question for the comparison.
Verify curl in your terminal
curl sends web requests from your terminal. You use it later to search the legal index without an API key.
- Press Cmd+Space on macOS or the Windows key on Windows to open system search.
- Type Terminal on macOS or PowerShell on Windows into the search field.
- Press Enter to open the terminal app.
- Check whether curl is available by running this command:
curl --version
What does this command do?
The --version option asks curl to print its version details. A version line confirms that your terminal can use HTTP requests.
✔️ I see curl version details
Good. Your terminal can now send the web requests used throughout this project.
ⓧ The command is not found
Your computer needs curl before you can call the legal search endpoint.
- Open the official curl download page in your browser.
- Follow the installation instructions for your operating system.
- Return to the terminal after the installation finishes.
- Repeat the curl version check above.
Still unable to run curl?
Close the terminal after installing curl. Open a fresh terminal so it can detect the new command.
If the command still fails, help me troubleshoot my curl installation.
Verify Python in your terminal
The final script uses Python to turn search results into a readable brief. A version check confirms that the interpreter is ready.
macOS
- Check your Python version by running this command:
python3 --version
What does this command do?
The python3 command selects the Python 3 interpreter. The --version option prints its installed version.
Windows
- Check your Python version by running this command:
py --version
What does this command do?
The py launcher starts Python on Windows. The --version option prints its installed version.
✔️ I see Python 3
You should see output that begins with Python 3. Your interpreter is ready to run the brief building script.
ⓧ Python is not found
Python needs to be installed before you can build the script.
- Open the official Python downloads page in your browser.
- Follow the installation instructions for your operating system.
- Approve only the installer downloaded from python.org.
- Return to a fresh terminal after the installation finishes.
- Repeat the Python version check for your operating system.
Still unable to run Python?
A terminal opened before the installation may not detect Python. Close it before opening a fresh terminal.
If Python is still unavailable, help me troubleshoot my Python installation.
Prepare your browser and question
Your browser provides the plain chatbot comparison first. It also lets you inspect the government pages linked from the final brief.
- Press Cmd+Space on macOS or the Windows key on Windows to open system search.
- Type the name of your usual web browser into the search field.
- Press Enter to open the browser.
- Leave the browser window open for the next step.
A focused question keeps the chatbot answer and the sourced brief comparable. Use Is there a cap on rent increases in California? throughout this project.
- Keep the question's wording exactly as shown.
Before you run the final check, do you expect curl to respond from the same terminal session?
- Return to the terminal from earlier.
- Confirm curl still responds by running this command:
curl --version
What does this final check prove?
The command prints curl's version details again. This confirms that your terminal remains ready for the first legal index request.
Your setup is ready for source checks. You now have both command line tools plus one consistent legal question.
Your tools and research question are ready. Next, you will ask a plain chatbot the question and examine what its answer leaves out.
Compare an Uncited Chatbot Answer
A legal answer can sound confident while leaving you no path to verify the rule. That gap matters when the question affects rent or another real decision.
This step creates a baseline with a plain chatbot before you use legal search. You will record its answer so the missing government-source links are visible in the comparison.
In this step, get ready to:
- Ask your selected California rent increase cap question without browsing or source tools.
- Save the complete chatbot response as your comparison baseline.
- Confirm that the response does not link its legal claims to official government pages.
Ask the question without browsing
A plain chatbot mode answers from its existing model context. Keeping web search off gives you the uncited baseline this project needs.
- Use your browser to visit a plain chatbot you already have access to.
- Turn off any web search or browsing option.
- Start a fresh conversation.
- Paste Is there a cap on rent increases in California? into the message field.
- Send the message without requesting citations.
- Wait for the response to finish.
You should see a direct answer about California rent increase caps. The exact wording depends on the chatbot you use.
Your baseline is in place: you now have a confident answer to audit.
Audit and record the evidence
A usable citation gives you a direct link to a government page that supports a claim. A law name alone leaves the original wording unverified.
- Read the response from start to finish.
- Copy the complete response into your note-taking app.
- Place the selected question above the copied response.
Before you inspect the links, predict whether the response gives another reader enough evidence to verify its legal claims.
- Scan the saved response for clickable source links.
- Determine whether any link leads directly to an official government page.
You should find no direct government-source links supporting the answer. The claims may sound specific, but the response gives you no official page where you can check them.
- Add No linked official government sources were provided. below the saved response.
Seeing Government-Source Links?
A chatbot can add sources automatically when browsing is active.
- Start a fresh conversation in a mode that does not use web search.
- Resend the same question without requesting citations.
- Replace the saved response with the new uncited answer.
Help me get an uncited response from my chatbot.
Before the final check, ask yourself whether another reader could verify the legal claims from your saved evidence.
- Compare the saved response with the original chatbot conversation.
- Confirm that the complete response is present.
- Confirm that the audit sentence is present.
You should see the full question above the recorded response. The audit note should sit below it.
No linked official government source should accompany the answer's legal claims.
Your comparison baseline is ready. Next, you will send the same question to the government search endpoint to see how source URLs change what you can verify.
Search the Government and Legal Index
That baseline was useful. Your plain-chatbot comparison exposed the central gap because its legal claims did not link to government sources.
You will send the same question to the Firecrawl Government and Legal Index through its API. You will inspect the JSON response for source URLs.
In this step, get ready to:
- Call the Government and Legal Index without an API key.
- Inspect the JSON response for ranked results.
- Compare the result URLs with the plain-chatbot answer from earlier.
Test source-backed search
A search endpoint accepts a question through a structured request. This request leaves out jurisdiction filters so you can see the index's starting result set.
- Return to the terminal from earlier.
Before you run the search, do you think a keyless request will return results or stop for credentials?
- Send your selected rent increase question by running this command:
curl -s -X POST https://api.firecrawl.dev/v2/search/gov \
-H 'Content-Type: application/json' \
-d '{"query": "Is there a cap on rent increases in California?", "k": 10}'
What does this request do?
- The POST request sends data to https://api.firecrawl.dev/v2/search/gov.
- The query field carries your selected question.
- The k field requests up to 10 ranked results.
- The request omits the Authorization header so it runs without an API key.
- Inspect the JSON response in your terminal.
- Find the success field near the top of the response.
- Locate the web array inside data.
- Scan at least two result objects for a url field.
You will see success set to true. Inside data, the web array contains ranked result objects with source URLs.
That is the keyless search working. Your legal question now has traceable pages behind its results.
No JSON response?
- Reload an open browser page to confirm your internet connection is active.
- Paste the command again if any quotation marks were lost.
- Confirm that all three command lines were included.
Help me troubleshoot the keyless Firecrawl Government and Legal Index request.
Compare the evidence trails
A source URL creates an evidence trail for later checking. The comparison shows which response gives you a path back to its supporting pages.
- Switch back to the recorded plain-chatbot response from earlier.
- Check whether that response contains links to government pages.
Your earlier note confirms that the plain-chatbot response has no linked government sources.
Before your final check, which response do you expect to make its sources easier to trace?
- Return to the JSON response in your terminal.
- Count at least two distinct url fields in the result objects.
- Compare those fields with the missing links in the plain-chatbot response.
The plain-chatbot response leaves its claims disconnected from supporting pages. The index response gives each result a source URL that you can inspect later.
Your unfiltered search now returns traceable source URLs without requiring an API key. Next, you will narrow the results to the jurisdiction and cited law that matter.
Filter Results by Jurisdiction and Law
The unfiltered Firecrawl Government and Legal Index search proved that your question can return government-source links. Its result list can still include pages beyond the authority your brief needs.
A jurisdiction filter limits the search to California material. This gives your local-law question a geographic boundary.
A cited-law filter keeps pages that cite the statute connected to the rent cap question. The two filters create a focused evidence set.
In this step, get ready to:
- Repeat the question through curl with the California jurisdiction filter.
- Add the cited-law filter for California Civil Code section 1947.12.
- Confirm the combined filters produce a narrower JSON result list.
Filter the search to California
A legal question only makes sense inside the jurisdiction that governs it. The jurisdiction field gives the index that boundary.
- Return to the terminal from your unfiltered search.
- Limit the same question to California by running this request:
curl -s -X POST https://api.firecrawl.dev/v2/search/gov \
-H 'Content-Type: application/json' \
-d '{
"query": "Is there a cap on rent increases in California?",
"k": 10,
"jurisdiction": "us-ca"
}'
What Does This Request Change?
- The query field keeps your selected rent increase question unchanged.
- The jurisdiction field uses us-ca to keep pages labeled for California.
- The k field holds the maximum result count at 10.
- The fixed result ceiling makes this response easier to compare with the next one.
- Review the data.web entries in the response.
- Check the source URLs for California-focused government material.
You should see a successful response with ranked titles and source URLs. The California boundary removes material labeled for other jurisdictions.
Good work. Your search now has a California boundary for the rent question.
Jurisdiction Filter Not Working?
- Check that jurisdiction sits inside the JSON body with the value us-ca.
- Check that every JSON key uses straight quotation marks.
- Retry after a short pause if the service reports a rate-limit problem.
Ask for help with the request: Why is my California jurisdiction filter failing in this Firecrawl Government Index request?
Add the cited-law filter
The cites filter keeps pages that cite a specific legal authority. For this rent question, use Cal. Civ. Code § 1947.12 as the printed citation.
Before you run the next request, do you expect the result list to grow or shrink?
- Apply both filters by running this request:
curl -s -X POST https://api.firecrawl.dev/v2/search/gov \
-H 'Content-Type: application/json' \
-d '{
"query": "Is there a cap on rent increases in California?",
"k": 10,
"jurisdiction": "us-ca",
"cites": "Cal. Civ. Code § 1947.12"
}'
How Do the Filters Work Together?
- The jurisdiction filter keeps pages labeled for California.
- The cites filter keeps pages that cite the specified California Civil Code section.
- A result remains only when it satisfies both conditions.
- Review the new data.web array.
- Compare its length with the jurisdiction-only response.
- Inspect the url value for each retained result.
You should see an equal or smaller result list with source URLs intact. The remaining pages satisfy the California boundary plus the cited-law requirement.
That is the core search narrowed to sources connected to the relevant statute.
Seeing No Filtered Results?
- Check that the cites value exactly matches Cal. Civ. Code § 1947.12.
- Rerun the jurisdiction-only request to confirm the broader California search still returns results.
- Treat an empty filtered list as a search limitation instead of proof that no relevant law exists.
Get help diagnosing the filter: Why does my Firecrawl cited-law filter return no results?
Review the narrowed results
Narrowing is useful when the remaining evidence still links back to government pages. Your final check compares the two filtered responses.
Before you compare them, which response do you expect to contain fewer entries?
- Scroll back to the jurisdiction-only response in your terminal history.
- Compare its data.web array with the combined-filter response.
- Inspect every source URL in the combined-filter response.
- Confirm the remaining titles or descriptions connect to the rent increase question.
You should see that the combined request returns a narrower list than the jurisdiction-only request. The retained entries still provide source URLs for later verification.
You have turned a broad legal search into a focused set of California sources connected to the cited law.
Your filtered search now supplies a smaller evidence set with traceable source links. Next, you will turn those results into a clean table in the terminal.
Build a Citation Extraction Script
Your filtered Firecrawl Government and Legal Index search already isolates California material that cites the relevant rent law. The response still arrives as dense JSON that takes time to scan.
A small Python script turns that response into a repeatable research tool. It keeps the source details visible for every result.
In this step, get ready to:
- Call the filtered Government and Legal Index endpoint from Python.
- Extract four citation fields from each JSON result.
- Print the extracted fields as a terminal table.
Fetch the filtered results
Python's standard library can encode the same filters from your earlier request. It can also read the response without another package installation.
- In the terminal folder you used for the filtered search, create local_law_brief.py with your plain-text editor.
- Paste the following code into local_law_brief.py:
import json
from urllib.parse import urlencode
from urllib.request import urlopen
ENDPOINT = "https://api.firecrawl.dev/v2/search/gov"
QUERY = "Is there a cap on rent increases in California?"
FILTERS = {
"query": QUERY,
"jurisdiction": "us-ca",
"cites": "Cal. Civ. Code § 1947.12",
"k": 10,
}
def search_government_index():
# Encode the legal question and filters into a keyless GET request.
request_url = f"{ENDPOINT}?{urlencode(FILTERS)}"
with urlopen(request_url) as response:
payload = json.loads(response.read())
# Keep the ranked government pages from the response.
results = payload.get("data", {}).get("web", [])
print(f"Fetched {len(results)} filtered results.")
return results
results = search_government_index()
What does this code do?
- The FILTERS dictionary keeps the question within the California jurisdiction.
- The cites filter keeps pages that cite the selected rent statute.
- The urlencode() function safely turns those values into a request query.
- The search_government_index() function returns the result list stored under data.web.
- Save local_law_brief.py.
- Test the filtered request by running this command:
python3 local_law_brief.py
What should you see?
You should see Fetched followed by a whole number. This confirms that the script reached the endpoint and parsed its result list.
Seeing zero results or a request failure?
- Compare QUERY with the question from your filtered curl request.
- Compare the jurisdiction value with the California filter from that request.
- Compare the cites value with the cited-law filter that produced your narrower result list.
Ask for help with the request details: troubleshoot my filtered Government and Legal Index request
Print the citation table
A result becomes useful when its title stays beside its source URL. The jurisdiction and cited laws show why that page belongs in the research trail.
- In local_law_brief.py, replace the final results = search_government_index() line with the following table formatter and run calls:
def format_cites(cites):
# Turn a citation list into one readable table cell.
if isinstance(cites, list):
return ", ".join(str(citation) for citation in cites) or "None listed"
return str(cites or "None listed")
def print_results(results):
# Place each source and its legal metadata on one table row.
headers = ["Title", "Source URL", "Jurisdiction", "Cited laws"]
print(" | ".join(headers))
print("-" * 100)
for result in results:
row = [
str(result.get("title") or "Untitled"),
str(result.get("url") or "No URL"),
str(result.get("jurisdiction") or "Not listed"),
format_cites(result.get("cites")),
]
print(" | ".join(row))
results = search_government_index()
print_results(results)
How does the table work?
- The format_cites() function combines multiple cited laws into one readable cell.
- The headers list fixes the order of the four fields.
- Each result supplies its title, source URL, jurisdiction, and cited laws.
- Fallback values keep the table readable when a result omits optional metadata.
- Save local_law_brief.py.
Before you run the finished script, which four fields do you expect to appear across each result row?
- Print the finished citation table by running this command:
python3 local_law_brief.py
What should you see?
You should see a header row containing Title, Source URL, Jurisdiction, and Cited laws.
Each filtered result should appear on its own row. Every available government link remains visible beside its legal metadata.
Missing rows or citation fields?
- Check that print_results(results) appears at the bottom of local_law_brief.py.
- Check that every field name matches title, url, jurisdiction, or cites exactly.
- Confirm that your earlier filtered JSON response contains the metadata you expect to print.
Ask for help tracing the missing values: debug my citation extraction table
✔️ Awesome, I've got everything!
Your script now fetches the filtered legal results and displays their citation metadata in one terminal table.
ⓧ I'd like to double check the full code
import json
from urllib.parse import urlencode
from urllib.request import urlopen
ENDPOINT = "https://api.firecrawl.dev/v2/search/gov"
QUERY = "Is there a cap on rent increases in California?"
FILTERS = {
"query": QUERY,
"jurisdiction": "us-ca",
"cites": "Cal. Civ. Code § 1947.12",
"k": 10,
}
def search_government_index():
# Encode the legal question and filters into a keyless GET request.
request_url = f"{ENDPOINT}?{urlencode(FILTERS)}"
with urlopen(request_url) as response:
payload = json.loads(response.read())
# Keep the ranked government pages from the response.
results = payload.get("data", {}).get("web", [])
print(f"Fetched {len(results)} filtered results.")
return results
def format_cites(cites):
# Turn a citation list into one readable table cell.
if isinstance(cites, list):
return ", ".join(str(citation) for citation in cites) or "None listed"
return str(cites or "None listed")
def print_results(results):
# Place each source and its legal metadata on one table row.
headers = ["Title", "Source URL", "Jurisdiction", "Cited laws"]
print(" | ".join(headers))
print("-" * 100)
for result in results:
row = [
str(result.get("title") or "Untitled"),
str(result.get("url") or "No URL"),
str(result.get("jurisdiction") or "Not listed"),
format_cites(result.get("cites")),
]
print(" | ".join(row))
results = search_government_index()
print_results(results)
Compare this reference with your saved file. The constants preserve the filtered search while the two output helpers build the table.
That is the extraction layer working. Next, you will turn these rows into a saved markdown brief with linked government sources.
Write the Markdown Brief
Your Python script already turns filtered Firecrawl Government and Legal Index results into a clean terminal table. That table proves the source details are ready to reuse.
A terminal table disappears when the session closes. A Markdown brief preserves the research in a file where every result points back to its government source.
In this step, get ready to:
- Turn each search result into a complete Markdown source entry.
- Write the assembled research brief to local_law_brief.md.
- Inspect the saved brief for linked titles plus source details.
Turn the results into a brief
Markdown links pair readable text with a destination URL. This keeps each result title visible while preserving its government source.
Plan the Brief's Structure
- The selected California rent increase question becomes the brief's main heading.
- Each search result starts with a level-two heading.
- The result title becomes the link text inside square brackets.
- The matching source URL becomes the link destination inside parentheses.
- The jurisdiction appears on its own bullet line.
- The cited laws appear on a separate bullet line.
- The completed document is written to local_law_brief.md.
- The script continues to print its existing terminal table.
- Implement the brief-generation change in local_law_brief.py using the structure above.
- Save local_law_brief.py.
- Predict whether the terminal table will still appear after the file-writing logic executes.
- Generate the Markdown brief by running this command:
python3 local_law_brief.py
What Does This Command Check?
- The python3 command executes the updated script.
- The script repeats the filtered legal search.
- The existing table output checks that result extraction still works.
- The new file-writing logic saves the same results as a Markdown brief.
- Check the terminal output for the same clean result table from the previous step.
- Confirm the command returns to the terminal prompt without stopping early.
That is a solid checkpoint: your table still works after adding the saved brief.
Script Stops Before Printing the Table?
- Check the indentation around the new Markdown-building logic.
- Make sure the file-writing step runs after the result entries have been assembled.
- Confirm the output filename is exactly local_law_brief.md.
Help me debug the Markdown brief generation in my Python script.
Inspect the saved brief
The saved file is the deliverable from this step. Printing it in the terminal gives you a direct view of every heading plus every Markdown link.
- Predict which source details should appear beneath every linked result.
- Print the saved brief in the terminal by running this command:
cat local_law_brief.md
What Should You See?
- The cat command reads local_law_brief.md.
- The command prints the file contents in your terminal.
- The brief begins with your selected California rent increase question.
- Each result shows a linked title.
- Each result also shows its jurisdiction plus cited laws.
- Compare the displayed heading with your selected California rent increase question.
- Scan every result title to confirm it contains the matching government source URL as a Markdown link.
- Check every result entry for a jurisdiction line.
- Check every result entry for cited-law details.
You now have a reusable research brief with a traceable government source behind every listed result.
Brief Missing Links or Details?
- Rerun local_law_brief.py if local_law_brief.md is missing.
- Update the entry formatter if a result title appears as plain text.
- Trace the corresponding extracted field if a jurisdiction or cited-law line is empty.
Help me fix missing links or source details in my Markdown brief.
Your search results now live in a brief that keeps their source links attached. Next, you will open two of those government pages to check the brief against the official text.
Verify the Official Sources
Your brief now turns filtered results from the Firecrawl Government and Legal Index into linked evidence. The final job is to confirm those links support what the brief says.
A source link makes verification possible. Reading the source proves whether the brief represents it accurately.
In this step, you will compare two linked government pages with local_law_brief.md. You will finish by marking the brief as research, not legal advice.
In this step, get ready to:
- Open two government source links from local_law_brief.md.
- Compare the rent increase information on each source with the brief.
- Add the research disclaimer to local_law_brief.md.
Check the first linked source
A government page is the evidence behind a citation. Your brief is trustworthy when its summary matches the page itself.
- Open local_law_brief.md in a text editor.
- Locate the first result that discusses the California rent increase cap.
- Open that result's government source link in a new browser tab.
- Press Cmd+F (macOS) or Ctrl+F (Windows) to open page search.
- Search for the cited law named in the brief.
- Read the passage around the matching law reference.
- Compare the source's rent increase information with the brief's summary.
- Confirm the source belongs to the government body shown in the result's jurisdiction field.
You should find language on the government page that supports the information summarized in the brief. The government body should align with the listed jurisdiction.
Source does not match the brief?
- Check that the browser opened the government source URL from the brief.
- Search for a distinctive phrase from the brief if the cited law is difficult to find.
- Revise an unsupported summary so it reflects the government page before continuing.
Help me trace a mismatch between my brief and the government source.
Cross-check the second source
Checking another result tests the same evidence trail against a different source. This helps you catch a link or summary that looked convincing in the result list but does not hold up on the page.
- Return to local_law_brief.md.
- Locate a second result with a different government source link.
- Open the second government source link in a new browser tab.
- Search the page for the cited law shown in the brief.
- Read the passage around the matching reference.
- Compare the passage with the brief's summary.
- Compare the page title with the result title in the brief.
- Confirm the page's government body aligns with the listed jurisdiction.
The second page should also contain language that supports its summary in the brief. Its title and jurisdiction should align with the details you recorded.
Second source tells a different story?
A result may point to historical material or bill text. Check what type of document you opened before treating its wording as a statement of the current rule.
- Check the page heading for the document type.
- Check the page for any status information.
- Keep only the wording that the linked government page supports.
Help me assess why this second source differs from my brief.
Label and verify the brief
Your source checks show where the legal information came from. A disclaimer makes the brief's purpose clear to anyone who reads it.
- Return to local_law_brief.md in your text editor.
- Add a final sentence stating that the brief is research, not legal advice.
- Save local_law_brief.md.
- Review the final line in the saved file.
You should see the research disclaimer at the end of the brief.
Before the final check, do you expect every legal statement you reviewed to lead back to matching language on a government page?
- Return to the first government source tab.
- Confirm its checked information matches the brief.
- Switch to the second government source tab.
- Confirm its checked information matches the brief.
- Return to local_law_brief.md.
- Confirm the final sentence identifies the brief as research, not legal advice.
You should see matching support on both government pages. You should also see the research disclaimer at the end of the brief.
That completes the evidence chain. Your brief now shows where each checked result came from and clearly states its research purpose.
Secret mission
Red-Team Your Legal Citations
Pressure-test a key result in local_law_brief.md by matching it to the exact passage on its government source page. Confirm the source's jurisdiction. Finally, inspect the page for clues about its current status.
Clean Up Your Resources
The Firecrawl Government and Legal Index search used no credits, so this project has no ongoing service costs. Choose whether to keep the two local files, pause your work, or delete the files.
Resources you used:
- A local Python script named local_law_brief.py.
- A Markdown research brief named local_law_brief.md.
Keep everything running
No action is required. Choose this option if you want to reuse the script or revisit your checked research brief.
- Leave local_law_brief.py in its current folder.
- Leave local_law_brief.md in its current folder.
Pause - I'll come back to this later
No background service needs to be stopped. Closing your tools pauses the work while preserving both files.
- Close the terminal after the script finishes.
- Close the government source tabs in your browser.
- Keep local_law_brief.py in its current folder.
- Keep local_law_brief.md in its current folder.
Delete - I don't want to use this again
Remove both local files to start fresh. Moving them to Trash or Recycle Bin first gives you a recovery window.
Permanent deletion deserves one careful check. Empty Trash or Recycle Bin only after confirming that it contains no unrelated files you want to recover.
macOS
- Press Cmd+Space to open the search bar.
- Type Finder in the search bar.
- Press Enter to open Finder.
- Navigate to the folder containing local_law_brief.py and local_law_brief.md.
- Select both project files.
- Press Cmd+Delete to move the selected files to Trash.
- Confirm that neither filename remains in the folder.
Your project folder is now clear. The final actions permanently remove the files from your Mac.
- Review Trash for unrelated files you want to recover.
- Choose Empty Trash.
- Confirm that neither project filename appears in Trash.
You have closed out the local project cleanly. The script and brief are now removed from your Mac.
Windows
- Press the Windows key to open the search bar.
- Type File Explorer in the search bar.
- Press Enter to open File Explorer.
- Navigate to the folder containing local_law_brief.py and local_law_brief.md.
- Select both project files.
- Press Delete to move the selected files to Recycle Bin.
- Confirm that neither filename remains in the folder.
Your project folder is now clear. The final actions permanently remove the files from your PC.
- Review Recycle Bin for unrelated files you want to recover.
- Choose Empty Recycle Bin.
- Confirm that neither project filename appears in Recycle Bin.
You have closed out the local project cleanly. The script and brief are now removed from your PC.
Nice Work!
Nice Work!
You did it! You turned a California rent increase question into a cited research brief using the Firecrawl Government and Legal Index. You checked two linked government pages against the brief, so every result can be traced back to an official source.
You've learned how to:
- Compare a plain chatbot answer with an index search to expose missing government-source links.
- Search the index with curl. Inspect the JSON response for source URLs. Apply a California jurisdiction filter plus a cited-law filter to narrow the results.
- Use local_law_brief.py to print a clean terminal table. Save a cited research brief in local_law_brief.md. Verify the brief against two linked government pages. Label the brief as research instead of legal advice.
- Secret Mission: Extend your source-checking workflow through an optional challenge.
Ready to quiz yourself?