Get published content items

Get a list of published content items for a specific collection.

This endpoint does not require an access token and return content items of the last 24 hours by default.

Endpoint

GET https://q.crowdynews.com/v1/content/{contract}

Request Parameters

URL PARAMETER VALUE DESCRIPTION
contract The slugified name of the contract. This is the slug property of your contract.
QUERY PARAMETER VALUE DESCRIPTION
q The slugified name of the collection to get content for. This is the slug property of the collection.
callback Optional. When given and not empty a JSONP format is returned.
service Optional. Comma separated filter on services.

Supported services:
  • twitter
  • facebook
  • youtube
  • instagram
  • rss
  • flickr
  • vimeo
  • tumblr
  • vk
  • weibo
type Optional. Filter on content type. Accepts a comma separated list of types.

Supported types:
  • image
  • video
  • status
  • link
  • embed
location Optional. Requires three parameters (comma separated) in specific order: longitude, latitude and radius in meters. Longitude ranges from -90 to 90. Latitude ranges from -180 to 180. Radius must be between 10 and 200.

Example value: 6.4945,53.2216,200
language Optional. Show the content for the specified language or languages. Multiple languages should be seperated by comma. Languages should be specified in the ISO 639-1 form.
since Optional. Show results starting after this time. Unix timestamp in seconds, for example: 1466088488. Defaults to the current time minus 24 hours.
until Optional. Show results until this time. Unix timestamp in seconds, for example: 1466088488. Defaults to the current time.
count Optional. The amount of results to show. Minimum value: 1, maximum value: 100. Defaults to 20.
offset Optional. Start position in the result set. Used for pagination. Defaults to 0.
sort Optional. What to sort the content on. Can be on publish date (time) or on popularity (kudos). Defaults to time. Supported values: time, kudos
order Optional. What order to sort content in. Either ascending (oldest / least popular first) or descending (newest / most popular first). Defaults to descending.

Supported values: asc, desc

Response Format

On success, the HTTP status code in the response header is 200 OK and the response body will contain one or more content item objects in JSON format. If there are no content items, an empty array will be returned in JSON format. On error, the header status code is an error code and the response body contains an error object.

Example Request

Request:

GET https://q.crowdynews.com/v1/content/my-contract?q=my-collection&order=asc

Response:

HTTP/1.1 200

[
    {
        "id": "143418480117",
        "service": "tumblr",
        "type": "image",
        "text": "Got this for my husband so I can marathon all my favourite TV shows on the weekend without interruption.",
        "url": "http://ragecomics4you.tumblr.com/post/143418480117/got-this-for-my-husband-so-i-can-marathon-all-my",
        "tags": [
            "humor",
            "lol",
            "funny",
            "omg"
        ],
        "date": "2016-04-26T06:39:09.000Z",
        "author": {
            "name": "ragecomics4you",
            "userid": "ragecomics4you",
            "username": "ragecomics4you",
            "url": "https://api.tumblr.com/v2/blog/ragecomics4you.tumblr.com/avatar"
        },
        "media": [{
            "type": "image",
            "url": "http://40.media.tumblr.com/166d60c3ec3e90d605cfdb986dc33b18/tumblr_o68ah9GbF11rq1pj8o1_500.jpg",
            "width": 460,
            "height": 345
        }],
        "kudos": {
            "score": 0,
            "tumblr_score": 0,
            "tumblr_note_count": 0
        }
    }
]

Additional Resources