DEV Community

miccho27
miccho27

Posted on

Automate WordPress Internal Linking for SEO — Free API for Developers

Internal linking is one of the most underrated SEO tactics. Every SEO audit tool tells you "add more internal links," but none of them tell you which links to add or where.

I built a free API that analyzes your WordPress content and returns specific internal link suggestions — exact anchor text, source URL, target URL, and relevance score.

The Problem

You have 50+ blog posts. Each new article should link to 3-5 existing posts. Manually reading through your entire archive to find relevant links? That doesn't scale.

Plugins like Link Whisper ($77/year) solve this, but what if you want:

  • Programmatic control — integrate with your CI/CD or content pipeline
  • Bulk analysis — analyze hundreds of posts via script
  • Custom logic — filter by category, minimum relevance score, etc.

How It Works

Send your article content + a list of existing posts. The API returns ranked link suggestions.

Python — Analyze a New Post

import requests

url = "https://wp-internal-link-api.p.rapidapi.com/analyze"
headers = {
    "X-RapidAPI-Key": "YOUR_KEY",
    "X-RapidAPI-Host": "wp-internal-link-api.p.rapidapi.com",
    "Content-Type": "application/json"
}

payload = {
    "content": "<p>Moving to Paraguay offers low taxes and affordable living...</p>",
    "site_url": "https://yourblog.com",
    "existing_posts": [
        {"url": "/cost-of-living-paraguay", "title": "Cost of Living in Paraguay 2026", "keywords": ["cost", "living", "paraguay"]},
        {"url": "/paraguay-visa-guide", "title": "Paraguay Visa Guide", "keywords": ["visa", "residency", "paraguay"]},
        {"url": "/best-cities-paraguay", "title": "Best Cities to Live in Paraguay", "keywords": ["cities", "asuncion", "paraguay"]}
    ]
}

response = requests.post(url, json=payload, headers=headers)
suggestions = response.json()["suggestions"]

for s in suggestions:
    print(f"Link '{s['anchor_text']}'{s['target_url']} (score: {s['relevance_score']})")
Enter fullscreen mode Exit fullscreen mode

Output

{
  "suggestions": [
    {
      "anchor_text": "affordable living",
      "target_url": "/cost-of-living-paraguay",
      "relevance_score": 0.89,
      "context": "...offers low taxes and affordable living..."
    },
    {
      "anchor_text": "Paraguay",
      "target_url": "/paraguay-visa-guide",
      "relevance_score": 0.72,
      "context": "Moving to Paraguay offers..."
    }
  ],
  "total_suggestions": 2
}
Enter fullscreen mode Exit fullscreen mode

Use Cases for Developers

  1. WordPress Plugin Backend — Build a custom internal linking plugin that uses this API
  2. Content Pipeline Automation — Auto-insert internal links before publishing via WP REST API
  3. SEO Audit Script — Scan all published posts, find orphan pages with zero internal links
  4. Headless WordPress — Internal linking for Next.js/Gatsby sites using WP as CMS

How It Compares

Feature WP Internal Link API Link Whisper Yoast SEO Rank Math
API access Yes No No No
Price Free (500 req/mo) $77/year $99/year $59/year
Bulk analysis Yes (via API) Manual only No No
Custom integration Full API WP plugin only WP plugin only WP plugin only
Relevance scoring 0-100 Basic None None

Try It Now

  1. WP Internal Link API on RapidAPI
  2. Free plan: 500 requests/month
  3. POST your content → get link suggestions in <100ms

Do you automate internal linking? I'd love to hear your workflow — drop a comment.

Top comments (0)