AnyClip API‎ > ‎

API Search Reference


Search URL Syntax

You can search  for clips or other information contained in the AnyClip databases using the /search/ method or by using generic search functions.
Searches are performed by sending queries to the API using either of the following formats:

Search Method URL

http://apis.anyclip.com/api/search/?q=[query]&[optional parameters]&cid=[cid]&format=[format]&sig=[sig]

Where [urlparams] are q (see Required Parameters table below) and optional filters. All parameters including the CID are concatenated by ampersands (&), and must be indexed alphabetically. The SHA-1 hash (signature) is appended to the end of the URL string.

Generic Search Based On Type URL

http://apis.anyclip.com/api/[generic_method]/[type_id]/search/?[urlparams]&cid=[cid]&format=[format]&sig=[sig]


Required Parameters

Parameter

Entity

Values

Notes

q

query

free text


cid

client ID

provided at registration

 

sig

SHA-1 signature

hashed query string + appKey

 


Q Parameter Searches

All compound q= queries are OR queries. Therefore, "q=hello goodbye" will return clips containing either "hello" or "goodbye."

A q parameter without optional filter parameters will only return clips.

Example

http://apis.anyclip.com/api/search/?cid=[cid]&format=JSON&q=hello&sig=[sig]

Returns a list clips with contain the word "hello" in the dialog, title (movie name), actor name, character name, director name, scene name, and metadata tags.

Default information returned for clips are clip:

  • Type
  • Code
  • Duration
  • timeIn
  • timeOut
  • Title
{

    -
    clips: {
        -
        result: [
            -
            {
                @type: "clip"
                code: "KBVeJmtnth2mb"
                duration: "30000"
                timeIn: "2067634"
                timeOut: "2097634"
                -
                title: {
                    code: "tvnLljwap"
                    name: "Land Before Time, The"
                    poster: http://img.anyclip.com/posters/tvnLljwap_200.jpg
                    uniqueName: "the-land-before-time"
                }
            }
           }
    ]
  , "totalItemsCount": "43"
  }
, "timeElapsedMs": "10"
}



Optional Display Parameters

To avoid exceptionally long results, search queries  by default only return 5 results. The total item count is given toward the bottom of the return values:

Example

XML
<totalItemsCount>37</totalItemsCount>

JSON
{"totalItemsCount":"37"}

maxResults

To increase the number of search results displayed, add the maxResult=[number] parameter and specifiy the number of results you want to see.
may be used in conjunction with startIndex.

startIndex

A search result page contains the default number of items (5) returned by the search. By default, the search returns the first page of the items list. To view additional pages returned but not shown, add the startIndex=[page number] parameter.
startIndex may be used in conjunction with maxResult.

Filter

Entity

Values

 Notes

maxResult

search results to display

numeric value

maxResults= defines how much inner data to return with the call. For example: /director/.../?filter=4&maxResults=2, will return director object with 2 items in biography array

startIndex

search result page

numeric value

default page returns 5 items

 


Optional Filters


Filter

Entity

Bitwise Values

Item

Relevance

Notes

efilter

entity filter

1

Actor

api searches

 

2

Director

api searches

 

4

Title

api searches

 

8

Quote

api searches

 

tf

title

1

Poster

api searches

 

2

URL

api searches

 

4

Plot

 

 

8

Release Date

 

 

16

Featured Clips

 

 

32

Directors

api searches

 

64

Actors

api searches

 

af

actor

1

Poster

api searches

 

2

URL

api searches

 

4

Bio

 

 

8

Life Dates

 

