Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ninja Crawl

Ninja Crawl is the scraping engine for the Street Ninja ecosystem. It receives raw HTML or PDF data and returns clean, normalized JSON — powering the backend database behind the Streetlight API.

This project is fully open source to document the scraping work behind Street Ninja, and to inspire similar civic tech efforts in other cities.

🧠 What It Does

Ninja Crawl is a standalone FastAPI service that transforms raw HTML and PDF content into structured resource data (e.g. shelters, food programs, hygiene facilities). It is not a general-purpose web scraper — it's purpose-built to feed accurate data into the Streetlight API.

Ninja Crawl does not:

  • Fetch or crawl URLs itself
  • Connect to a database
  • Schedule or retry jobs
  • Validate data
  • Serve a public API

Those responsibilities are handled by the Streetlight API. Ninja Crawl focuses on pure parsing.

🧱 Tech Stack

  • Python 3.11
  • FastAPI — for exposing a simple /scrape endpoint
  • Pydantic — for modeling and schema validation
  • pdfplumber — for parsing tabular and structured PDF layouts
  • BeautifulSoup (lxml) — for HTML extraction

About

FastAPI-powered scraping engine that transforms raw HTML and PDF into structured JSON. Built to gather data for the Streetlight-API, and the Street Ninja ecosystem..

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages