Internal Linking API

Our powerful AI-powered internal linking system has already created over 10 million internal links, completely automatically, saving hundreds of thousands of hours of work. Now you can access that power in your own applications and integrations through our API.

Getting Started

The API can quickly and reliably generate relevant internal linking suggestions for sites of any size.

To access the API, add your site to KoalaLinks. Then you can access the full API documentation by clicking the API button.

Endpoint

POST https://koala.sh/api/internal-links/

Response Formats

The Internal Linking API can return responses in multiple formats:

  • HTML: Returns content with HTML anchor tags
  • JSON: Returns structured data with link information
  • Markdown: Returns content with Markdown-formatted links

Credits & Limits

  • Cost: each request uses 1 credit, regardless of content length, the number of links returned, or the response format.
  • Words processed: only the first ~2,500 words of content are analyzed for linking opportunities. Longer content is returned unchanged past that point, so split large pages into multiple requests to cover the whole article.
  • Links per request: up to 50 internal links are returned per call.

Example Request

curl -X POST "https://koala.sh/api/internal-links/" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -d '{
           "content": "Beyond potassium, orange juice is rich in vitamin C and other nutrients that can boost overall health.",
           "format": "html",
           "domainId": "YOUR_DOMAIN_ID"
         }'

Example Response

Beyond potassium, <a href="https://foodfaq.org/oranges-potassium/">orange juice</a> is rich in <a href="https://foodfaq.org/vitamin-c-booster-juice-recipe/">vitamin C</a> and other nutrients that can boost overall health.

Error Handling

The API will return appropriate HTTP status codes for different error conditions:

  • 400 Bad Request: Invalid parameters or request format
  • 401 Unauthorized: Invalid or missing API key
  • 402 Payment Required: Insufficient credits
  • 403 Forbidden: Professional plan required
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: Server-side error

Getting Your Domain ID

To find your Domain ID:

  1. Go to KoalaLinks
  2. Select your domain
  3. Click the "API" button
  4. Your Domain ID will be displayed in the API documentation

Need More Help?

For detailed documentation specific to your domain, including custom options and examples, please visit the API section in KoalaLinks after adding your domain. If you need additional assistance, please contact us.