Skip to main content
GET
/
search
Search
curl --request GET \
  --url https://v1.basketball.sportsapipro.com/search \
  --header 'x-api-key: <api-key>'

Overview

Search for basketball entities including competitions, teams (competitors), and players (athletes) by name.

Query Parameters

query
string
required
Search query (e.g., β€œLakers”, β€œLeBron”)
filter
string
default:"all"
Filter type: all, competitions, competitors, athletes

Code Examples

curl -X GET "https://v1.basketball.sportsapipro.com/search?query=Lakers" \
  -H "x-api-key: YOUR_API_KEY"

Filter by Type

# Search only for players
curl -X GET "https://v1.basketball.sportsapipro.com/search?query=LeBron&filter=athletes" \
  -H "x-api-key: YOUR_API_KEY"

Response Structure

competitions
array
Matching competitions
competitors
array
Matching teams
athletes
array
Matching players
Use the filter parameter to narrow results to a specific entity type for faster, more focused searches.

Authorizations

x-api-key
string
header
required

Your SportsAPI Pro API key

Query Parameters

query
string
required

Search query

Example:

"Lakers"

filter
enum<string>
default:all

Filter type: all, competitions, competitors, athletes

Available options:
all,
competitions,
competitors,
athletes

Response

200

Search results retrieved successfully