ESPN API icon

ESPN API

Consume ESPN Public API for sports data

Overview

This node interacts with the ESPN public API to retrieve a list of MLB teams. It allows users to specify a limit on the number of teams returned and optionally filter results by additional fields such as week number or groups. This is useful for applications needing up-to-date team information for MLB, such as sports analytics, fantasy leagues, or sports news aggregation.

Use Case Examples

  1. Retrieve up to 50 MLB teams for display in a sports app.
  2. Fetch MLB teams filtered by specific groups for targeted analysis.

Properties

Name Meaning
Limit Maximum number of MLB teams to return in the response.
Additional Fields Optional filters to refine the team list, including week number and groups (comma-separated).

Output

JSON

  • ``
    • teams - Array of team objects returned by the ESPN API, each representing an MLB team with details.

Dependencies

  • Requires access to the ESPN public API via HTTP GET requests.

Troubleshooting

  • Common issues include network errors or invalid parameters leading to failed API requests.
  • Error messages from the ESPN API or HTTP request failures will be thrown as node errors unless 'Continue On Fail' is enabled, in which case errors are returned in the output array.

Links

Discussion