Compile a CSDL filter.

An HTTPS POST request sent to:

A successful call to this endpoint returns: 200 OK plus a JSON object.


Parameter Description

The CSDL code you want to compile.

Example values: interaction.content contains "apple"


Here's an example of a call to /v1.6/compile:

curl -X POST \
  -d '{"csdl":"interaction.content contains \"apple\""}' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: datasift-user:your-datasift-api-key'

DataSift returns this JSON:

  "hash": "9fe133a7ee1bd2757f1e26bd78342458",
  "created_at": "2011-05-12 11:18:07",
  "dpu": "0.1"

Property: Description:
hash A unique identifier for this stream. Make sure you store this because you will need it later.
dpu The cost in DPUs to run this stream. Remember that some data sources charge a license cost, which we pass on to you in addition to the DPU cost.


  1. All calls to the API must be properly authenticated with a DataSift username and API key.
  2. All calls to the API must be versioned. The current version is v1.6.

Resource information

Rate limit cost: 5

Requires authentication: Yes

Response formats: JSON