API v4 Documentation

Endpoints Code Lookup

← All endpoints

pitchfx

game MLB,MiLB

A query to this endpoint without any range parameters will return a list of recent pitches in reverse chronological order. Results can be filtered by season, player, game, team, date or date range.

Please note that this endpoint can be used synonymously as pitchfx.

MLB Pitch Data on 8/15/2023
https://api4.natst.at/xxxx-xxxxxx/pitchfx/mlb/2023-08-15 Download sample

Parameters

Range

NameRequiredTypeDescription
dataformat optional range Controls the data format by which query results are returned. Acceptable values are xml, json or php. The default value is json. Example: https://api4.natst.at/xxxx-xxxxxx/pitchfx/nba/xml
season optional range A valid season code (the year when a particular season completes) in YYYY format. A list of available values can be retrieved from the seasons endpoint. Example: https://api4.natst.at/xxxx-xxxxxx/pitchfx/nba/2025
date optional range A date in YYYY-MM-DD format. Example: https://api4.natst.at/xxxx-xxxxxx/pitchfx/nba/2025-03-23
daterange optional range Two dates in YYYY-MM-DD format. Any additional dates beyond two will be ignored. Example: https://api4.natst.at/xxxx-xxxxxx/pitchfx/nba/2025-03-23,2025-03-30
teamcode optional range A two to eight-character code for a team. A list of available values can be retrieved from the /teamcodes endpoint or the lookup below. Example: https://api4.natst.at/xxxx-xxxxxx/pitchfx/nba/XXX
leaguecode optional range A two to eight-character code for a league. A list of available values can be retrieved from the /leaguecodes endpoint or the lookup below. Example: https://api4.natst.at/xxxx-xxxxxx/pitchfx/eurobb/XXX
search optional range If a comma-separated value is none of the above, the API will assume it is a search term. The system will only accept the first entry in a string as a search term. Example: https://api4.natst.at/xxxx-xxxxxx/pitchfx/nba/XXX

Path

NameRequiredTypeDescription
endpoint required path The API endpoint to query. This must be the second path parameter. Example: https://api4.natst.at/xxxx-xxxxxx/pitchfx/...