Date of birth and date of death in Unix time (milliseconds from Jan. 1, 1970.

Delete the last three zeros and use http://www.epochconverter.com/ or other converter to convert to calendar dates.

16

Featured Clips

 

 

32

Roles

api searches

 

df

director

1

Poster

api searches

 

2

URL

api searches

 

4

Bio

 

 

8

Life dates

 

Date of birth and date of death in Unix time (milliseconds from Jan. 1, 1970.

Delete the last three zeros and use http://www.epochconverter.com/ or other converter to convert to calendar dates

16

Featured clips

 

 

32

Title

api searches

 

cf

clip

1

Thumbnail

api searches

 

2

URL

api searches

 

4

Actors

 

 

8

Restrictions

 

 

16

Buy Links

 

 

32

Video URL

 

 

64

Clip Type

 

cult, standard, or memorable

128

Views

 

 

256

No Title

 

 

512

Short URL

 

 

1024

Quotes

api searches

 

Examples

efilter: Actor

Default efilter search is for clips. Use bitwise values and q strings to return for clips containing specific actors, directors, titles, or quotes.

http://apis.anyclip.com/api/search/?cid=[cid]&efilter=1&format=JSON&q=Tom&sig=[sig]

{
    -
    actors: [
        -
        {
            -
            result: [
                -
                {
                    @type: "actor"
                    code: "pjxasVq7o"
                    name: "Tom Cruise"
                    uniqueName: "tom-cruise"
                }
            ]
            totalItemsCount: "139"
        }
    ]
    timeElapsedMs: "6"
}

efilter: Movie Title

efilter 4 = title (movie title)
http://apis.anyclip.com/api/search/?cid=[cid]&efilter=4&format=JSON&q=Tom%20George&sig=[sig]

{
    timeElapsedMs: "5"
    -
    titles: [
        -
        {
            -
            result: [
                -
                {
                    @type: "title"
                    code: "tQ2kXshC8"
                    name: "Curious George"
                    uniqueName: "curious-george"
                }
            ]
            totalItemsCount: "1"
        }
    ]
}

tf: Poster & efilter: Movie Title

http://apis.anyclip.com/api/search/?cid=[cid]&efilter=4&format=JSON&q=gladiator&tf=1&sig=[sig]

If you search without an efilter parameter tf=1 will return poster urls for all clips with the query string in the search fields (quotes, actors, movie, character, scene)

{
    timeElapsedMs: "4"
    -
    titles: [
        -
        {
            -
            result: [
                -
                {
                    @type: "title"
                    code: "tGyjzRLzw"
                    name: "Gladiator"
                    poster: http://img.anyclip.com/posters/tGyjzRLzw_200.jpg
                    uniqueName: "gladiator"
                }
            ]
            totalItemsCount: "1"
        }
    ]
}

tf: URL & efilter: Movie Title

Returns the clip url in the AnyClip site and not poster url
http://apis.anyclip.com/api/search/?cid=[cid]&efilter=4&format=JSON&q=gladiator&sig=[sig]

{
    timeElapsedMs: "4"
    -
    titles: [
        -
        {
            -
            result: [
                -
                {
                    @type: "title"
                    code: "tGyjzRLzw"
                    name: "Gladiator"
                    uniqueName: "gladiator"
                    url: http://anyclip.com/movies/gladiator/
                }
            ]
            totalItemsCount: "1"
        }
    ]
}



Generic Search Based on Type

 Generic searches by type are supported for actors, directors, titles, and clips.

A number of generic search examples follow the parameter table.

Method

ID

Bitwise Value

Item

/actor/

/[name or code]/

1

Poster

2

URL

4

Bio

8

Life Dates

16

Featured Clips

32

Roles

/director/

/[name or code]/

1

Poster

2

URL

4

Bio

8

Life dates

16

Featured clips

32

Title

/title/

/[code]/

1

Poster

2

URL

4

Plot

8

Release Date

16

Featured Clips

32

Directors

64

Actors

/clip/

/[name or code]/

1

Thumbnail

2

URL

4

Actors

8

Restrictions

16

Buy Links

32

Video URL

64

Clip Type

128

Views

256

No Title

512

Short URL

1024

Quotes

Examples

Title: Featured Clips (Collapsed View)

A /title/ search with a featured clips parameter (filter=16) will return all of the clips in that movie (see the expanded view example below).

http://apis.anyclip.com/api/title/tGyjzRLzw/?cid=[cid]&filter=16&format=JSON&sig=[sig]

{
    code: "tGyjzRLzw"
    +
    featured: [ … ]
    name: "Gladiator"
    uniqueName: "gladiator"
}

Featured Clips (Expanded View)

{ "code": "tGyjzRLzw"
, "featured":
  [ { "clipType": "CULT"
    , "code": "F8pW2nuuhu7J"
    , "duration": "58200"
    , "name": "motivational speech"
    , "quotes":
      [ { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "Patres!"
        , "ti": "392100"
        , "to": "393747"
        }

      , { "t": "Maximus!"
        , "ti": "393747"
        , "to": "395395"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "Three weeks from now, I will be harvesting my crops."
        , "ti": "397022"
        , "to": "400692"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "Imagine where you will be, and it will be so."
        , "ti": "400776"
        , "to": "405239"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "Hold the line! Stay with me!"
        , "ti": "406323"
        , "to": "409535"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "If you find yourself alone, riding in green fields with the sun on your face, do not be troubled."
        , "ti": "409618"
        , "to": "419545"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "For you are in Elysium, and you're already dead!"
        , "ti": "419586"
        , "to": "423257"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "Brothers, what we do in life echoes in eternity."
        , "ti": "425592"
        , "to": "433350"
        }

      ]

    , "thumbnail": "http://thumbs.anyclip.com/tGyjzRLzw/tmb_380_480.jpg"
    , "timeIn": "375500"
    , "timeOut": "433700"
    , "uniqueName": "motivational-speech"
    , "urls":
      [ { "type": "Regular"
        , "url": "http://anyclip.com/movies/gladiator/motivational-speech/ "
        }

      ]

    }

  , { "clipType": "CULT"
    , "code": "F8pWu44tbhbJmb"
    , "duration": "120100"
    , "name": "Cult Scene"
    , "quotes":
      [ { "ac": "psYDhn8D4"
        , "c": "Commodus"
        , "t": "You do have a name?"
        , "ti": "5451493"
        , "to": "5453912"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "My name is Gladiator."
        , "ti": "5453912"
        , "to": "5456331"
        }

      , { "ac": "psYDhn8D4"
        , "c": "Commodus"
        , "t": "How dare you show your back to me?"
        , "ti": "5459251"
        , "to": "5461753"
        }

      , { "ac": "psYDhn8D4"
        , "c": "Commodus"
        , "t": "Slave!"
        , "ti": "5461837"
        , "to": "5464256"
        }

      , { "ac": "psYDhn8D4"
        , "c": "Commodus"
        , "t": "You will remove your helmet and tell me your name."
        , "ti": "5464339"
        , "to": "5466383"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "My name is Maximus Decimus Meridius, commander of the armies of the north, general of the Felix Legions,"
        , "ti": "5478312"
        , "to": "5486486"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "Loyal servant to the true emperor, Marcus Aurelius, father to a murdered son, husband to a murdered wife and I will have my vengeance... in this life or the next."
        , "ti": "5486570"
        , "to": "5500083"
        }

      , { "t": "Arms!"
        , "ti": "5506673"
        , "to": "5509801"
        }

      , { "t": "Live! Live! Live! Live! Live! Live!"
        , "ti": "5520938"
        , "to": "5525442"
        }

      , { "t": "Live! Live! Live! Live! Live! Live!"
        , "ti": "5525526"
        , "to": "5531198"
        }

      , { "t": "Live! Live! Live!"
        , "ti": "5533283"
        , "to": "5535953"
        }

      , { "t": "Live! Live! Live! Live!"
        , "ti": "5536036"
        , "to": "5539540"
        }

      ]

    , "thumbnail": "http://thumbs.anyclip.com/tGyjzRLzw/tmb_5450_480.jpg"
    , "timeIn": "5446100"
    , "timeOut": "5566200"
    , "urls":
      [ { "type": "Regular"
        , "url": "http://anyclip.com/movies/gladiator/F8pWu44tbhbJmb/ "
        }

      ]

    }

  , { "clipType": "MEMORABLE"
    , "code": "F8pWtmt77hbJmm"
    , "duration": "120000"
    , "name": "presenting Tigris of Gaul"
    , "quotes":
      [ { "t": "Yes, at the far end."
        , "ti": "6076034"
        , "to": "6077995"
        }

      , { "t": "Senator Gaius."
        , "ti": "6078036"
        , "to": "6079266"
        }

      , { "t": "Hello."
        , "ti": "6079266"
        , "to": "6080497"
        }

      , { "t": "Senator Gracchus."
        , "ti": "6080539"
        , "to": "6082499"
        }

      , { "t": "Don't often see you enjoying the pleasures of the vulgar crowd."
        , "ti": "6084042"
        , "to": "6087421"
        }

      , { "ac": "pjFgb58C8"
        , "c": "Gracchus"
        , "t": "I don't pretend to be a man of the people, Senator."
        , "ti": "6087504"
        , "to": "6090090"
        }

      , { "ac": "pjFgb58C8"
        , "c": "Gracchus"
        , "t": "But I do try to be a man for the people."
        , "ti": "6090174"
        , "to": "6093260"
        }

      , { "t": "Caesar! Caesar! Caesar!"
        , "ti": "6107232"
        , "to": "6110903"
        }

      , { "t": "Caesar! Caesar!"
        , "ti": "6110986"
        , "to": "6112946"
        }

      , { "t": "Caesar! Caesar! Caesar!"
        , "ti": "6112988"
        , "to": "6116742"
        }

      , { "t": "People of Rome!"
        , "ti": "6118952"
        , "to": "6121205"
        }

      , { "t": "On the fourth day of Antioch, we can celebrate the 64th day of the games."
        , "ti": "6123290"
        , "to": "6130130"
        }

      , { "t": "And, in his majestic charity, the Emperor has deigned this day to favor the people of Rome with an historical final match."
        , "ti": "6131298"
        , "to": "6145187"
        }

      , { "t": "Returning to the Colosseum today after five years in retirement, Caesar is pleased to bring you the only undefeated champion..."
        , "ti": "6145270"
        , "to": "6158367"
        }

      , { "t": "Yah! Yah! -in Roman history, the legendary Tigris of Gaul!"
        , "ti": "6158450"
        , "to": "6166166"
        }

      , { "t": "Whoa! Whoa!"
        , "ti": "6181265"
        , "to": "6183475"
        }

      , { "ac": "pK67HSkz3"
        , "c": "Proximo"
        , "t": "He knows too well how to manipulate the mob."
        , "ti": "6187271"
        , "to": "6190774"
        }

      ]

    , "thumbnail": "http://thumbs.anyclip.com/tGyjzRLzw/tmb_6070_480.jpg"
    , "timeIn": "6068800"
    , "timeOut": "6188800"
    , "uniqueName": "presenting-tigris-of-gaul"
    , "urls":
      [ { "type": "Regular"
        , "url": "http://anyclip.com/movies/gladiator/presenting-tigris-of-gaul/ "
        }

      ]

    }

  , { "clipType": "MEMORABLE"
    , "code": "F8pWtJ7m4hbJmm"
    , "duration": "120000"
    , "name": "Maximus fights tigris"
    , "quotes":
      [ { "t": "Come on, finish it!"
        , "ti": "6314189"
        , "to": "6316942"
        }

      , { "t": "No!"
        , "ti": "6342718"
        , "to": "6344011"
        }

      , { "t": "Pull! Pull!"
        , "ti": "6344011"
        , "to": "6345304"
        }

      , { "t": "Aah!"
        , "ti": "6359067"
        , "to": "6361778"
        }

      , { "t": "Yeah!"
        , "ti": "6367367"
        , "to": "6369244"
        }

      , { "t": "Loose! Loose! Loose! Loose!"
        , "ti": "6378504"
        , "to": "6381006"
        }

      , { "t": "Aah!"
        , "ti": "6395562"
        , "to": "6398607"
        }

      ]

    , "thumbnail": "http://thumbs.anyclip.com/tGyjzRLzw/tmb_6290_480.jpg"
    , "timeIn": "6280400"
    , "timeOut": "6400400"
    , "uniqueName": "maximus-fights-tigris"
    , "urls":
      [ { "type": "Regular"
        , "url": "http://anyclip.com/movies/gladiator/maximus-fights-tigris/ "
        }

      ]

    }

  , { "clipType": "MEMORABLE"
    , "code": "F8pWttntmhtJb"
    , "duration": "62100"
    , "name": "uniting with the memory"
    , "quotes":
      [ { "ac": "pnqqe55g7"
        , "c": "Juba"
        , "t": "Can they hear you?"
        , "ti": "6695279"
        , "to": "6697698"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "Who?"
        , "ti": "6700742"
        , "to": "6702661"
        }

      , { "ac": "pnqqe55g7"
        , "c": "Juba"
        , "t": "Your family, in the afterlife."
        , "ti": "6702744"
        , "to": "6705747"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "Oh, yes."
        , "ti": "6707249"
        , "to": "6708458"
        }

      , { "ac": "pnqqe55g7"
        , "c": "Juba"
        , "t": "What do you say to them?"
        , "ti": "6708458"
        , "to": "6709668"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "To my boy,"
        , "ti": "6713589"
        , "to": "6715883"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "I tell him I will see him again soon."
        , "ti": "6715924"
        , "to": "6718177"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "To keep his heels down when he's riding his horse."
        , "ti": "6718260"
        , "to": "6722764"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "To my wife-"
        , "ti": "6724433"
        , "to": "6726351"
        }

      , { "ac": "pekxrR78V"
        , "c": "Maximus"
        , "t": "That is not your business."
        , "ti": "6728270"
        , "to": "6730564"
        }

      , { "ac": "psYDhn8D4"
        , "c": "Commodus"
        , "t": "And now they love Maximus for his mercy."
        , "ti": "6737905"
        , "to": "6740949"
        }

      ]

    , "thumbnail": "http://thumbs.anyclip.com/tGyjzRLzw/tmb_6680_480.jpg"
    , "timeIn": "6676000"
    , "timeOut": "6738100"
    , "uniqueName": "uniting-with-the-memory"
    , "urls":
      [ { "type": "Regular"
        , "url": "http://anyclip.com/movies/gladiator/uniting-with-the-memory/ "
        }

      ]

    }

  ]

, "name": "Gladiator"
, "uniqueName": "gladiator"
}

Actor: Unique Name, Life Dates

Unique Names. In general unique names are generated by replacing all the spaces in the entity with a hyphen and the entire string to lower case letters. Entities may be an actor, director, title, or clip. However, if there are two entities with the same name they will have different unique name. The best way to retrieve an entity's unique name is to search for the entity and locate the unique name in the search results.

Life Dates. Life dates are returned in milliseconds relative to Jan. 1, 1970 (Unix time) Negative numbers indicate time before Jan. 1, 1970. See http://en.wikipedia.org/wiki/Unix_time.

http://apis.anyclip.com/api/actor/tom-hanks/?cid=[cid]&filter=8&format=JSON&sig=[sig]

{
    birthDate: "-425444400000"
    code: "pxHP2FIR3"
    name: "Tom Hanks"
    uniqueName: "tom-hanks"
}
To convert Unix Time to a calendar date, delete the trailing three zeros if the your converter takes inputs in seconds instead of milliseconds. Using this method, http://www.epochconverter.com/ correctly converts -425444400 to Monday, July 09, 1956.

Actor: Biography

http://apis.anyclip.com/api/actor/tom-hanks/?cid=[cid]&filter=4&format=JSON&sig=[sig]

{
    -
    bios: {
        source: http://www.freebase.com/view/en/tom_hanks
        text: "<p>Thomas Jeffrey "Tom" Hanks is an American film actor, director, voice-over artist, writer and film producer. Hanks worked in television and family-friendly comedies before achieving success as a dramatic actor portraying several notable roles, including Andrew Beckett in Philadelphia, the title role in Forrest Gump, Commander James A. Lovell in Apollo 13, Captain John H. Miller in Saving Private Ryan, Michael Sullivan in Road to Perdition, and Sheriff Woody in Disney/Pixar's Toy Story. Hanks is the third most successful actor in terms of box office totals, which exceed $3.3 billion.</p>"
        type: "Freebase"
    }
    code: "pxHP2FIR3"
    name: "Tom Hanks"
    uniqueName: "tom-hanks"
}


Comments