AppFolio Properties API
Upwork Gig
by Your Name · github.com/nemanjatan/appfolio-property-listings-scraper
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/nemanjatan/appfolio-property-listings-scraper/archive/refs/heads/main.zipAppFolio Property API Service
This is a Python backend service that scrapes AppFolio property listings and serves them via a REST API for WordPress consumption.
📁 Files
appfolio_scraper.py- Main scraper using Playwrightscheduler.py- Automated scheduling system that runs scraper + API serverapi_server.py- Flask REST API server for serving property datawordpress_json_export.py- Converts data to WordPress formatwordpress-plugin-api.php- WordPress plugin to consume the APItest_scraper.py- Testing utilityrequirements.txt- Python dependencies
🚀 Setup
# Install dependencies
pip install -r requirements.txt
# Install Playwright browsers
playwright install
# Test the scraper
python test_scraper.py
# Run the scraper
python appfolio_scraper.py
# Run with scheduler
python scheduler.py
🔧 Configuration
Set environment variables (optional):
SCRAPE_INTERVAL_HOURS- Update frequency (default: 4)MAX_PROPERTIES- Maximum properties to scrape (default: 100)PORT- API server port (default: 8000)
📊 Output
The scraper creates two JSON files:
appfolio_properties.json- Raw scraped datawordpress_properties.json- WordPress-compatible format
🌐 API Endpoints
Once running, the service exposes these endpoints:
GET /api/properties- Get all properties (supports filters:min_price,max_price,bedrooms,bathrooms,search)GET /api/properties/<id>- Get a single property by IDGET /api/health- Health check endpoint
Example API calls:
- All properties:
https://your-api.up.railway.app/api/properties - Filtered:
https://your-api.up.railway.app/api/properties?min_price=1000&max_price=2000&bedrooms=2 - Search:
https://your-api.up.railway.app/api/properties?search=athens
🌐 Railway Deployment
This service is designed to run on Railway.app:
- Deploy from GitHub
- Important: Railway will automatically detect the Dockerfile and use it
- DO NOT set a Custom Build Command (leave it empty/default)
- Set Custom Start Command to:
python scheduler.py(or leave empty to use Dockerfile CMD) - Deploy!
See /RAILWAY_DEPLOYMENT.md for detailed instructions.
🔌 WordPress Integration
- Install the WordPress plugin (
wordpress-plugin-api.php) in your WordPress site - Go to Settings → AppFolio API in WordPress admin
- Enter your Railway API URL (e.g.,
https://your-app.up.railway.app) - Add the shortcode
[appfolio_properties]to any page or post - Optionally add filters:
[appfolio_properties bedrooms="2" min_price="1000"]