API Documentation
Read-only REST API for accessing Only In Ocala data programmatically
🔒 This API is read-only and provides access to public data only. All write operations (POST, PUT, DELETE, PATCH) are disabled for security.
Overview
The Only In Ocala API provides programmatic access to our comprehensive directory of businesses, events, and news in Ocala, Florida. All endpoints return JSON by default, with optional CSV and other format support.
Base URL: https://onlyinocala.com/api
Security & Access
🛡️ Read-Only Access
This API only supports GET requests. All other HTTP methods (POST, PUT, DELETE, PATCH) return a 405 Method Not Allowed error to ensure data integrity.
🔑 No Authentication Required
No API keys or authentication tokens required. All data returned is public information already available on the website.
⚡ Advanced Rate Limiting
100 requests per hour per IP address using sliding window algorithm to ensure fair usage and prevent abuse.
- • Real-time rate limit tracking with detailed headers
- • Automatic IP detection behind proxies
- • 429 status code with retry-after header when limit exceeded
- • Rate limit status included in all response headers
Businesses
GET /api/businessesParameters
| Parameter | Type | Description |
|---|---|---|
search | string | Filter by business name, description, or category |
category | string | Filter by business category |
city | string | Filter by city location |
verified | boolean | Show only verified businesses |
featured | boolean | Show only featured businesses |
limit | integer | Number of results (default: 50, max: 100) |
offset | integer | Pagination offset (default: 0) |
format | string | Response format: json (default) or csv |
Example Requests
GET /api/businesses?category=Dining&verified=trueGET /api/businesses?search=pizza&limit=10GET /api/businesses?featured=true&format=csvEvents
GET /api/eventsParameters
| Parameter | Type | Description |
|---|---|---|
search | string | Filter by event name, description, or organizer |
category | string | Filter by event category |
upcoming | boolean | Show only upcoming events |
startDate | string | Filter events after date (YYYY-MM-DD) |
endDate | string | Filter events before date (YYYY-MM-DD) |
format | string | Response format: json, csv, or ical |
Example Requests
GET /api/events?upcoming=true&category=MusicGET /api/events?startDate=2024-01-01&endDate=2024-12-31GET /api/events?format=icalNews
GET /api/newsParameters
| Parameter | Type | Description |
|---|---|---|
search | string | Filter by article title or content |
category | string | Filter by news category |
recent | boolean | Show only articles from last 30 days |
format | string | Response format: json, csv, or rss |
Example Requests
GET /api/news?recent=true&featured=trueGET /api/news?category=BusinessGET /api/news?format=rss🔍 API Monitoring & Analytics
📊 Real-time Monitoring
All API requests are monitored in real-time for performance and usage analytics.
- • Response time tracking and optimization
- • AI agent detection and usage patterns
- • Format preference analytics (JSON, CSV, RSS, iCal)
- • Popular endpoint and parameter tracking
🤖 AI Agent Insights
Specialized tracking for AI agents and automated tools accessing the API.
- • Automatic detection of AI agents, crawlers, and bots
- • User agent analysis and categorization
- • Usage pattern analysis for optimization
- • Popular search terms and filter combinations
📈 Response Headers
Enhanced headers provide detailed API information:
CORS & Usage Notes
- • Read-Only: Only GET and OPTIONS methods supported
- • CORS: Enabled for all origins (*)
- • Rate Limiting: 100 requests per hour per IP with sliding window algorithm
- • Caching: Responses cached for 30-60 minutes
- • Formats: JSON (default), CSV, RSS (news), iCal (events)
- • Pagination: Use limit and offset parameters
- • Status Codes: 200 (success), 400 (bad request), 405 (method not allowed), 429 (rate limited)
- • Security Headers: X-API-Type: read-only, X-Content-Type-Options: nosniff
- • Monitoring: Response time tracking and AI agent detection
- • Analytics: Usage patterns and optimization insights
Need Help?
For API support, feature requests, or to report issues, please contact us through our contact page or email us directly.