Consulta CAR
A CAR code becomes a polygon on the map.

Looking up a rural property in CAR (Brazil’s Rural Environmental Registry) meant downloading the SICAR shapefile and importing it into QGIS by hand. I built a Python (FastAPI) API that imports the official data and returns the property with its polygon from the CAR code, plus a QGIS plugin that queries the API and draws the result on the map, colored by status.
How the pieces talk
Plugin PyQGIS
A field for the CAR code right inside QGIS.
API FastAPI
Validates the code, queries the imported official SICAR data and normalizes the geometry.
Map layer
Polygon colored by status, ready for buffers, area or export.
The problem
Anyone doing rural planning or environmental licensing in QGIS looks up properties by their Rural Environmental Registry (CAR) code all the time. And every lookup was the same ritual: open the government portal, download the zipped file, extract it and import it into QGIS. A lot of steps just to see one polygon.
What I built
I split the tool into two parts:
- Python API with FastAPI: imports the official SICAR data, takes a CAR code, validates its format and returns the property’s geometry and attributes.
- PyQGIS plugin: a panel inside QGIS itself. You paste the CAR code and the property shows up as a layer on the map, colored by status.
Technical decisions
- The lookup lives in an API, not in the plugin. If a rule changes, I update the server and nobody has to reinstall anything. The same API can serve a web or mobile app later.
- The layer comes out in the project’s coordinate system. No manual reprojection, so you can go straight to buffers and area calculations.