ToolsAPI stores central URL cleanup rules that browser clients and backend services can share.
The rules are intended for URL variants that point at the same public resource but contain UI, tracking or navigation parameters that should not become part of the canonical identity.
GET /api/socialgpt/url-rules
The endpoint is public read-only configuration. It returns active rules and a suggested client cache TTL.
Example response:
{
"ok": true,
"rules": [
{
"id": 1,
"name": "Facebook group member welcome composer cleanup",
"host": "facebook.com",
"include_subdomains": true,
"path_pattern": "/groups/*",
"action": "remove_query_parameters",
"parameters": ["should_open_welcome_member_composer"],
"priority": 100
}
],
"cache_ttl_seconds": 900
}
Facebook desktop group member URLs may contain should_open_welcome_member_composer=1. The initial rule removes that parameter on facebook.com group paths while preserving all unrelated query parameters, the path, origin and fragment.
The SocialGPT reputation service applies the same canonicalization service before it computes a target identity. This prevents an otherwise identical public target from being duplicated only because a configured removable query parameter is present.
URL cleanup does not assign or change reputation status. Reputation moderation remains a separate workflow.
The first supported action is remove_query_parameters. Rules do not contain arbitrary redirect destinations. This keeps cleanup limited to the current URL and avoids turning the configuration endpoint into an open redirect mechanism.