Programmatically remove internal and external links from WordPress posts, pages, categories, and tags. Advanced targeting with JWT authentication, rate limiting, and comprehensive link processing capabilities.
This API requires WordPress JWT Authentication plugin to be installed and configured on your target WordPress site. The API now uses JWT tokens instead of username/password for enhanced security. Click here to generate your JWT token.
The WordPress Link Remover API allows you to programmatically remove links from WordPress posts, pages, categories, and tags. You can remove internal links, external links, or target specific URLs and domains while preserving anchor text content.
All API requests require authentication using Core Nexis credentials and JWT token for WordPress access. The API performs a 4-phase validation process to ensure security and proper authorization.
You need three types of credentials to use this API:
Phase | Validation | Error Response |
---|---|---|
Phase 1 | Client Existence | "Invalid client ID" |
Phase 2 | Account Status | "Your account is suspended. Contact support." "Your account has been expired at {date}. Contact support." |
Phase 3 | API Key Validation | "API key invalid" |
Phase 4 | API Permission | "WordPress Link Remover is not activated in your plan" |
Generate a JWT token from your WordPress site using the JWT Authentication plugin:
curl -X POST https://yoursite.com/wp-json/jwt-auth/v1/token \
-H "Content-Type: application/json" \
-d '{
"username": "your_username",
"password": "your_password"
}'
The JWT Authentication for WP REST API plugin must be installed and configured on your WordPress site. Use our JWT generator tool to create and verify your tokens.
API usage is subject to rate limits based on your subscription plan. All plans include comprehensive features with different usage allowances.
Custom enterprise and agency plans are available with higher limits and additional features. Contact our team for pricing and custom solutions.
This endpoint removes links from WordPress content including posts, pages, categories, and tags. You can remove all internal/external links or target specific URLs and domains.
Parameter | Type | Description |
---|---|---|
client_id Required | String | Your Core Nexis client ID for authentication |
api_key Required | String | Your Core Nexis API key for authentication |
post_url Required | String | Full URL of the WordPress post, page, category, or tag to process (Homepage URLs not allowed) |
jwt_token Required | String | JWT authentication token for WordPress API access |
link_type Required | String |
Type of links to remove:
|
Parameter | Type | Max Items | Description |
---|---|---|---|
matching_url Optional | String or Array | 10 | Specific URL(s) to match and remove. When provided, only matching links will be removed |
matching_domain Optional | String or Array | 10 | Domain(s) to match and remove all links from. Removes all links from specified domains |
A successful response returns a 200 status code with comprehensive processing information:
{
"status": "success",
"website_url": "https://example.com",
"content_id": 123,
"content_type": "post",
"link_type": "external",
"total_links_removed": 5,
"total_links_with_anchor_removed": 2,
"total_links_only_removed": 3,
"total_media_tags_removed": 1,
"matching_urls": ["https://example.com/page1", "https://example.com/page2"],
"matching_urls_count": 2,
"matching_domains": ["external-site.com"],
"matching_domains_count": 1
}
Field | Description |
---|---|
status |
Response status (success/failed) |
website_url |
The base URL of the WordPress site |
content_id |
WordPress content ID that was processed |
content_type |
Type of content processed (post, page, category, tag) |
link_type |
Type of links that were targeted for removal |
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 |
total_media_tags_removed |
Number of media tags removed (only when matching_url is used) |
matching_urls |
Array of specific URLs that were targeted (if applicable) |
matching_urls_count |
Count of URLs that were specifically targeted |
matching_domains |
Array of domains that were targeted (if applicable) |
matching_domains_count |
Count of domains that were specifically targeted |
The API uses intelligent link processing with advanced targeting options for precise link removal.
The API automatically categorizes links as internal or external based on the domain:
/about-us
)internal
: Only processes internal links (same domain)external
: Only processes external links (different domain)both
: Processes all links regardless of domainIf link_type
is set to "internal"
and matching_url
contains external URLs, those external URLs will be ignored.
Use the matching_url
parameter to target specific URLs for removal:
"matching_url": "https://example.com/specific-page"
"matching_url": ["url1", "url2", "url3"]
Use the matching_domain
parameter to remove all links from specific domains:
"matching_domain": "spamsite.com"
"matching_domain": ["domain1.com", "domain2.net"]
You can use both matching_url
and matching_domain
in the same request for comprehensive link removal.
When matching_url
is provided, the API also removes matching media tags:
Media Tag | Removal Behavior |
---|---|
<img> |
Removed if src attribute matches matching_url |
<video> |
Removed if src attribute matches matching_url |
<audio> |
Removed if src attribute matches matching_url |
<embed> |
Removed if src attribute matches matching_url |
<iframe> |
Removed if src attribute matches matching_url |
<source> |
Removed if src attribute matches matching_url (inside video/audio) |
If matching_url
contains "https://example.com/image.jpg"
, any <img src="https://example.com/image.jpg">
will be completely removed from the content.
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 |
Plain text URLs | Matching URLs found as plain text are also removed |
Here are comprehensive examples showing different ways to use the API with the new authentication system.
curl -X POST "https://api.corenexis.com/wordpress/link-remover/" \
-H "Content-Type: application/json" \
-d '{
"client_id": "99999",
"api_key": "your_key",
"post_url": "https://example.com/sample-post/",
"jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"link_type": "external"
}'
curl -X POST "https://api.corenexis.com/wordpress/link-remover/" \
-H "Content-Type: application/json" \
-d '{
"client_id": "99999",
"api_key": "your_key",
"post_url": "https://example.com/sample-post/",
"jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"link_type": "internal"
}'
curl -X POST "https://api.corenexis.com/wordpress/link-remover/" \
-H "Content-Type: application/json" \
-d '{
"client_id": "99999",
"api_key": "your_key",
"post_url": "https://example.com/sample-post/",
"jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"link_type": "both"
}'
curl -X POST "https://api.corenexis.com/wordpress/link-remover/" \
-H "Content-Type: application/json" \
-d '{
"client_id": "99999",
"api_key": "your_key",
"post_url": "https://example.com/sample-post/",
"jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"link_type": "both",
"matching_url": "https://badsite.com/spam-link"
}'
curl -X POST "https://api.corenexis.com/wordpress/link-remover/" \
-H "Content-Type: application/json" \
-d '{
"client_id": "99999",
"api_key": "your_key",
"post_url": "https://example.com/sample-post/",
"jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"link_type": "external",
"matching_url": [
"https://badsite1.com/spam",
"https://badsite2.com/unwanted",
"https://example.com/old-page"
]
}'
curl -X POST "https://api.corenexis.com/wordpress/link-remover/" \
-H "Content-Type: application/json" \
-d '{
"client_id": "99999",
"api_key": "your_key",
"post_url": "https://example.com/sample-post/",
"jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"link_type": "external",
"matching_domain": "spamsite.com"
}'
curl -X POST "https://api.corenexis.com/wordpress/link-remover/" \
-H "Content-Type: application/json" \
-d '{
"client_id": "99999",
"api_key": "your_key",
"post_url": "https://example.com/sample-post/",
"jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"link_type": "both",
"matching_domain": [
"badsite1.com",
"spamsite.com",
"unwanted-domain.net"
]
}'
curl -X POST "https://api.corenexis.com/wordpress/link-remover/" \
-H "Content-Type: application/json" \
-d '{
"client_id": "99999",
"api_key": "your_key",
"post_url": "https://example.com/sample-post/",
"jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"link_type": "both",
"matching_url": [
"https://example.com/old-page",
"https://remove-this-link.com/page"
],
"matching_domain": [
"spamsite.com",
"badsite.net"
]
}'
curl -X POST "https://api.corenexis.com/wordpress/link-remover/" \
-H "Content-Type: application/json" \
-d '{
"client_id": "99999",
"api_key": "your_key",
"post_url": "https://example.com/category/technology/",
"jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"link_type": "external"
}'
curl -X POST "https://api.corenexis.com/wordpress/link-remover/" \
-H "Content-Type: application/json" \
-d '{
"client_id": "99999",
"api_key": "your_key",
"post_url": "https://example.com/tag/wordpress/",
"jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"link_type": "internal"
}'
Authentication or validation error: Invalid client ID
const data = {
client_id: '99999',
api_key: 'your_key',
post_url: 'https://example.com/sample-post/',
jwt_token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...',
link_type: 'both',
matching_url: ['https://remove-this.com/page'],
matching_domain: ['spamsite.com']
};
fetch('https://api.corenexis.com/wordpress/link-remover/', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
})
.then(response => {
if (response.status === 429) {
throw new Error('Rate limit exceeded. Please try again later.');
}
return response.json();
})
.then(result => {
if (result.status === 'success') {
console.log('Success:', result);
console.log(`Removed ${result.total_links_removed} links from content ID ${result.content_id}`);
} else {
console.error('Error:', result.error);
}
})
.catch(error => {
console.error('Request failed:', error);
});
The API uses standard HTTP status codes and provides detailed error messages for troubleshooting.
Status Code | Error Type | Description |
---|---|---|
400 | Bad Request | Missing required fields, invalid JSON, authentication failed, or invalid parameters |
401 | Unauthorized | Invalid client credentials or API not activated in plan |
404 | Not Found | Post/page/category/tag not found or unable to retrieve content |
405 | Method Not Allowed | Only POST requests are allowed |
429 | Too Many Requests | Rate limit exceeded (per-minute or daily limit) |
500 | Internal Server Error | Server processing error or WordPress API issues |
Error Message | Description |
---|---|
"Invalid client ID" |
Client ID does not exist in the system |
"Your account is suspended. Contact support." |
Account status is suspended |
"Your account has been expired at {date}. Contact support." |
Account has expired on the specified date |
"API key invalid" |
API key doesn't match the client account |
"WordPress Link Remover is not activated in your plan" |
API not included in current subscription plan |
"Too Many Requests - Rate limit exceeded" |
Per-minute rate limit exceeded |
"Daily limit reached. Upgrade your plan or try tomorrow." |
Daily usage limit exceeded |
"Homepage not allowed. Please provide a specific post or page URL." |
Homepage URLs are not supported |
"Post/Page not found or unable to retrieve post information" |
Content not found or inaccessible |
"Invalid link_type. Must be 'internal', 'external', or 'both'." |
Invalid value provided for link_type parameter |
Visit Corenexis API Platfrom to create an account and get your:
client_id
api_key
Ensure the WordPress Link Remover API is included in your subscription plan. Contact support if you need to upgrade or activate the API.
Install and configure the JWT Authentication for WP REST API plugin on your WordPress site.
Use our JWT Generator Tool to create and verify your WordPress authentication tokens.
Use the examples provided in this documentation to start removing links from your WordPress content.
To get your API credentials and activate the WordPress Link Remover API, please provide: