Shlink icon

Shlink

Interact with Shlink URL Shortener API

Actions12

Overview

This node integrates with the Shlink URL Shortener API to manage short URLs. Specifically, the Get Many operation under the Short URL resource retrieves multiple short URLs based on various filters and pagination options.

Typical use cases include:

  • Fetching a list of short URLs created within a certain date range.
  • Searching for short URLs by tags or search terms (matching long URLs or short codes).
  • Sorting short URLs by creation date, visits count, or other attributes.
  • Retrieving all short URLs or limiting the number of results for reporting or analytics purposes.

For example, you might use this node to get all short URLs tagged with "marketing" created in the last month, ordered by visit count descending, to analyze campaign performance.

Properties

Name Meaning
Return All Whether to return all matching short URLs or only up to a specified limit. If true, the node will paginate through all available results automatically.
Limit The maximum number of short URLs to return when "Return All" is false. Must be at least 1. Defaults to 50.
Filters A collection of optional filters to refine the results:
  Search Term Search by long URL or short code substring.
  Tags Comma-separated list of tags to filter short URLs by.
  Order By Sort order of the results. Options include: Created At ASC/DESC, Long URL ASC/DESC, Short Code ASC/DESC, Title ASC/DESC, Visits Count ASC/DESC. Default is Created At DESC.
  Start Date Filter to include only short URLs created after this date/time.
  End Date Filter to include only short URLs created before this date/time.

Output

The node outputs an array of JSON objects representing short URLs. Each object corresponds to a short URL record returned by the Shlink API and typically includes fields such as:

  • shortCode: The unique short code identifier.
  • longUrl: The original long URL.
  • dateCreated: Timestamp when the short URL was created.
  • tags: Array of tags associated with the short URL.
  • title: Optional title of the short URL.
  • visitsCount: Number of times the short URL has been visited.
  • Other metadata fields as provided by the API.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Shlink API.
  • The base URL of the Shlink instance must be configured in the credentials.
  • The node makes HTTP requests to the Shlink REST API endpoints, specifically version 3 (/rest/v3/short-urls).

Troubleshooting

  • Common issues:

    • Incorrect or missing API base URL or API key will cause authentication failures.
    • Invalid filter values (e.g., malformed dates) may result in API errors.
    • Request limits or pagination parameters not set correctly can lead to incomplete data retrieval.
  • Error messages:

    • Network or request failures will log the error message and response status/data if available.
    • API errors from Shlink (e.g., 4xx or 5xx responses) are surfaced with details to help diagnose issues.
  • Resolutions:

    • Verify that the API base URL starts with http:// or https://. The node auto-prepends https:// if missing.
    • Ensure the API key credential is valid and has sufficient permissions.
    • Check filter inputs for correct formatting.
    • Use "Return All" carefully to avoid very large data fetches that could impact performance.

Links and References

Discussion