With the Veritone Search API, you can search for media stored in Veritone's database. This user guide explains how to search for a string in transcripts.
Before you begin
Steps
- Ensure your endpoint's base URL matches your region. For the United States, the base URL is https://api.veritone.com/v3/graphql. For Europe, the base URL is https://api.uk.veritone.com/v3/graphql.
- In Veritone's GraphQL playground or another application, run your query.
[Note] To learn how to search other types of media, see Field values.
query{
searchMedia(search:{
index: ["global"]
query: {
field: "text-recognition.series.ocrtext"
operator: "query_string"
value: "computer"
}
limit: 5
}){
jsondata
}
}
The response looks like this.
[Note] This is a fragment of the response.
"startDateTime": 1658146980,
"stopDateTime": 1658147040,
"hits": [
{
"text-recognition": {
"series": [
{
"start": 191000,
"end": 192000,
"boundingPoly": [
{
"x": 106,
"y": 44
},
{
"x": 164,
"y": 45
},
{
"x": 164,
"y": 71
},
{
"x": 106,
"y": 70
}
],
"ocrtext": "Small Buss Pay \n O \n https://www.surepayroll.com \n SUREPAYROLL \n A PATCHER COMPANY \n SMALL BUSINESS IS \n OUR BUSINESS. \n We started 20 years ago with a mission to serve America's small \n businesses, and that mission is even more critical in these \n times. That's why we're giving you 1 month free.\" \n SEE PLANS & PRICING \n Inc. \n Small Business \n TRENDS \n CNNMoney \n Small Business \n AS FEATURED IN: \n FOX \n Cons \n Nanny & Household \n Benefits & HR Accountants \n ‚úì \n TC TechCrunch \n SUSA \n TODAY \n PLANS & PRICING \n FASTOMPANY \n Payroll you can set up and run yourself - in minutes. \n Payroll is a big job-but that doesn't mean it needs to be a big job for you. Our online payroll is easy to set up, fast to learn, and runs from \n your computer or smartphone in minutes. \n B \n A \n D \n 2 \n DOW FUT (SEP) +274.00 | DOW FV \n 2.26 DOW CLOSE 31,288.26 CNBC 5:22A PACIFIC \n 48.8 WTI Crude (Aug'22) 99.71 ULSD Heating Oil (Aug'22) 3.7| DOW IMPLIED OPEN \n 1.43 \n Marathon Digital Holdings Inc (MARA) 8.50 ‚ñ≤0.46 Seage +271.74",
"hits": [
{
"queryTerm": "computer"
}
]