Programmatically remove internal and external links from WordPress posts and pages. Supports selective link targeting, automatic authentication, and real-time content processing.
This API requires WordPress JWT Authentication plugin to be installed and configured on your target WordPress site. Make sure you have proper authentication credentials before using this API. click here to verify your credentials.
The WordPress Link Remover API allows you to programmatically remove links from WordPress posts and pages. You can remove internal links, external links, or target specific URLs while preserving the anchor text content.
All API requests require authentication using a client ID and secret key. Additionally, you need WordPress credentials for the target site where you want to remove links.
Contact your API provider to obtain these credentials:
You also need WordPress credentials for the target site:
Make sure the JWT Authentication for WP REST API plugin is installed and configured on your WordPress site before using this API. click here to verify your credentials.
API usage is subject to rate limits to ensure fair usage and system stability. Limits are enforced per client ID.
Limit Type | Default Value | Description |
---|---|---|
Daily Requests | 100 requests | Maximum requests per day per client |
Rate Limit | 2 requests/minute | Maximum requests per minute |
Concurrent Requests | 1 request | One request at a time per client |
When you hit rate limits, you'll receive a 429 status code with information about when you can retry.
This endpoint removes links from a WordPress post or page. You can remove all internal links, all external links, or target a specific URL for removal.
Parameter | Type | Description |
---|---|---|
post_url Required | String | The full URL of the WordPress post or page to process |
client_id Required | String | Your client ID for authentication |
secret_key Required | String | Your secret key for authentication |
link_type Required | String |
Type of links to remove:
|
wordpress_id Required | String | WordPress username with edit permissions |
wordpress_pass Required | String | WordPress password for the specified user |
targetURL Optional | String | Specific URL to target for removal. When provided, only links matching this URL will be removed, regardless of link_type |
A successful response will return a 200 status code and a JSON object with the following properties:
{
"status": "success",
"website_url": "https://example.com",
"post_id": 123,
"link_type": "external",
"target_url": "https://specific-url.com", // Only present if targetURL was provided
"total_links_removed": 5,
"total_links_with_anchor_removed": 2,
"total_links_only_removed": 3
}
Field | Description |
---|---|
status |
Response status (success/failed) |
website_url |
The base URL of the WordPress site |
post_id |
WordPress post/page ID that was processed |
link_type |
Type of links that were targeted for removal |
target_url |
Specific URL that was targeted (only if targetURL was provided) |
total_links_removed |
Total number of links removed from the content |
total_links_with_anchor_removed |
Number of links where both link and anchor text were removed |
total_links_only_removed |
Number of links where only the link was removed, keeping anchor text |
The API uses intelligent link processing to determine which links to remove and how to handle the anchor text.
The API automatically categorizes links as internal or external based on the domain:
/about-us
)The API automatically handles www prefixes and different protocols when determining if a link is internal or external.
When you provide a targetURL
parameter, the API will only remove links that match that specific URL,
ignoring the link_type
parameter.
Perfect for removing specific affiliate links, outdated URLs, or links to content that no longer exists.
The API intelligently handles anchor text based on its content:
Anchor Text Type | Processing Behavior |
---|---|
Same as URL | Entire link including anchor text is removed |
Descriptive text | Link is removed but anchor text is preserved |
Empty anchor | Entire link is removed |
Here are practical examples of how to use the API for different scenarios.
curl -X POST \
-F "post_url=https://yoursite.com/sample-post" \
-F "client_id=your_client_id" \
-F "secret_key=your_secret_key" \
-F "link_type=external" \
-F "wordpress_id=your_username" \
-F "wordpress_pass=your_password" \
https://api.corenexis.com/wordpress/link-remover/V2
curl -X POST \
-F "post_url=https://yoursite.com/sample-post" \
-F "client_id=your_client_id" \
-F "secret_key=your_secret_key" \
-F "link_type=internal" \
-F "wordpress_id=your_username" \
-F "wordpress_pass=your_password" \
https://api.corenexis.com/wordpress/link-remover/V2
curl -X POST \
-F "post_url=https://yoursite.com/sample-post" \
-F "client_id=your_client_id" \
-F "secret_key=your_secret_key" \
-F "link_type=external" \
-F "targetURL=https://affiliate-link.com/product" \
-F "wordpress_id=your_username" \
-F "wordpress_pass=your_password" \
https://api.corenexis.com/wordpress/link-remover/V2
When targetURL is provided, the link_type parameter is ignored. Only links matching the targetURL will be removed.
curl -X POST \
-F "post_url=https://yoursite.com/about-us" \
-F "client_id=your_client_id" \
-F "secret_key=your_secret_key" \
-F "link_type=external" \
-F "wordpress_id=your_username" \
-F "wordpress_pass=your_password" \
https://api.corenexis.com/wordpress/link-remover/V2
The API uses standard HTTP status codes to indicate the success or failure of a request. Here are the common error responses you might encounter:
Status Code | Description | Example Response |
---|---|---|
400 | Bad Request - Missing required fields | {"status": "failed", "error": "Missing required field: post_url"} |
400 | Invalid post URL format | {"status": "failed", "error": "Invalid post URL format"} |
400 | Homepage not allowed | {"status": "failed", "error": "Homepage not allowed. Please provide a specific post or page URL."} |
400 | Invalid link type | {"status": "failed", "error": "Invalid link_type. Must be 'internal' or 'external'."} |
401 | Unauthorized - Invalid API credentials | {"status": "failed", "error": "Not authorized. Wrong API key."} |
401 | WordPress authentication failed | {"status": "failed", "error": "Failed to authenticate with WordPress site"} |
404 | Post/Page not found | {"status": "failed", "error": "Post/Page not found or unable to retrieve post information"} |
405 | Method not allowed | {"status": "failed", "error": "Method not allowed. Only POST requests are accepted."} |
429 | Rate limit exceeded - Daily limit | {"status": "failed", "error": "Daily limit exceeded. Try again tomorrow."} |
429 | Rate limit exceeded - Per minute | {"status": "failed", "error": "Rate limit exceeded. Try after 30 seconds."} |
500 | Internal Server Error | {"status": "failed", "error": "Failed to update post content"} |
If you need help with the API or want to request access credentials, we're here to help.
To get your API credentials (client_id and secret_key), please contact our team with the following information:
Before using this API, ensure your WordPress site has: