GET /search

Table of contents

Search across properties

Authentication

Authentication for this API is similar to the JWP Management API v2, however it uses a separate API key, which would have provided to you by JWP.

The Cross-Property Search API uses Bearer authentication.

When you make an API call, add your API key to an Authorization header of your API request to authenticate the request.

curl -X POST https://api.cross-property-search.jwp.services/{resource} \
    -H 'Authorization: Bearer 12345678abcdefgh' \
    ...

Query Parameters

Name Type Required Description
page integer No Sets the page number for pagination. First page is 1.
page_length integer No Sets the page length (number of items you get in the response) for pagination. If page_length is not specified, the default value will be set. Default: 10
q string No See query string
sort string No Allows for sorting results. Example: sort=created:dsc. Sort order can be one of asc, dsc. Media can be sorted by the following attributes: created, duration, last_modified, publish_end_date,publish_start_date, site_name, status, title

Query String

The q parameter allows for querying results.

Example: title:+a title

Attributes

Media can be queried by the following attributes:

author
category
created
custom_params
description
error_message
external_id
duration
hosting_type
id
last_modified
media_type
permalink
publish_end_date
publish_start_date
site_id
site_name
status
tags
title

Custom Parameters

Querying for a specific custom_params requires a match using the AND logical operator:

custom_params: ( name: "abc" AND value: "123" )

Exact Match

Match with a single word or with multiple words encapsulated in quotes

Due to the complexities of searching longer text, value filters longer than 15 characters may not exactly match the results.

Examples:

  • ?q=title: cats
  • ?q=title: "wild cats"

Match on a custom parameter

Example: ?q=custom_param:"genre:thriller"

Special Character

Use the backslash (\) to allow the special characters *, \, and " in a search query

Examples:

  • ?q=title: "\*BEST\*"
  • ?q=title: "\""
  • ?q=title: "\\"

AND | OR

Match with logical operators

Examples:

  • ?q=title: ( cats OR kittens )
  • ?q=title: ( cats AND dogs )

Range

Define one of two types of ranges within square brackets:

  • Closed Range: Both a lower bound and upper bound are defined.
  • Open Range: Either the lower bound or upper bound is defined and the other bound is set to an asterisk (_).

Examples:

  • ?q=publish_date: [2017-01-01 TO 2017-04-01]
  • ?q=publish_date: [2017-04-01 TO _]

Inverse

Match on an inverse operation

Examples:

  • ?q=title: NOT dogs
  • ?q=title: NOT "\""
  • ?q=title: NOT ( cats OR kittens )
  • ?q=title: NOT ( cats AND dogs )
  • ?q=publish_date: NOT [2017-01-01 TO 2017-04-01]

The NOT operator must precede the value of a field name.

Compound Logic

Match on an inverse operation

Example: ?q=( title: NOT dogs AND publish_date: [2017-01-01 TO 2017-04-01] ) OR ( title: ( cats OR kittens ) AND ( publish_date: [2017-04-01 TO *] ) )

Response

  • page integer
    Offset for returned resources

  • page_length integer
    Maximum number of resources to return

  • total integer
    Number of resources available before pagination

  • media array of objects

    • schema string

    • id string
      Unique identifier for a resource

    • created string
      Date and time at which the resource was created

    • last_modified string
      Date and time at which the resource was most recently modified

    • type string
      Name of the type of resource.

    • relationships object
      Ancilliary resources associated to the primary resource being read

      • protection_rule object

        • id string
          Unique identifier for a resource

        • type string
          Resource type

    • metadata object

      • title string
        A maximum of 5000 characters is permitted.

      • description string
        A maximum of 25000 characters is permitted.

      • author string
        A maximum of 256 characters is permitted.

      • duration number
        Length of the media in seconds
        This can only be defined manually for externally hosted media. The duration is set automatically for hosted media.

      • permalink string
        URL of the page where this media is published
        A maximum of 2048 characters is permitted.

      • category string
        IAB category

        • Automotive
        • Books and Literature
        • Business and Finance
        • Careers
        • Education
        • Events and Attractions
        • Family and Relationships
        • Fine Art
        • Food & Drink
        • Healthy Living
        • Hobbies & Interests
        • Home & Garden
        • Medical Health
        • Movies
        • Music and Audio
        • News and Politics
        • Personal Finance
        • Pets
        • Pop Culture
        • Real Estate
        • Religion & Spirituality
        • Science
        • Shopping
        • Sports
        • Style & Fashion
        • Technology & Computing
        • Television
        • Travel
        • Video Gaming
      • publish_start_date date-time
        Start date and time in ISO 8601 format when media is available for streaming

      • publish_end_date date-time
        End date and time in ISO 8601 format when media is no longer available for streaming

      • tags array of strings
        User-generated labels used to classify a video
        Tags are case sensitive, and trailing whitespace is removed.

      • language string
        List of language codes to define a language. Uses ISO-639-1 language codes.

      • custom_params object
        User-generated key-value pairs

        When defining custom_params, include all custom parameters that should be associated with the target resource.

        When updating existing custom_params, include all custom_params keys with their updated values. Any custom_params key-value pair not included within the updated custom_params in the request body is deleted.

    • status string
      Media upload status

      • created
      • processing
      • ready
      • updating
      • failed
    • media_type string

      • audio
      • video
    • hosting_type string
      Indicates whether or not the media is hosted with JW Player or not

      • external
      • hosted
    • mime_type string

      • video/mp4
      • video/webm
      • video/flv
      • audio/aac
      • audio/mpeg
      • audio/ogg
      • application/vnd.apple.mpegurl
      • application/smil+xml
      • application/dash+xml
      • video/flash
      • video/x-youtube
    • error_message string
      Message describing an issue uploading or processing the media

    • external_id string
      Non-JWP ID for the media
      A maximum of 64 characters is permitted.

    • duration number
      Length of the media in seconds