Developers API

You are here

 

The Snips API is an exciting platform that makes it easier for users to have open access to their data. We created it so that you can integrate link shortening with web services, mobile apps, and other third-party tools in fun and innovative ways.

Using your Publisher ID, links can be shortened remotely without providing a password to third-parties. Your Publisher ID is generated automatically for you. If a third-party is misusing your Publisher ID, you can generate a new one at any time by clicking the Reset button. However, all applications using your Publisher ID will need to be updated accordingly.

The Snips API allows you to shorten or lookup a URL using a simple query command. You can also customize the shortened URL using various parameter arguments, as defined below.  These parameters are all case sensitive. To allow custom integration with a variety of platforms, the API can return query results in different formats, including text, PHP, XML and JSONP. Please refer to the API methods below to learn more about how to use this API in third-party web services and tools.

Build something great.


URL Shortening API

Method:
GET http: //snips.co/api/v1/snip?pubid=[PUBID]&url=[URL]&format=[FORMAT]&folder=[FOLDER]&category=[CATEGORY]

Example:
http: //snips.co/api/v1/snip?pubid=670207aeae260a991a1f53eac332571b&url=www. example.com&format=txt&folder=test%20folder&category=technology

Returns:
http: //sni.ps/ccd

 

Parameter

Type

Description

pubid

Required

This is the Publisher ID that is provided to you by Snips, which can be found in your account. Your Publisher ID can be safely shared with third-party web services and tools.

url

Required

This is the URL path for a third-party website. The URL path should begin with the http and/or www headers. The path must be URL-encoded using Javascript's encodeURIComponent, PHP's urlencode, or a similar method.

tag

Optional

This is a custom short URL tag that you may provide (optional) when shortening a URL. By default, a short URL tag is automatically generated.

ads

Optional

Enable or disables display advertisements for a particular URL link. Valid parameters are:

  • on - Enables display advertisements that appear each time a URL is clicked.
  • off - Disables display advertisements from appearing when a URL is clicked.

qrcode

Optional

When set to 1, a QR Code link will be returned.

folder

Optional

Allows you to specify a folder to store or categorize your links. The folder name must be URL-encoded using Javascript's encodeURIComponent, PHP's urlencode, or a similar method.

category

Optional

Specify a category for the destination link. Valid parameters are:

  • arts
  • automotive
  • beauty
  • business
  • children
  • community
  • education
  • entertainment
  • events
  • family
  • fashion
  • finance
  • food
  • games
  • government
  • health
  • hobbies
  • holidays
  • home
  • internet
  • jobs
  • law
  • movies
  • music
  • news
  • pets
  • politics
  • publications
  • science
  • shopping
  • sports
  • technology
  • television
  • travel

format

Optional

This is the format of the output from the API query. Valid format types are:

  • txt - Text format that returns just the short URL (default)
  • php - PHP serialized array
  • xml - XML format
  • json – JSON data-interchange format
  • jsonp - JSONP may take an optional callback argument.

callback

Optional

This is the name of callback function argument for a JSONP request.


URL Lookup API

Method:
GET http: //snips.co/api/v1/lookup?pubid=[PUBID]&url=[URL]&format=[FORMAT]

Example:
http: //snips.co/api/v1/lookup?pubid=670207aeae260a991a1f53eac332571b&format=txt&url=sni.ps/ccd

Returns:
http: //www. example.com

 

Parameter

Type

Description

pubid

Required

This is the Publisher ID that is provided to you by Snips, which can be found in your account. Your Publisher ID can be safely shared with third-party web services and tools.

url

Required

This is the URL path for a Snips shortened URL.  The URL path should begin with the http://sni.ps/ header. The path must be URL-encoded using Javascript's encodeURIComponent, PHP's urlencode, or a similar method.

format

Optional

This is the format of the output from the API query. Valid format types are:

  • txt - Text format that returns just the short URL (default)
  • php - PHP serialized array
  • xml - XML format
  • json – JSON data-interchange format
  • jsonp - JSONP may take an optional callback argument.

callback

Optional

This is the name of callback function argument for a JSONP request.

About

Snips is the first performance-based influencer marketing platform that empowers influencers with business tools to grow their audience and monetize their social networks, while enabling brands to run performance-driven influencer programs built on true measurability & scale.