Skip to content

OLD dealnews Public API

billspeir edited this page Apr 23, 2013 · 1 revision

OUTDATED. DO NOT USE

You have been warned.

Public API Endpoint

The base endpoint for all methods is

http://ask.dealnews.com

Request Headers

HTTP Verbs

The dealnews API uses a REST_ish_ style interface. The only HTTP verbs supported are GET and POST. PUT and DELETE are not supported.

Authentication

An API key is required for access to the dealnews API. This API key is provided by dealnews and replaces the REFCODE that was previously required in the query string in earlier API versions.

GET /some/path
Authentication: DN api-key

Return Data Formatting

The desired format of the API output data is specified by providing the Content-Accept header. Acceptable formats are JSON, HTML and XML. If this header is not specified, the format will default to JSON. Valid headers:

Content-Accept: application/json

or

Content-Accept: text/html

or

Content-Accept: text/xml

Errors

TBD

Primary Content - Deals, Coupons and Black Friday Ads

Common Inputs

  • cats - Comma-separated list of category ids
  • stores - Comma-separated list of store ids
  • mfgs - Comma-separated list of manufacturer ids
  • keywords - Comma-separated list of keywords
  • sort - Sort the results. Valid values are 'time', 'hottness' or 'expiration'.
  • start - Used for pagination; retrieve data starting at the provided index.
  • limit - Used for pagination; retrieve only the specified number of results.
  • refcode - Use this value for your referral code in the returned deal and/or coupon links. If this is not specified, your default refcode will be used.

Deals

Deal Specific Inputs

  • price_range_min - The minimum price cutoff (inclusive) for returned deals.
  • price_range_max - The maximum price cutoff (inclusive) for returned deals.

Today's Deals

Retrieve a list of today's deals.

GET /deal

Sample Call

GET /deal
Authentication: DN api-key
Content-Accept: application/json

Sample Response Header

HTTP/1.1 200 OK
Content-Type: application/json

Sample Response Body

{
    "headline":"Here is some headline text",
    "url":"dealnews.com/url/to/the/deal"
    ...
}

Today's Deals Within Price Range

Retrieve a list of today's deals that fall between $5 and $10 inclusive

GET /deal?min_price=5&max_price=10

Today's Deals Less than a Given Price

Retrieve a list of today's deals that are less than or equal to $5

GET /deal?max_price=5

Today's Deals More than a Given Price

Retrieve a list of today's deals that are greater than or equal to $10

GET /deal?min_price=10

Current Deals

Retrieve a list of deals which dealnews considers current.

GET /deal/current

This request requires specification of at least one of the following options

  • cats
  • stores
  • mfgs
  • keywords

Editor's Choice Deals

Retrieve a list of the editor's choice deals.

GET /deal/choice

Exclusive Deals

Retrieve a list of deals which dealnews considers exclusive.

GET /deal/exclusive

Deal Details

Retrieve extended details for a deal.

GET /deal/<deal id>

Local Deals

Local deals can be retrieved by prepending 'local' to the deal API call. In addition, the locale in the form of a zip code must be appended to the call.

GET /local/deal/<zip code>

Coupons

Coupons

Retrieve a list of coupons.

GET /coupon

Coupon Details

Retrieve extended details for a coupon.

GET /coupon/<coupon id>

Black Friday Ads

Black Friday Ad Inputs

  • price_min - Same functionality as for deals.
  • price_max - Same functionality as for deals.
  • year - The year for which to retrieve black friday ads. This is for the app's use only(?)

Black Friday Ads

Retrieve a list of black friday ads.

GET /blackfriday

Editor's Choice Black Friday Ads

Retrieve a list of the editor's choice black friday ads.

GET /blackfriday/choice

Black Friday Ad Details

Retrieve extended details on a black friday ad.

GET /blackfriday/<ad id>

Features

Feature Articles

Retrieve a list of our feature articles

GET /feature

Feature Article Details

Retrieve extended details for a feature article

GET /feature/<feature id>

Sweepstakes really?

Sweepstakes

Retrieve a list of current sweepstakes

GET /sweepstake

Other Stuffs (i.e., metadata)

Common Inputs

  • lct - When retrieving lists, only retrieve data that have been added since the time specified.

Stores

Stores for Today's Deals

Retrieve a list of stores corresponding to today's deals.

GET /store

Stores for Current Deals

Retrieve a list of stores corresponding to deals which dealnews considers current.

GET /store/current

All Stores

Retrieve all the stores available.

GET /store/all

Black Friday Stores

Retrieve a list of stores with black friday ads.

GET /store/blackfriday

Store Details

Retrieve extended details for a store.

GET /store/<store id>

Categories

Categories for Today's Deals

Retrieve a list of categories corresponding to today's deals.

GET /category

Categories for Current Deals

Retrieve a list of categories corresponding to deals which dealnews considers current.

GET /category/current

All Categories

Retrieve all categories available.

GET /category/all

Black Friday Categories

Retrieve a list of categories with black friday ads.

GET /category/blackfriday

Manufacturers

Manufacturers

Retrieve a list of manufacturers corresponding to today's deals

GET /manufacturer

Manufacturers for Current Deals

Retrieve a list of manufacturers corresponding to deals which dealnews considers current.

GET /manufacturer/current

All Manufacturers

Retrieve all manufacturers available.

GET /manufacturer/all

Black Friday Manufacturers

Retrieve a list of manufacturers with black friday ads.

GET /manufacturer/blackfriday