Media Search allows you to search our database of copyright-protected content for visual matches to a query image or video. You can read more about our Media Search product in our Media Search Guide
Authentication
Each Media Search project has a unique API key that will need to be included in the API request. The API key will be sent via email after signing up for the project.
Include the API Key in the header of your POST request ('authorization: token <YOUR_API_KEY>').
Make a Query
https://api.thehive.ai/api/v2/task/sync
https://api.thehive.ai/api/v2/task/async
Form Data
Field (*required) | Type | Description |
---|---|---|
url | String | Image or video url (publicly hosted media) |
media | File | Image or video file (jpg, png, webp, gif, mp4, webm, avi, flv, mkv, mpg, wmv, mov) |
callback_url* (for async API requests) | String | Callback url where we will post Success/Failure response and query results. Only required for async requests |
Query API Sample Response
//some fields truncated for clarity
{
//truncated
"output": {[
{
"sha_hash": "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad",
"metadata": {'imdb_id': 'tt1848620', 'type': 'TV_SHOW','name': 'the_office','season': '7', 'episode_no': '24'},
"matches": [
{
"query_timestamp": 3,
"matching_timestamp": 3,
"similarity_score": 1.00
},
...
]
},
]}
}