=== XC SEO Rank Provider — SerpAPI ===
Contributors: xaniacode
Tags: seo, rank-tracker, serpapi, google, bing
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Requires Plugins: xc-seo-engine
Compatible With: XC SEO Engine 1.0.0+
Gutenberg Optimized: No
Compatible Browsers: Firefox, Safari, Opera, Chrome, Edge
High Resolution: Yes

Free addon for XC SEO Engine. Feeds real Google SERP positions into the rank tracker via the SerpAPI service.

== Description ==

This is a free addon bundled with the XC SEO Engine product. It demonstrates the `xcseo_rank_provider` filter pattern by integrating the SerpAPI service so the XC SEO Engine rank tracker can read real Google SERP positions.

The same pattern can be applied to DataForSEO, ScrapingBee, ValueSERP, or any other SERP API. Use this addon as-is, or as a reference for writing your own provider.

= How it works =

1. Install and activate this addon (XC SEO Engine must already be installed and active)
2. Provide your SerpAPI key — either through the admin UI under XC SEO → SerpAPI, or by defining `XCSEO_SERPAPI_KEY` in `wp-config.php` (recommended for production)
3. Add tracked keywords under XC SEO → Ranks
4. The daily rank-tracker cron will call SerpAPI for each keyword and record the position in the XC SEO history

= Features =

* OAuth-free integration — single API key, defined in wp-config.php or admin
* Engine selection — Google, Google News, Bing
* Location targeting — 11 preset countries
* Language (`hl`) and country (`gl`) parameters
* SERP depth configurable (10–100 results)
* Test form in admin to verify credentials with a one-off query
* Implements `xcseo_rank_provider` filter at priority 10 — pluggable so other addons can take precedence

= Pricing =

This addon is free and bundled with XC SEO Engine. SerpAPI itself is a paid service — see [serpapi.com](https://serpapi.com) for pricing.

== Installation ==

1. Make sure XC SEO Engine is installed and active
2. Upload `xc-seo-rank-serpapi` folder to `/wp-content/plugins/`
3. Activate "XC SEO — SerpAPI Rank Provider" in WP Admin → Plugins
4. Go to XC SEO → SerpAPI to configure

== Frequently Asked Questions ==

= Does this addon require XC SEO Engine? =

Yes. It's a rank provider for the XC SEO Engine rank tracker. Without the core plugin, the addon registers a settings page but the `xcseo_rank_provider` filter is never called.

= Where do I get a SerpAPI key? =

Sign up at [serpapi.com](https://serpapi.com). The free tier allows 100 searches per month — enough to track about 3 keywords daily.

= Can I use this with another SERP API instead? =

This addon is hardcoded to SerpAPI. For DataForSEO / ScrapingBee / ValueSERP, copy this file to a new plugin and adapt the API endpoint and response parsing. The `xcseo_rank_provider` filter pattern is the same.

= Is the API key encrypted? =

The key is stored in a standard WordPress option. For production sites, define `XCSEO_SERPAPI_KEY` in `wp-config.php` instead — that location is generally outside webroot and not exposed via the WordPress REST API.

== Changelog ==

See CHANGELOG.md for the full version history.
