EndpointMethodDescription
/api/v1/projectsPOSTSubmit a new project for indexing. Requires authentication.
/api/v1/projects/{project_id}GETGet the status of a specific project. Requires authentication.
/api/v1/projects/{project_id}/reportGETDownload the report for a specific project. Requires authentication.
/api/v1/credits/balanceGETGet the current credit balance for the authenticated user.

Authentication

All API endpoints require authentication using an API key. The API key should be included in the X-API-Key header of each request.

Project Names and URLs

Project names will be sanitized to remove any special characters or HTML tags. If no project name is provided, a fallback name will be generated using the format
“noname_” followed by an MD5 hash of the submitted URLs. URLs will be validated and must start with either “http://” or “https://”. Invalid URLs will be discarded.

Error Responses

If an error occurs, the API will return an appropriate HTTP status code along with an error message in the response body. Possible error codes include:

  • 400 Bad Request – The request was malformed or missing required parameters.
  • 401 Unauthorized – The API key is missing or invalid.
  • 403 Forbidden – The API key is valid but does not have permission to access the requested resource.
  • 404 Not Found – The requested resource (e.g., project) does not exist.
  • 429 Too Many Requests – The rate limit for API requests has been exceeded.
  • 500 Internal Server Error – An unexpected error occurred on the server.

RESTful API Endpoints

Submit a New Project

Endpoint: POST https://rapidurlindexer.com/wp-json/api/v1/projects

Request Body:

{
    "project_name": "My Project",
    "urls": ["http://example.com", "http://example.org"],
    "notify_on_status_change": true
}

Arguments:

  • project_name (string, required): The name of your project.
  • urls (array of strings, required): An array of URLs to be indexed. Each URL must start with “http://” or “https://”.
  • notify_on_status_change (boolean, optional, default: false): If set to true, you will receive email notifications when the project status changes.

Successful Response (201 Created):

{
    "message": "Project created successfully",
    "project_id": 123
}

Error Responses:

400 Bad Request
{
    "message": "Invalid project name or URLs"
}

401 Unauthorized
{
    "message": "Invalid API key"
}

403 Forbidden
{
    "message": "Insufficient credits"
}

Get Project Status

Endpoint: GET https://rapidurlindexer.com/wp-json/api/v1/projects/{project_id}

Arguments:

  • project_id (integer, required): The ID of the project you want to check.

Successful Response (200 OK):

{
    "project_id": 123,
    "project_name": "My Project",
    "status": "submitted",
    "submitted_links": 2,
    "processed_links": 1,
    "indexed_links": 1,
    "created_at": "2023-06-01T12:00:00Z",
    "updated_at": "2023-06-01T12:05:00Z"
}

Possible Status Values:

  • pending: The project has been created but not yet submitted for indexing.
  • submitted: The project has been submitted and indexing is in progress.
  • completed: The indexing process has been completed.
  • failed: The indexing process failed. Credits have been refunded.
  • refunded: Some URLs were not indexed within 14 days, and credits have been automatically refunded.

Error Response (404 Not Found):

{
    "message": "Project not found"
}

Download Project Report

Endpoint: GET https://rapidurlindexer.com/wp-json/api/v1/projects/{project_id}/report

Arguments:

  • project_id (integer, required): The ID of the project for which you want to download the report.

Successful Response (200 OK):

Returns a CSV file with the following format:

URL,Status
http://example.com,Indexed
http://example.org,Not Indexed

Error Response (404 Not Found):

{
    "message": "Project report not available"
}

Get Credit Balance

Endpoint: GET https://rapidurlindexer.com/wp-json/api/v1/credits/balance

Successful Response (200 OK):

{
    "credits": 100
}

Error Response (401 Unauthorized):

{
    "message": "Invalid API key"
}

Rate Limiting

API requests are limited to 100 requests per minute per API key. If you exceed this limit, you’ll receive a 429 Too Many Requests response.