Skip to content

SOP-004: API Integration

Document Control

FieldValue
SOP IDSOP-004
Version1.0
StatusActive
Last UpdatedDecember 2024

Purpose

This procedure guides you through integrating Omega Indexer's REST API for automated link submissions.

Prerequisites

  • Active Omega Indexer account with credits
  • API key (from dashboard)
  • Programming knowledge or automation tool

API Overview

┌─────────────────────────────────────────────────────────────────────┐
│                    API INTEGRATION FLOW                             │
├─────────────────────────────────────────────────────────────────────┤
│                                                                      │
│   Your Application                                                   │
│        │                                                            │
│        ├──► Collect URLs to index                                   │
│        │                                                            │
│        ├──► Format API request                                      │
│        │    • apikey                                                │
│        │    • campaignname                                          │
│        │    • urls (pipe-separated)                                 │
│        │    • dripfeed (optional)                                   │
│        │                                                            │
│        ▼                                                            │
│   POST to Omega Indexer API                                          │
│        │                                                            │
│        ▼                                                            │
│   Receive Response ────► Campaign created ✓                         │
│                                                                      │
└─────────────────────────────────────────────────────────────────────┘

Procedure

Step 1: Get Your API Key

  1. Log in to Omega Indexer dashboard
  2. Navigate to Account Settings or API section
  3. Locate your API key
  4. Copy the key securely

Security Warning

Keep your API key secret. Never expose it in:

  • Public repositories
  • Client-side code
  • Shared documents

Step 2: Understand the API Endpoint

Endpoint:

POST https://www.omegaindexer.com/amember/dashboard/api

Content-Type:

application/x-www-form-urlencoded

Step 3: API Parameters

ParameterRequiredDescription
apikeyYesYour API key from dashboard
campaignnameYesName for the campaign
urlsYesURLs separated by pipe (|) character
dripfeedNoNumber of days to distribute submissions

Step 4: Format Your URLs

URLs must be separated by the pipe character |:

https://example.com/page1|https://example.com/page2|https://example.com/page3

URL Formatting

If you have URLs in a list (one per line), replace newlines with |:

javascript
const urls = urlList.split('\n').join('|');

Step 5: Make the API Request

cURL Example:

bash
curl -X POST https://www.omegaindexer.com/amember/dashboard/api \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "apikey=YOUR_API_KEY" \
  -d "campaignname=API Campaign Dec 2024" \
  -d "urls=https://example.com/page1|https://example.com/page2" \
  -d "dripfeed=5"

JavaScript/Node.js Example:

javascript
const submitToOmegaIndexer = async (urls, campaignName) => {
  const apiKey = process.env.OMEGA_INDEXER_API_KEY;
  const urlString = urls.join('|');

  const params = new URLSearchParams({
    apikey: apiKey,
    campaignname: campaignName,
    urls: urlString,
    dripfeed: '7'
  });

  const response = await fetch(
    'https://www.omegaindexer.com/amember/dashboard/api',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      body: params.toString()
    }
  );

  return await response.text();
};

Python Example:

python
import requests

def submit_to_omega_indexer(urls, campaign_name, drip_days=None):
    api_key = "YOUR_API_KEY"
    url_string = "|".join(urls)

    data = {
        "apikey": api_key,
        "campaignname": campaign_name,
        "urls": url_string
    }

    if drip_days:
        data["dripfeed"] = str(drip_days)

    response = requests.post(
        "https://www.omegaindexer.com/amember/dashboard/api",
        data=data
    )

    return response.text

# Usage
urls = [
    "https://example.com/page1",
    "https://example.com/page2",
    "https://example.com/page3"
]

result = submit_to_omega_indexer(urls, "My API Campaign", drip_days=5)
print(result)

PHP Example:

php
<?php
function submitToOmegaIndexer($urls, $campaignName, $dripDays = null) {
    $apiKey = "YOUR_API_KEY";
    $urlString = implode("|", $urls);

    $data = [
        "apikey" => $apiKey,
        "campaignname" => $campaignName,
        "urls" => $urlString
    ];

    if ($dripDays) {
        $data["dripfeed"] = $dripDays;
    }

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://www.omegaindexer.com/amember/dashboard/api");
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    $response = curl_exec($ch);
    curl_close($ch);

    return $response;
}

// Usage
$urls = [
    "https://example.com/page1",
    "https://example.com/page2"
];

$result = submitToOmegaIndexer($urls, "PHP Campaign", 7);
echo $result;
?>

API Response

The API will return a response indicating success or failure. Check the response for:

  • Campaign creation confirmation
  • Error messages if any

Verification Checklist

  • [ ] API key obtained from dashboard
  • [ ] API key stored securely (environment variable)
  • [ ] URLs properly formatted with pipe separator
  • [ ] Test request sent successfully
  • [ ] Campaign appears in dashboard
  • [ ] Response handled appropriately

Integration Examples

WordPress Hook

php
// Automatically submit new posts to Omega Indexer
add_action('publish_post', function($post_id) {
    $url = get_permalink($post_id);
    submitToOmegaIndexer([$url], "WordPress Auto-Submit");
});

Cron Job / Scheduled Task

bash
# Daily submission of sitemap URLs
0 9 * * * /usr/bin/php /path/to/submit_sitemap.php

SEO Tool Integration

Many SEO tools support custom API endpoints. Configure:

  • Endpoint URL
  • API key parameter
  • URL format (pipe-separated)

Troubleshooting

IssueSolution
"Invalid API key"Verify key is correct, check for extra spaces
"No URLs provided"Check URL format, ensure pipe separator
"Insufficient credits"Add more credits to your account
Empty responseCheck Content-Type header, verify endpoint URL
404 errorVerify the API endpoint URL is correct

Rate Limiting

While not explicitly documented, follow these best practices:

  • Don't exceed 100 requests per minute
  • Batch URLs in single requests when possible
  • Implement retry logic with exponential backoff

See Also

Omega Indexer V2 Documentation