# SofaScore pre-match form and streaks API

Get SofaScore Pre-Match Form data via REST or OpenAny MCP—with pay-per-use pricing, no subscription, and no proxies required. Powered by Apish, pass parameters such as event_id, output, raw, and retrieve structured data including requested SofaScore event identifier, general statistical streak description, and name to render pre-match form badges, highlight editorial talking points, and enrich odds and preview pages.

Documentation: https://openany.si/sofascore/sofascore-pre-match-form-and-streaks-api/924c9f1b-508b-4f5b-8133-87d03f6affbb/
API ID: 924c9f1b-508b-4f5b-8133-87d03f6affbb
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/sofascore/v1/event/form
Page update time: 2026-12-03T02:55:26.255Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:55:25.617Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## SofaScore Pre-Match Form API

Pass event\_id as a SofaScore numeric ID or match URL to pull pre-match context. The response pairs pregame\_form (homeTeam and awayTeam form arrays, avgRating, position and points value) with team\_streaks.general\[\] and team\_streaks.head2head\[\].

## What You Can Build

- **Render pre-match form badges**: Display W/D/L sequences, table positions and average ratings side by side.
- **Highlight editorial talking points**: Surface team\_streaks.general\[\] and head2head\[\] trends like unbeaten runs or both-teams-to-score streaks.
- **Enrich odds and preview pages**: Combine pre-match streaks with Event Odds and Head-to-Head APIs for comprehensive match previews.

## Returned Data

| Field | Meaning |
| --- | --- |
| `event_id` | Requested SofaScore event identifier |
| `pregame_form.label` | Form summary label such as Pts |
| `pregame_form.homeTeam.avgRating` | Home team average SofaScore rating |
| `pregame_form.homeTeam.position` | Home team current competition rank |
| `pregame_form.homeTeam.form` | Recent home team W/D/L form sequence |
| `pregame_form.awayTeam.avgRating` | Away team average SofaScore rating |
| `pregame_form.awayTeam.form` | Recent away team W/D/L form sequence |
| `team_streaks.general[].name` | General statistical streak description |
| `team_streaks.general[].value` | Streak length or ratio value |
| `team_streaks.head2head[].name` | Head-to-head statistical streak description |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "SofaScore pre-match form and streaks API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "event_id": {
          "type": "string",
          "description": "SofaScore event id or a match link (sofascore.com/football/match/liverpool-arsenal/HQfh#id:16363907). 16363907 = Liverpool v Arsenal, Premier League 26/27."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      },
      "required": [
        "event_id"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "cached": {
      "type": "boolean"
    },
    "credits_used": {
      "type": "integer"
    },
    "event_id": {
      "type": "integer"
    },
    "fetched_at": {
      "type": "string"
    },
    "pregame_form": {
      "type": "object",
      "properties": {
        "awayTeam": {
          "type": "object",
          "properties": {
            "avgRating": {
              "type": "string"
            },
            "form": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "position": {
              "type": "integer"
            },
            "value": {
              "type": "string"
            }
          }
        },
        "homeTeam": {
          "type": "object",
          "properties": {
            "avgRating": {
              "type": "string"
            },
            "form": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "position": {
              "type": "integer"
            },
            "value": {
              "type": "string"
            }
          }
        },
        "label": {
          "type": "string"
        }
      }
    },
    "team_streaks": {
      "type": "object",
      "properties": {
        "general": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "continued": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "team": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            }
          }
        },
        "head2head": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "continued": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "team": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/sofascore/v1/event/form?event_id=16363907&output=json&raw=0' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "cached": false,
  "credits_used": 1,
  "event_id": 16363907,
  "fetched_at": "2026-11-19T12:22:59.536Z",
  "pregame_form": {
    "awayTeam": {
      "avgRating": "7.76",
      "form": [
        "W",
        "L",
        "W",
        "W",
        "W"
      ],
      "position": 2,
      "value": "21"
    },
    "homeTeam": {
      "avgRating": "7.56",
      "form": [
        "D",
        "W",
        "L",
        "W",
        "W"
      ],
      "position": 5,
      "value": "15"
    },
    "label": "Pts"
  },
  "team_streaks": {
    "general": [
      {
        "continued": false,
        "name": "Wins",
        "team": "home",
        "value": "5"
      },
      {
        "continued": false,
        "name": "Both teams scoring",
        "team": "home",
        "value": "4/5"
      },
      {
        "continued": true,
        "name": "First to score",
        "team": "away",
        "value": "4/5"
      },
      {
        "continued": false,
        "name": "Less than 4.5 cards",
        "team": "both",
        "value": "4/5"
      }
    ],
    "head2head": [
      {
        "continued": false,
        "name": "No losses",
        "team": "home",
        "value": "5"
      },
      {
        "continued": false,
        "name": "Less than 4.5 cards",
        "team": "both",
        "value": "4/5"
      },
      {
        "continued": false,
        "name": "Less than 10.5 corners",
        "team": "both",
        "value": "9/10"
      }
    ]
  }
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### What does pregame_form.homeTeam.form contain?
It contains an array of recent match result codes (such as W, D, L) representing the team's recent form sequence.

### What is the difference between team_streaks.general and team_streaks.head2head?
general covers each team's recent streaks across all opponents, while head2head covers streaks specifically in meetings between the two teams.

### Can event_id be a SofaScore match link?
Yes. Pass either a numeric event ID or a full SofaScore match URL.

### Where can I retrieve available past meetings?
Use the SofaScore Head-to-Head API for returned past fixtures between the sides; source coverage does not guarantee a complete history.

### How do I refresh form data right before kickoff?
Pass fresh=1 to bypass the 24-hour cache.

### Can I trim response fields or request CSV?
Output is JSON only. Pass raw=0 to omit raw source blocks or use fields to select specific keys.

## Available implementations
- apish: https://openany.si/sofascore/sofascore-pre-match-form-and-streaks-api/924c9f1b-508b-4f5b-8133-87d03f6affbb/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
