How mebishp/blinkit-api works
This is an unofficial, location-aware REST API that turns Blinkit’s web data into product, category, and serviceability responses. The main workflow resolves a caller’s location, checks serviceability, fetches and parses upstream listings, applies local filtering/sorting and pagination, then returns shaped responses; product detail, category discovery, and address lookup are additional domain branches. Edges follow explicit route, catalog, client, and parser references or README statements. Some route and catalog implementations were not excerpted, so unverified calls are omitted.
Main entry points: catalog.py Catalog orchestration · main.py FastAPI app · client.py HTTP client · products.py Product routes
Components 20
API boundary
- FastAPI app
app/main.py - Product routes
app/api/routes/products.py - Category routes
app/api/routes/categories.py - Location routes
app/api/routes/location.py - Health route
app/api/routes/health.py - Request dependencies
app/api/deps.py - Listing responses
app/api/responses.py
Catalog workflows
- Catalog orchestration
app/services/catalog.py - TTL cache
app/services/cache.py - Listing filters
app/services/query.py - Product detail
app/services/catalog.py - Category discovery
app/blinkit/categories.py - Location lookup
app/services/catalog.py
Blinkit integration
- HTTP client
app/blinkit/client.py - Endpoint definitions
app/blinkit/endpoints.py - Layout parser
app/blinkit/parser.py
Domain and query
- API data models
app/schemas.py - Runtime settings
app/config.py
Other components
- API caller
- Blinkit services
Connections 33
- API caller → FastAPI app: sends requests
README.md - FastAPI app → Product routes: registers
app/main.py - FastAPI app → Category routes: registers
app/main.py - FastAPI app → Location routes: registers
app/main.py - FastAPI app → Health route: registers
app/main.py - FastAPI app → Catalog orchestration: initializes
app/main.py - FastAPI app → HTTP client: creates
app/main.py - Product routes → Request dependencies: uses
app/api/routes/products.py - Category routes → Request dependencies: uses
app/api/routes/categories.py - Product routes → Catalog orchestration: requests search and detail
app/api/routes/products.py - Category routes → Catalog orchestration: requests categories and browse
app/api/routes/categories.py - Product routes → Listing responses: formats listings
app/api/routes/products.py - Category routes → Listing responses: formats listings
app/api/routes/categories.py - Request dependencies → Catalog orchestration: resolves location via
app/api/deps.py - Request dependencies → Listing filters: builds query
app/api/deps.py - Listing responses → API data models: constructs responses
app/api/responses.py - Catalog orchestration → TTL cache: caches results
app/services/catalog.py - Catalog orchestration → Listing filters: filters listings
app/services/catalog.py - Catalog orchestration → HTTP client: fetches data
app/services/catalog.py - Catalog orchestration → Layout parser: parses upstream data
app/services/catalog.py - Catalog orchestration → Category discovery: builds category tree
app/services/catalog.py - Catalog orchestration → Endpoint definitions: selects paths
app/services/catalog.py - HTTP client → Endpoint definitions: uses headers
app/blinkit/client.py - HTTP client → Blinkit services: requests
README.md - Layout parser → API data models: creates product models
app/blinkit/parser.py - Category discovery → API data models: creates categories
app/blinkit/categories.py - Catalog orchestration → API data models: returns domain data
app/services/catalog.py - FastAPI app → Runtime settings: loads configuration
app/main.py - HTTP client → Runtime settings: configures requests
app/blinkit/client.py - Location routes → Catalog orchestration: serves location operations
- Health route → Catalog orchestration: reports health state
- Catalog orchestration → Location lookup: resolves serviceability and addresses
app/services/catalog.py - Location lookup → HTTP client: queries location endpoints
app/services/catalog.py