Skip to content

velkomi/nspd-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NSPD API

CI Docker API Coverage

Open-source Python service for parsing and working with NSPD (National Spatial Data Platform) data.

Overview

nspd-api provides a lightweight API and service layer for retrieving, parsing, and structuring cadastral and geospatial data from NSPD sources.

The goal of the project is to simplify access to cadastral information for developers, GIS specialists, and automation workflows in the real estate and land surveying domain.

Features

  • NSPD data parsing and normalization
  • Simple API interface for integration into services
  • Dockerized deployment
  • Lightweight Python implementation
  • Ready for automation pipelines (ETL / GIS workflows)

Use Cases

  • Automated cadastral data retrieval
  • GIS data processing pipelines
  • Integration into CRM / backend systems
  • Land surveying automation tools
  • Data enrichment for real estate platforms

Tech Stack

  • Python 3.x
  • Docker
  • FastAPI
  • Requests (HTTP client)
  • Pydantic (data validation)
  • Uvicorn (ASGI server)
  • Lightweight service architecture

Architecture

The service follows a simple layered architecture:

  • API Layer (FastAPI)
  • Service Layer (NSPD parsing logic)
  • External Data Source (nspd.gov.ru)

Flow:

Client → API Layer (FastAPI) → Service Layer → NSPD External API → Parser → JSON Response

API Endpoints

Method Endpoint Description
GET /health Service health check
GET /parse/{cadastral_number} Get cadastral data (alias)
POST /search Search by cadastral number

Example Usage

Once the service is running locally, you can test the API:

Health check

curl http://localhost:8000/health

Get cadastral data (GET)

curl http://localhost:8000/parse/77:01:0004012:123

Get cadastral data (POST)

curl -X POST http://localhost:8000/search \
  -H "Content-Type: application/json" \
  -d '{"cadastral_number": "77:01:0004012:123"}'

Example Response

{
  "cadastral_number": "77:01:0004012:123",
  "status": "success",
  "data": {
    "cad_num": "77:01:0004012:123",
    "address": "Moscow, Russia (example)",
    "area": 1200.5,
    "status": "active",
    "ownership_type": "private"
  }
}

Installation

git clone https://github.com/velkomi/nspd-api.git
cd nspd-api
pip install -r requirements.txt

Run locally

uvicorn main:app --reload

Docker

Service will be available at:

http://localhost:8000/docs

Run the service using Docker:

docker build -t nspd-api .
docker run -p 8000:8000 nspd-api

Environment Variables

Variable Description
PROXY_URL Optional proxy for NSPD requests

Why this project matters

NSPD data is difficult to access programmatically due to lack of official public API.

This project simplifies:

  • cadastral data retrieval
  • geospatial automation
  • integration into GIS/CRM systems

It is designed for developers building real-world land and property automation systems.

API Documentation

Swagger UI is available at:

http://localhost:8000/docs

Project Status

This project is actively maintained and used for geospatial data automation workflows.

Limitations

  • NSPD API is external and may change without notice
  • Rate limiting may apply from source provider
  • This project does not store cadastral data permanently

Maintainer

Actively maintained by a single core contributor.

Production readiness

This service is used in automation workflows and designed for production geospatial pipelines.