Skip to content
datasportsAPI

SearchSearch

Documentation

/

Type to filter the docs by title or path.

SearchEndpoint 106 of 116

Search

GET

/v2/search

Plan
All plans
Auth
Bearer dsa_live_…
Parameters
1 required · 2 optional
Returns
SearchResult[]

A single search over teams (individual competitors included), players, managers, referees, leagues, fixtures, venues, racing series and races.

Each hit’s type names the endpoint family its id is valid for — /v2/teams, /v2/players, /v2/leagues, /v2/managers, /v2/referees, /v2/series, /v2/races or /v2/fixtures (venue ids are covered in the note). Player hits include the player’s current team; fixture hits include the teams, league, start time and status; venue hits include city, country and capacity.

Worth knowing

  • This API models every competitor as a team, so tennis players and other individual-sport athletes are returned with type team.
  • type is a closed set — manager, referee, series and race were added on 2026-10-24, fixture and venue on 2026-11-04 — so ignore any value your client does not recognise.
  • Three fields depend on the type and are null for all others: venue (a Venue), team (the player’s current team, as a TeamRef) and fixture ({ home, away, league, startTime, status }, with status as the coarse StatusType — the score and the rest come from /v2/fixtures/{id}).
  • Venue hit ids work with /v2/venues/{id} and match the id in Fixture.venue and TeamDetail.venue.
  • Since 2026-11-04 team hits include gender (male | female | mixed, matching TeamDetail), which lets you mark a women’s team without a call to /v2/teams/{id}; it is null for every other type.
  • Venue hits come from a separate search at the source and are merged in by relevance.
  • Passing type (since 2026-11-09) restricts the list to that type, returns 20 hits per page and reaches much further than the mixed list: ask for ?q=smith&type=player and pages go up to 50; hasNextPage stays true as long as a page is full.
  • type=series comes from the mixed list and is therefore a single page — the source offers no paged search for series.
  • Managers and referees also get image, a photo on our CDN (since 2026-11-04; null if the source has none); series, races, fixtures and venues always have image null.

01Parameters

  • qqueryRequired

    text to search for: 2–100 characters once trimmed and free of control characters, otherwise a 400 names q as the problem

  • typequeryOptional

    limits hits to one type — team \| player \| league \| manager \| referee \| series \| race \| fixture \| venue — at 20 per page; leave it out for the single-page mixed list

  • pagequeryOptional

    page number from 0 to 50 (defaults to 0); a page above 0 needs a type other than series

02Request

The same call from the command line and each SDK. The SDK lines assume a client created with your key; left out, it is read from DATASPORTSAPI_API_KEY. Installing a client: SDKs & CLI.

curl -H "Authorization: Bearer dsa_live_…" \
    "https://api.datasportsapi.com/v2/search?q=…"

03Response

The top-level keys of the JSON body. Each object links to its full shape in the data reference.

data
SearchResult[]
meta
query, type, page, count, hasNextPage
Example response
{ "data": [ { "type": "player", "id": 3759, "name": "Bukayo Saka", "slug": "bukayo-saka",
    "sport": "football", "gender": null, "image": "https://cdn.datasportsapi.com/v2/players/3759/photo",
    "team": { "id": 18, "name": "Arsenal", "slug": "arsenal", "shortName": null, "code": "ARS",
      "image": "https://cdn.datasportsapi.com/v2/teams/18/logo" }, "fixture": null, "venue": null },
    { "type": "team", "id": 4021, "name": "Arsenal", "slug": "arsenal", "sport": "football", "gender": "female",
      "image": "https://cdn.datasportsapi.com/v2/teams/4021/logo", "team": null, "fixture": null, "venue": null }, … ],
  "meta": { "query": "saka", "type": null, "page": 0, "count": 20, "hasNextPage": false } }

// ?q=smith&type=player&page=1 — players only, 20 a page
{ "data": [ { "type": "player", "id": 51102, "name": "Emile Smith Rowe", … }, … ],
  "meta": { "query": "smith", "type": "player", "page": 1, "count": 20, "hasNextPage": true } }

// ?q=mourinho
{ "data": [ { "type": "manager", "id": 794950, "name": "José Mourinho", "slug": "jose-mourinho", "sport": "football", "image": null,
    "team": null, "fixture": null, "venue": null }, … ],
  "meta": { "query": "mourinho", "type": null, "page": 0, "count": 3, "hasNextPage": false } }

// ?q=camp nou — venues (/v2/venues/{id}) and fixtures
{ "data": [
    { "type": "venue", "id": 812, "name": "Spotify Camp Nou", "slug": "spotify-camp-nou", "sport": null, "image": null,
      "team": null, "fixture": null,
      "venue": { "id": 812, "name": "Spotify Camp Nou", "city": "Barcelona", "country": { "code": "ES", "name": "Spain" }, "capacity": 62652 } },
    { "type": "fixture", "id": 701233, "name": "Barcelona - Real Madrid", "slug": "barcelona-real-madrid", "sport": "football", "image": null,
      "team": null, "venue": null,
      "fixture": { "home": { "id": 21, "name": "Barcelona", … }, "away": { "id": 19, "name": "Real Madrid", … },
        "league": { "id": 8, "name": "LaLiga", … }, "startTime": "2026-10-26T15:15:00.000Z", "status": "finished" } }, … ],
  "meta": { "query": "camp nou", "type": null, "page": 0, "count": 5, "hasNextPage": false } }

04Errors

  • 400bad_request

    q is absent, type is not recognised, page is not within 0–50, or page is above 0 while type is missing or set to series

Any key can also meet401unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code