URL Canonicalizer
Pricing
from $1.95 / 1,000 url normalizeds
URL Canonicalizer
Canonicalize URLs by stripping tracking parameters, normalizing hosts, paths, query strings, and grouping equivalent URL variants.
Pricing
from $1.95 / 1,000 url normalizeds
Rating
0.0
(0)
Developer
junipr
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a month ago
Last modified
Categories
Share
Store Positioning
Store title: URL Canonicalizer
Short description: Canonicalize URLs by stripping tracking parameters, normalizing hosts, paths, query strings, and grouping equivalent URL variants.
SEO title: URL Canonicalizer — fast deterministic data utility
SEO description: Canonicalize URLs by stripping tracking parameters, normalizing hosts, paths, query strings, and grouping equivalent URL variants. Use it for fast, low-cost normalization or validation at scale with predictable pay-per-event pricing.
Categories: SEO_TOOLS, DEVELOPER_TOOLS, ECOMMERCE
Keywords: url, canonicalizer, tiny deterministic utility
Pay-Per-Event Pricing
This actor uses pay-per-event pricing. Event prices include Apify platform usage; users are not expected to pay a separate platform-usage pass-through charge for the configured pricing model.
- Primary event:
url-normalizedat $0.00195 base
Event set:
actor-start: $0.00176 when run setup is accepted.url-normalized: $0.00195 for each valid URL emitted to the dataset.report-generated: $0.02000 when CSV, JSON, summary, and Markdown files are created.
Public Task Concepts
- Normalize URL Canonicalizer records
- Validate URL Canonicalizer values in bulk
- Generate a small utility report for URL Canonicalizer
- Group equivalent campaign URL variants
- Export a canonical URL migration map
Canonicalize URLs by stripping tracking parameters, normalizing variants, and grouping equivalent URLs before using them in crawl inputs, redirects, analytics, SEO QA, lead exports, or client reports.
What This Actor Does
Url Canonicalizer accepts URL lists, row objects, and mixed text, then produces deterministic canonical URLs:
- Adds
https://to schemaless URLs when enabled. - Forces HTTPS by default.
- Lowercases hostnames and removes leading
www. - Removes fragments, index files, trailing slashes, empty query parameters, and common tracking parameters.
- Sorts kept query parameters for stable dedupe keys.
- Groups equivalent URL variants and marks duplicates.
- Writes canonical URL CSV, group JSON, and Markdown/JSON reports.
What This Actor Does Not Do
- It does not crawl pages or verify HTTP status codes.
- It does not fetch canonical tags from live pages.
- It does not create redirects or modify websites.
- It does not guarantee legal, privacy, or SEO compliance.
Best Use Cases
- Clean crawl input lists before SEO audits.
- Deduplicate campaign URLs that differ only by UTM parameters.
- Normalize URL exports before redirect migrations.
- Extract URLs from notes or row fields and produce clean import keys.
- Prepare client reports with grouped URL variants.
Input Fields
urls: URL or URL-like strings to canonicalize.records: Optional objects containing URL fields or text fields.urlFields: Fields read as direct URLs fromrecords.textFields: Fields scanned for URLs when text extraction is enabled.mixedText: Free text to scan for URLs.extractUrlsFromText: Enables URL extraction from text fields and mixed text.allowSchemalessUrls: Treats strings likeexample.com/pathas HTTPS URLs.forceHttps,stripWww,stripHash,stripTrailingSlash,stripIndexFiles: Canonicalization controls.stripParams: Query parameter names to remove.keepParams: Query parameter names to preserve even if they normally match strip rules.includeInvalid: Include invalid URL inputs in the dataset with errors.maxItems: Maximum extracted URL items to process. Default is 100 and hard cap is 50,000.includeReport: Store canonical CSV, group JSON, and summary reports.
Example Input
{"urls": ["https://www.Example.com/products/widget/?utm_source=newsletter&utm_medium=email&ref=abc#reviews","http://example.com/products/widget?ref=abc&utm_campaign=spring","example.com/products/widget/?ref=abc"],"maxItems": 100,"includeReport": true}
Output Fields
Each dataset item represents one input or extracted URL:
itemId: Stable identifier for the processed URL item.sourceType,sourceId,recordIndex,fieldName: Source metadata.originalValue: Original URL-like value.status:canonicalized,unchanged,duplicate, orinvalid.canonicalUrl: Normalized URL when valid.normalizedHost,rootDomain,normalizedPath: Normalized URL parts.queryParamsKeptandqueryParamsRemoved: Query parameter audit trail.changedandchangeReasons: Whether and why the URL changed.groupKey,groupSize,duplicateOfItemId: Equivalent URL grouping.issues: Structured validation issues.recommendation: Short next step.
The key-value store also contains:
CANONICAL_URLS.csv: Canonical URL rows for import or reporting.CANONICAL_GROUPS.json: Grouped canonical URLs and variants.URL_CANONICALIZER_REPORT.md: Human-readable summary report.URL_CANONICALIZER_SUMMARY.json: Machine-readable summary.
Example Output
{"originalValue": "https://www.Example.com/products/widget/?utm_source=newsletter&utm_medium=email&ref=abc#reviews","status": "canonicalized","canonicalUrl": "https://example.com/products/widget?ref=abc","queryParamsRemoved": ["utm_source", "utm_medium"],"groupSize": 3,"duplicateOfItemId": null,"recommendation": "Use the canonical URL for dedupe keys, redirects, crawl inputs, or reporting."}
Cost-Control Tips
- Start with the default input or
maxItemsbetween 25 and 100. - Verify
stripParamsandkeepParamson a small batch before processing a large export. - Keep
includeInvalidon for QA workflows so bad URLs are visible. - Keep
includeReporton for normal runs so canonical CSV and group JSON artifacts are generated.
Public Task Examples
This actor includes prepared task concepts:
- Canonicalize campaign URLs.
- SEO crawl URL cleanup.
- Extract URLs from notes.
- Canonicalize row fields.
FAQ
Does this fetch pages and read canonical tags?
No. This is a deterministic URL string canonicalizer. It intentionally avoids network access so runs stay fast, predictable, and cheap.
Can I preserve a UTM parameter?
Yes. Add that parameter name to keepParams.
Does this use a full public suffix database?
No. Root domain is a best-effort convenience field. The primary grouping key is the canonical URL.
Troubleshooting
- URL was invalid: check whether it has spaces, missing host parts, or an unsupported scheme.
- Important query parameter was removed: add it to
keepParams. - URLs did not group together: compare kept query parameters and paths in the output.
- Too many inputs: lower
maxItemsand validate a smaller batch first.
Limitations
- No live HTTP checks, redirect following, canonical tag extraction, or sitemap crawling.
- Best-effort root-domain extraction only.
- URL extraction from text is intentionally conservative and may miss unusual formats.
Source And Safety Notes
This actor processes user-provided URL strings and row objects. Do not upload confidential URLs unless you are authorized to process them in Apify.
Changelog
1.0.0: Initial production build with URL parsing, canonicalization, equivalent grouping, clean CSV/group artifacts, report generation, PPE billing, examples, and fixture tests.