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/businesses

Parameters

ParameterTypeDescription
searchstringFilter by business name, description, or category
categorystringFilter by business category
citystringFilter by city location
verifiedbooleanShow only verified businesses
featuredbooleanShow only featured businesses
limitintegerNumber of results (default: 50, max: 100)
offsetintegerPagination offset (default: 0)
formatstringResponse format: json (default) or csv

Example Requests

GET /api/businesses?category=Dining&verified=true
GET /api/businesses?search=pizza&limit=10
GET /api/businesses?featured=true&format=csv

Events

GET /api/events

Parameters

ParameterTypeDescription
searchstringFilter by event name, description, or organizer
categorystringFilter by event category
upcomingbooleanShow only upcoming events
startDatestringFilter events after date (YYYY-MM-DD)
endDatestringFilter events before date (YYYY-MM-DD)
formatstringResponse format: json, csv, or ical

Example Requests

GET /api/events?upcoming=true&category=Music
GET /api/events?startDate=2024-01-01&endDate=2024-12-31
GET /api/events?format=ical

News

GET /api/news

Parameters

ParameterTypeDescription
searchstringFilter by article title or content
categorystringFilter by news category
recentbooleanShow only articles from last 30 days
formatstringResponse format: json, csv, or rss

Example Requests

GET /api/news?recent=true&featured=true
GET /api/news?category=Business
GET /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:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200
X-Response-Time: 45.2
X-API-Monitor: active

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.