Get published content count

Get the number of published content items for a specific collection.

The query parameters can be used to make the count more specific. For example, to only count Facebook content items. If used in combination with a since query parameter, the count endpoint can be used to count how many new items have been collected since a certain timestamp.

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

Endpoint

GET https://q.crowdynews.com/v1/count/{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 count content for. This is the slug property of the collection.
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. Latitude ranges from -180 to 180. Longitude ranges from -90 to 90. Radius must be between 10 and 200.

Example value: 53.2216,6.4945,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.

Response Format

On success, the HTTP status code in the response header is 200 OK and the response body will contain a count object 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/count/my-contract?q=my-collection&type=image,video

Response:

HTTP/1.1 200

{
    "count": 256
}

Additional Resources