curl --request GET \
--url https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/eventsimport requests
url = "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/events"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/events"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/events")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"slug": "<string>",
"title": "<string>",
"teamA": {
"code": "<string>",
"label": "<string>",
"logo": "<string>"
},
"teamB": {
"code": "<string>",
"label": "<string>",
"logo": "<string>"
},
"matchedVia": "title",
"kind": "match",
"competition": {
"name": "<string>",
"slug": "<string>",
"logo": "<string>"
},
"scheduledAt": "2023-11-07T05:31:56Z",
"imageUrl": "<string>",
"closesAt": "2023-11-07T05:31:56Z",
"live": true,
"finished": true
}
],
"hasMore": true,
"nextOffset": 123,
"didYouMean": "<string>",
"suggestion": "<string>",
"suggestionCount": 123,
"suggestions": [
"<string>"
]
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 404,
"error": {
"code": "<string>",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 404,
"error": {
"code": "<string>",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}Paginated event search
Combines title / team / tag-driven hits and word-start matches (every query word as a word start in the title, sides, teams, competition or live tags, any order, accents ignored), plus typo look-alikes (matchedVia: 'fuzzy', ranked below every exact hit) when fewer than 20 events match by words and a query word has 4 or more characters (not when a synonym, typed as it is or read from a typo, already matches an event this search lists, open or finished; RND-4711, RND-4766, RND-4773), deduped by event id with the strongest match reason kept on matchedVia. Returns an empty page in 0x mode. A query that contains a known synonym (RND-3864; for example man utd, bitcoin) also matches events that have the target words (manchester united, btc) as whole words; a target of several words must appear as that phrase (man utd does not match Manchester City vs Leeds United; RND-4711). The same holds when the query types such a target in full: manchester united needs those words together (or written as one word: la liga also matches LaLiga), so it no longer matches Manchester City vs Leeds United (RND-4765). A query word read as a typo of a known synonym (bitcion) is searched as the query typed right (bitcoin): it lists and ranks events, and keeps or drops typo look-alikes, exactly as that query does (RND-4766). No typo look-alikes and no typo correction when the query is spelled right: at least one event of the open / finished view the request lists holds every typed word (other filters not applied), each word of 4 or more characters as a whole word, a long-dated crypto series counted once; a query with no word of 4 or more characters is not checked this way (RND-5647). With 1 to 4 such events a typo fix that finds more events can still be offered as suggestion (never as rows or didYouMean); with 5 or more no typo matching runs. A typo correction (didYouMean) belongs to the query and is the same on every search endpoint and kind: per typo word, the closest word of a typo hit, preferring one within 1 edit (up to 7 letters) or 2 edits (8 or more), else the most similar word unless the typed word itself appears in an event, the correction fixing the most words within that reach winning, then the fewest edits (madird → madrid); a synonym the query typed is never corrected, and typo matching also reads the query through its synonyms (bitcoin decmber → bitcoin december; RND-5620). Admits the events /api/events?q= lists (RND-3865): the open view, plus the finished events when the query has a run of 3 letters or digits (an event whose every market is voided is left out). Ordered as /api/events?q= with no sort: match group, then live and trading > other open > finished, then the start time nearest to now, then the match rank (title before team), then title similarity. didYouMean, suggestion and suggestionCount (RND-4243) are set on the first page only; suggestions (RND-4249) only on an empty first page.
curl --request GET \
--url https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/eventsimport requests
url = "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/events"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/events"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/events")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/search/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"slug": "<string>",
"title": "<string>",
"teamA": {
"code": "<string>",
"label": "<string>",
"logo": "<string>"
},
"teamB": {
"code": "<string>",
"label": "<string>",
"logo": "<string>"
},
"matchedVia": "title",
"kind": "match",
"competition": {
"name": "<string>",
"slug": "<string>",
"logo": "<string>"
},
"scheduledAt": "2023-11-07T05:31:56Z",
"imageUrl": "<string>",
"closesAt": "2023-11-07T05:31:56Z",
"live": true,
"finished": true
}
],
"hasMore": true,
"nextOffset": 123,
"didYouMean": "<string>",
"suggestion": "<string>",
"suggestionCount": 123,
"suggestions": [
"<string>"
]
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 404,
"error": {
"code": "<string>",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 404,
"error": {
"code": "<string>",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}Query Parameters
Response
OK
RND-3864. Set on the first page (offset 0) when the events came only from a synonym (man utd → manchester united) or the typo fallback (antropic → anthropic): the query they answer. null when the query matched by itself, on an empty page, on every later page, and in 0x mode. When a query word was read as a typo of a known synonym (RND-4766), the query is searched as typed right and didYouMean is that corrected query (bitcion price → bitcoin price) whenever its own words or synonyms find an event (on the pages where it is set). Only the typo word is replaced: every other word keeps what was typed, case, accents and punctuation included (Bitcion: $100k? → bitcoin: $100k?; RND-5467). RND-5620: a typo correction is the query's own, the same on every search endpoint and kind (madird → madrid); a synonym the query typed is never corrected (bitcoin decmber → bitcoin december). RND-5647: no typo correction for a query spelled right (at least one event the view lists holds every typed word).
RND-4249. Chips for a zero-result answer, at most 5, each a query of 1–64 characters to search next: the query's own words of 3 or more characters that find events alone (for a query of two or more words; never a typo match), then popular searches that share one of those words, then tags of the events those words find. Words and popular searches are lower-case; tags keep their name. Empty otherwise, and when none is found. When the chips could not all be read in time the answer is sent with Cache-Control: no-store, so a retry can fill them. Filled only on an empty first page (offset 0); always empty in 0x mode.