Search Media By Keyword or UUIDs

get

Search Media By Keyword or UUIDs

Perform a search on all Media based on keyword or uuids as searchType parameter. The query parameters include: category, types of media (e.g. image, video, document), orientation and sort. You will get result of all types of media such as image, video and document.

Resource URL

https://api.stb.gov.sg /media/common/v2/search

Header Parameters

Name Values Description
Content-Type
(required)

Format of the request body sent. Accepts only application/json.

Query Parameters

Name Values Description
searchType
(required)

Search type (keyword, uuids)
Validation: acceptable value

searchValues
(required)

For searchType using keyword:
Provide keyword(s) to look for within name, description and tags when performing the search function.
Max: 255 characters

For searchType using uuids:
Attribute used to uniquely identify Media. This API allows the retrieval of multiple uuids. Use comma as separator for multiple uuids.
Validation: valid uuid(s).
E.g. uuid1,uuid2

category

Applicable for searchType using keyword
Category of Media. Possible value(s): [accommodation, attractions, bars_clubs, cruises, event, food_beverages, mice_event, precincts, shops, tours, venues, walking_trails].
Note that events value is for Leisure Events category, and mice_events value is for MICE Events category.
Default is to return all media categories. Accepts one or more comma-delimited string of categories.
Validation: acceptable category value

mediaType

Applicable for searchType using keyword.
Type of media to search for [3dmodel, image, video, document]
Default is to return all types of media.
Validation: acceptable type of media

orientation

Applicable for searchType using keyword.
Orientation Type [portrait | landscape | square]. Only applicable for image media type.

sort

Applicable for searchType using keyword.
Field name to sort [name | tags | updateddate].
Validation: Acceptable value

sortOrder

Applicable for searchType using keyword.
Sort order [asc | desc].
Validation: acceptable sort order value

offset

Applicable for searchType using keyword.
The position to return from the results.
By specifying offset, you retrieve a subset of records starting with the offset value. Offset works with limit, which determines how many records to retrieve starting from the offset.
If offset value exceeds the total number of records, the response will be empty.
Default value: 0 (starts from first record).
Validation: integer

limit

Applicable for searchType using keyword.
Maximum number of data records to return in a response.
Default set to 20, with maximum of 50. If the limit value exceeds the maximum, the response will return 50 data records.
Validation: integer

Try it out

HTTP Basic

OAuth 2.0

API Key

RESET

Make a request and see the response.

Make a request and see the response.

Make a request and see the response.

Response Error Details

HTTP Code Description
400 Bad Request — Request was not accepted and could be due to malformed parameter (e.g. spelling error) or missing a required parameter.
401 Unauthorised — API key is invalid or was not provided.
403 Forbidden — API key does not have the permission to perform the request.
404 Resource Not Found — Requested resource (i.e. the resource URL) does not exist.
405 Method Not Allowed — The HTTP request method is not supported by the resource.
406 Not Acceptable — Requester's acceptable content type for the response does not match the content type returned by the resource.
414 Request URL Too Long — Request URL exceeded the maximum acceptable URL length.
415 Unsupported Media Type — Request's format is not supported by the resource.
422 Unprocessable Entity — Request was not accepted, often due to semantic errors, such as data format.
500 Server Errors — Something is not working on TIH's end, happened very rarely.

Resource Summary

Security Category

Media

Working...