Skip to main content

Introduction

GEO AI provides a REST API for programmatically auditing content and applying quick fixes to your WordPress posts. The API is built on top of the WordPress REST API infrastructure and follows WordPress authentication standards.

Base URL

All GEO AI API endpoints are prefixed with:
/wp-json/geoai/v1/
For example, if your WordPress site is at https://example.com, the full endpoint URL would be:
https://example.com/wp-json/geoai/v1/audit

Authentication

GEO AI REST API endpoints use WordPress’s built-in authentication system. You can authenticate requests using any of the following methods: When making requests from within WordPress (e.g., from the admin dashboard), WordPress automatically handles authentication via cookies. You must include a valid nonce in your requests:
fetch('/wp-json/geoai/v1/audit', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-WP-Nonce': wpApiSettings.nonce
  },
  body: JSON.stringify({ post_id: 123 })
});

Application Passwords

For external applications, use WordPress Application Passwords with HTTP Basic Authentication:
curl -X POST https://example.com/wp-json/geoai/v1/audit \
  -u "username:application_password" \
  -H "Content-Type: application/json" \
  -d '{"post_id": 123}'

OAuth or JWT

GEO AI supports any WordPress REST API authentication plugin you have installed, such as OAuth 1.0a or JWT Authentication.

Permissions

All GEO AI endpoints require specific WordPress capabilities:
  • Audit endpoint: Requires edit_post capability for the specified post
  • Quick Fix endpoint: Requires edit_post capability for the specified post
If the user doesn’t have the required permissions, the API returns a 403 Forbidden response.

Common Response Format

All GEO AI endpoints return JSON responses with a consistent structure:

Success Response

{
  "success": true,
  "data": {
    // Endpoint-specific data
  }
}

Error Response

{
  "success": false,
  "message": "Error description"
}

Error Codes

GEO AI uses standard HTTP status codes:
Status CodeDescription
200Success - Request completed successfully
400Bad Request - Invalid or missing parameters
403Forbidden - User lacks required permissions
404Not Found - Resource doesn’t exist
500Internal Server Error - Server-side error occurred

Common Error Messages

invalid_post
error
The specified post ID does not exist or is invalid.
rest_forbidden
error
User does not have permission to edit the specified post.
rest_invalid_param
error
One or more request parameters are invalid or missing.

Rate Limiting

GEO AI respects WordPress’s built-in rate limiting. If you’re making requests from external applications, be mindful of your server’s rate limits to avoid being blocked.

Available Endpoints

GEO AI provides the following REST API endpoints:

Audit

Run a GEO optimization audit on a post

Quick Fix

Apply automated fixes to improve GEO score

Next Steps

Audit Endpoint

Learn how to run GEO audits programmatically

Quick Fix Endpoint

Discover how to apply automated optimizations

Build docs developers (and LLMs) love