Searching for a link

You may want to search for a specific branded short link.
Your can search inside your branded short links collection with an HTTP GET on the links search endpoint http://api.rebrandly.com/v1/links/search.

Filters apply to the endpoint, in order to setup how you want your collection to be returned.
We recommend that you have a strong comprehension of how our API manages Pagination collection listing endpoints.

NOTE: Sorting is not provided on search endpoints. Default sorting is by term string matching.

QUERY PARAMETERS

Parameter nameTypeConstraintsDescription

term

string

required
Min 2 chars

Search term to filter branded short links collection

domain.id

string

optional

Unique branded domain identifier to filter branded short links collection

status

string enum

  • active

  • trashed

optional

Branded short link status to filter branded short links collection

searchBy

array of string enum

  • destination

  • slashtag

  • optional*

Which branded short link component to lookup for search

GETting links matching with search filters

$ curl \\
-s http://api.rebrandly.com/v1/links/search?term=video&status=active,trashed&domain.id=8f104cc5b6ee4a4ba7897b06ac2ddcfb&searchBy=destination,slashtag \\
-H 'Accept: application/json'
-H 'Authorization: Bearer YOUR_TOKEN_HERE'

HTTP/1.1 200 OK

JSON response (list of links, sorted by string similarity)

[
  {
        "id": "FFfa4cc5b6ee45d6g7897b06ac2d16af",
    "title": "What is Rebrandly?",
    "slashtag": "video",
    "destination": "https://www.youtube.com/watch?v=3VmtibKpmXI",
    "createdAt": "2016-07-13T10:54:12.000Z",
    "updatedAt": "2016-07-15T10:05:22.000Z",
    "shortUrl": "rebrand.ly/video",
    "favourite": false,
    "domain": {
          "id": "8f104cc5b6ee4a4ba7897b06ac2ddcfb",
      "ref": "/domains/8f104cc5b6ee4a4ba7897b06ac2ddcfb"
    }
  },
  // up to 100 linsk matching filters
]