title:PropertySearchAPIDocumentationdescription:>- Advanced property search with support for Urdu, Roman Urdu, and English natural language queriesversion:1.0.0last_updated:2026-05-21T00:00:00.000Zauthor:BackendTeammaintainer:BackendTeamlicense:mitlanguage:-en-urtags:-property-search-real-estate-voice-search-urdu-asr-django-apicategory:APIDocumentation
π Property Search API - Complete Documentation
π― Overview
The Property Search API provides advanced search functionality for properties with support for natural language queries, voice search integration, and intelligent filtering. The system includes text normalization for Roman Urdu and Urdu languages.
π Quick Start
Base URL
GET /api/property/search_properties/
Simple Example
# Search for properties in Lahore
curl "http://localhost:8000/api/property/search_properties/?q=lahore"# Voice search example
curl "http://localhost:8000/api/property/search_properties/?q=3%20bedroom%20house%20in%20lahore"
# Natural language
GET /search_properties/?q=under 50000
GET /search_properties/?q=above 100000
GET /search_properties/?q=between 50000 and 100000
# Explicit parameters
GET /search_properties/?min_price=50000&max_price=100000
3. Bed/Bath Filters
# Minimum 3 bedrooms
GET /search_properties/?q=3 bedrooms
# Exactly 5 bedrooms
GET /search_properties/?q=5 bedrooms&bed_match_type=exact
# Combined filters
GET /search_properties/?q=3 bedroom house&min_price=50000
4. Location Filters
# By city
GET /search_properties/?city=Lahore
# By society
GET /search_properties/?society=Defence
# Combined
GET /search_properties/?city=Lahore&society=Faisal%20Town
5. Combined Search Examples
# Complete example
GET /search_properties/?q=3 bedroom house in lahore&min_price=50000&max_price=100000
# Roman Urdu + price
GET /search_properties/?q=teen bedroom ka ghar&min_price=50000
# Location + bedrooms
GET /search_properties/?city=Lahore&society=DHA&q=5 bedrooms
π€ Response Format
Success Response
{"count":4,"limit":20,"search_criteria":["searching for: 3 bedroom house in lahore","keywords: bedroom, house, lahore","beds: 3+"],"results":[{"id":1,"title":"Modern House","price":75000,"address":"Faisal Town","city":"Lahore","beds":3,"baths":2,"area":5,"area_unit":"Marla","status":"Approved"}],"summary":{"total_found":4,"showing":4,"from":1,"to":4}}
No Results Response
{"count":0,"limit":20,"search_criteria":["searching for: unknown place"],"results":[],"suggestion":"No properties found. Try: using fewer words, checking spelling, adjusting price range, or removing filters."}
Error Response
{"error":"An unexpected error occurred while searching properties.","detail":"Error details in debug mode"}
# English"3 bedroom house in lahore""properties under 50000""plot for sale in defence"# Roman Urdu"teen bedroom ka ghar lahore mein""under 50 hazar ke properties""defence mein plot"# Mixed"3 bedroom ka ghar lahore mein""property 50 lakh se kam"
# Good
?q=3 bedroom house in lahore defence
# Less specific
?q=house
Combine filters
# Good
?q=house&city=Lahore&min_price=50000
# Can be improved
?q=house in lahore under 50000
Use voice search for natural language
The API is optimized for speech-to-text input
Normalization handles common voice recognition errors
π Troubleshooting
Common Issues
Issue
Solution
No results found
Remove filters, check spelling, try simpler query
Roman Urdu not recognized
Use standard Roman Urdu spellings
Price filters not working
Ensure numbers without commas
Slow response
Reduce result limit, simplify query
Debug Mode
# Enable debug for detailed errors
GET /search_properties/?q=test&debug=true
π Support
API Version: 1.0
Last Updated: 2026-05-21
Maintainer: Backend Team
Documentation: [Link to full docs]
β Quick Reference Card
# Most common searches
/search_properties/?q=lahore
/search_properties/?q=3 bedroom house
/search_properties/?q=under 50000
/search_properties/?q=plot in defence
/search_properties/?q=teen bedroom ka ghar
# With filters
/search_properties/?city=Lahore&society=DHA
/search_properties/?min_price=50000&max_price=100000
/search_properties/?q=3 beds&bed_match_type=min
# Pagination
/search_properties/?q=house&limit=20&offset=0
This API is production-ready and supports Urdu, Roman Urdu, and English search queries with voice search optimization. π