# Get Broadcasts Count

## Count Broadcasts

> Returns the total number of broadcast records matching the given filters. Accepts the same filter parameters as the search endpoint but returns only a count, without pagination or result data.

```json
{"openapi":"3.1.0","info":{"title":"PredictHQ Broadcasts API","version":"1.0.0"},"tags":[{"name":"Broadcasts API"}],"servers":[{"url":"https://api.predicthq.com"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"$API_KEY","description":"Enter your PredictHQ API key. The Bearer prefix is added automatically.\n\nWhen calling the API directly, send: `Authorization: Bearer <YOUR_API_KEY>` as documented at [https://docs.predicthq.com/api/overview/authenticating](https://docs.predicthq.com/api/overview/authenticating)\n"}},"schemas":{"BroadcastCountResponse":{"type":"object","properties":{"count":{"description":"The total number of broadcast records matching the query.","type":"integer","title":"Count"}},"required":["count"],"title":"BroadcastCountResponse"},"ErrorResponse":{"type":"object","properties":{"error":{"description":"Error message","type":"string","title":"Error"}},"required":["error"],"title":"ErrorResponse"},"HTTPValidationError":{"type":"object","properties":{"error":{"description":"Error summary message","type":"string","title":"Error"},"details":{"description":"List of validation error details","type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDetail"},"title":"Details"}},"required":["error","details"],"title":"HTTPValidationError"},"ValidationErrorDetail":{"type":"object","properties":{"field":{"description":"The field that failed validation","type":"string","title":"Field"},"msg":{"description":"The validation error message","type":"string","title":"Message"},"type":{"description":"The type of validation error","type":"string","title":"Error Type"}},"required":["field","msg","type"],"title":"ValidationErrorDetail"},"QueryValidationError":{"type":"object","properties":{"error":{"description":"List of query parameter validation errors","type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDetail"},"title":"Error"}},"required":["error"],"title":"QueryValidationError"}}},"paths":{"/v1/broadcasts/count/":{"get":{"operationId":"count_broadcasts","summary":"Count Broadcasts","description":"Returns the total number of broadcast records matching the given filters. Accepts the same filter parameters as the search endpoint but returns only a count, without pagination or result data.","parameters":[{"name":"broadcast_id","in":"query","description":"Find broadcasts by unique identifier. \n\nMultiple values are accepted as a comma-separated list.","required":false,"schema":{"type":"array","items":{"type":"string"},"title":"Broadcast Id"}},{"name":"record_status","in":"query","description":"Find broadcasts by their record status. Multiple values are accepted as a comma-separated list. Defaults to `active`.\n\n\nPossible values:\n- `active`: the broadcast record is valid.\n- `deleted`: the broadcast record is no longer valid.\n- `duplicate`: the broadcast record is a duplicate of an active record.","required":false,"schema":{"type":"array","items":{"type":"string","enum":["active","deleted","duplicate"]},"default":["active"],"title":"Record Status"}},{"name":"broadcast_status","in":"query","description":"The schedule status of the broadcast.\n\n\nPossible values:\n- `scheduled`: the broadcast is scheduled to be televised.\n- `predicted`: the broadcast is predicted to be televised.\n- `cancelled`: the broadcast is no longer scheduled to be televised.\n\n\nOur guide on [different sport types](https://docs.predicthq.com/getting-started/guides/live-tv-event-guides/find-broadcasts-for-specific-sport-types) in the API explains when the scheduled and predicted statuses are used.","required":false,"schema":{"type":"array","items":{"type":"string","enum":["cancelled","predicted","scheduled"]},"title":"Broadcast Status"}},{"name":"start.gt","in":"query","description":"Find broadcasts by their start time: greater than.\n\nFormat: YYYY-MM-DD or YYYY-MM-DDThh:mm:ss","required":false,"schema":{"type":"string","title":"Start.Gt"}},{"name":"start.gte","in":"query","description":"Find broadcasts by their start time: greater than or equal to.\n\nFormat: YYYY-MM-DD or YYYY-MM-DDThh:mm:ss","required":false,"schema":{"type":"string","title":"Start.Gte"}},{"name":"start.lt","in":"query","description":"Find broadcasts by their start time: less than.\n\nFormat: YYYY-MM-DD or YYYY-MM-DDThh:mm:ss","required":false,"schema":{"type":"string","title":"Start.Lt"}},{"name":"start.lte","in":"query","description":"Find broadcasts by their start time: less than or equal to.\n\nFormat: YYYY-MM-DD or YYYY-MM-DDThh:mm:ss","required":false,"schema":{"type":"string","title":"Start.Lte"}},{"name":"start.tz","in":"query","description":"Time zone of the updated times used; \n\na [TZ Database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).\n\nDefault is UTC","required":false,"schema":{"type":"string","title":"Start.Tz"}},{"name":"updated.gt","in":"query","description":"Find broadcasts by the time they were last updated: greater than.\n\nFormat: YYYY-MM-DD or YYYY-MM-DDThh:mm:ss","required":false,"schema":{"type":"string","title":"Updated.Gt"}},{"name":"updated.gte","in":"query","description":"Find broadcasts by the time they were last updated: greater than or equal to.\n\nFormat: YYYY-MM-DD or YYYY-MM-DDThh:mm:ss","required":false,"schema":{"type":"string","title":"Updated.Gte"}},{"name":"updated.lt","in":"query","description":"Find broadcasts by the time they were last updated: less than.\n\nFormat: YYYY-MM-DD or YYYY-MM-DDThh:mm:ss","required":false,"schema":{"type":"string","title":"Updated.Lt"}},{"name":"updated.lte","in":"query","description":"Find broadcasts by the time they were last updated: less than or equal to.\n\nFormat: YYYY-MM-DD or YYYY-MM-DDThh:mm:ss","required":false,"schema":{"type":"string","title":"Updated.Lte"}},{"name":"updated.tz","in":"query","description":"Time zone of the updated times used; \n\na [TZ Database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).\n\nDefault is UTC","required":false,"schema":{"type":"string","title":"Updated.Tz"}},{"name":"first_seen.gt","in":"query","description":"Find broadcasts by the time they were seen for the first time: greater than.\n\nFormat: YYYY-MM-DD or YYYY-MM-DDThh:mm:ss","required":false,"schema":{"type":"string","title":"First Seen.Gt"}},{"name":"first_seen.gte","in":"query","description":"Find broadcasts by the time they were seen for the first time: greater than or equal to.\n\nFormat: YYYY-MM-DD or YYYY-MM-DDThh:mm:ss","required":false,"schema":{"type":"string","title":"First Seen.Gte"}},{"name":"first_seen.lt","in":"query","description":"Find broadcasts by the time they were seen for the first time: less than.\n\nFormat: YYYY-MM-DD or YYYY-MM-DDThh:mm:ss","required":false,"schema":{"type":"string","title":"First Seen.Lt"}},{"name":"first_seen.lte","in":"query","description":"Find broadcasts by the time they were seen for the first time: less than or equal to.\n\nFormat: YYYY-MM-DD or YYYY-MM-DDThh:mm:ss","required":false,"schema":{"type":"string","title":"First Seen.Lte"}},{"name":"first_seen.tz","in":"query","description":"Time zone of the first_seen times used; \n\na [TZ Database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).\n\nDefault is UTC","required":false,"schema":{"type":"string","title":"First Seen.Tz"}},{"name":"phq_viewership.gt","in":"query","description":"Find broadcasts by their PHQ Viewership number: greater than the specified value.","required":false,"schema":{"type":"integer","title":"Phq Viewership.Gt"}},{"name":"phq_viewership.gte","in":"query","description":"Find broadcasts by their PHQ Viewership number: greater than or equal to the specified value.","required":false,"schema":{"type":"integer","title":"Phq Viewership.Gte"}},{"name":"phq_viewership.lt","in":"query","description":"Find broadcasts by their PHQ Viewership number: less than the specified value.","required":false,"schema":{"type":"integer","title":"Phq Viewership.Lt"}},{"name":"phq_viewership.lte","in":"query","description":"Find broadcasts by their PHQ Viewership number: less than or equal to the specified value.","required":false,"schema":{"type":"integer","title":"Phq Viewership.Lte"}},{"name":"location.place_id","in":"query","description":"Find broadcasts by their location's place_id. Multiple values are accepted as a comma-separated list.\n\n\nPlaces in the Broadcasts API have the same identifiers as those in the [Places API](https://docs.predicthq.com/api/places/search-places).\n\n\nAll broadcast location places are counties, but this parameter accepts other types of places in the hierarchy. See [Places](https://docs.predicthq.com/api/places/search-places) for different place types.\n\nIf the `place_id` of a county is specified, broadcasts in that county will be returned.\n\nIf the `place_id` of a state (region) is specified, broadcasts in all the counties within that state will be returned. US states have the place type region.E.g. If you specify `location.place_id=5332921` (California), results will contain broadcasts for all counties in California.\n\nFor places below the county level, broadcasts in the county that the place belongs to will be returned. E.g. If you specify `location.place_id=5327684` (Berkeley), results will contain broadcasts for Alameda County; Berkeley is located within Alameda County. Some places below county level do not belong to a county, in this case, you can try using the `location.origin param`.\n\nA [CSV](https://docs.predicthq.com/api/broadcasts/search-broadcasts#mapping-file) file of broadcast counties is available. It contains the place_id and name of all counties and states in the US.","required":false,"schema":{"type":"array","items":{"type":"string"},"title":"Location.Place Id"}},{"name":"location.origin","in":"query","description":"Find broadcasts in the county for the provided geopoint (a latitude and longitude coordinate). The format of the geopoint is `{latitude},{longitude}`.\n\n\nThe Broadcasts API returns broadcasts at the county level. When you specify a geopoint using `location.origin` the API returns broadcasts for the county the specified geopoint is within.\n\n\nIf you specify a geopoint within Los Angeles County then broadcasts for Los Angeles County will be returned.","required":false,"schema":{"type":"string","title":"Location.Origin"}},{"name":"event.event_id","in":"query","description":"Find broadcasts by their physical event’s unique identifier. Multiple values are accepted as a comma-separated list.\nEvents in the Broadcasts API have the same identifiers as those in the Events [API](https://docs.predicthq.com/api/events/search-events).","required":false,"schema":{"type":"array","items":{"type":"string"},"title":"Event.Event Id"}},{"name":"event.category","in":"query","description":"Find broadcasts by their physical event’s category.","required":false,"schema":{"type":"array","items":{"type":"string"},"title":"Event.Category"}},{"name":"event.label","in":"query","description":"Find broadcasts by their physical event’s labels. Multiple values are accepted as a comma-separated list.\n\nWhere multiple labels are provided, broadcasts which match any of the labels are returned.\n\nPlease note that all event labels are lowercase and that the search is case sensitive.","required":false,"schema":{"type":"array","items":{"type":"string"},"title":"Event.Label"}},{"name":"event.entity_id","in":"query","description":"Find broadcasts by their entity's unique identifier. Multiple values are accepted as a comma-separated list.\nEntities in the Broadcasts API have the same identifiers as those in the [Events API](https://docs.predicthq.com/api/events/search-events).\n\nThis parameter can be used to filter broadcasts by team, e.g. `?event.entity_id=GduZL2z24phJQni4ktERGw` to retrieve the Los Angeles Lakers broadcasts, or by venue, e.g. `?event.entity_id=qSpch2mYLDa4iygkMdMPYu` to retrieve the broadcasts related to a physical game happening at the STAPLES center.","required":false,"schema":{"type":"array","items":{"type":"string"},"title":"Event.Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastCountResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/HTTPValidationError"},{"$ref":"#/components/schemas/QueryValidationError"}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Broadcasts API"]}}}}
```

## Examples

{% tabs %}
{% tab title="curl" %}

```bash
curl -X GET "https://api.predicthq.com/v1/broadcasts/count/?event.event_id=AdKtL974inQB7GURRd" \
     -H "Accept: application/json" \
     -H "Authorization: Bearer $ACCESS_TOKEN"
```

{% endtab %}

{% tab title="python" %}

```python
import requests

response = requests.get(
    url="https://api.predicthq.com/v1/broadcasts/count",
    headers={
      "Accept": "application/json",
      "Authorization": "Bearer $ACCESS_TOKEN"
    },
    params={
        "event.event_id": "AdKtL974inQB7GURRd"
    }
)

print(response.json())
```

{% endtab %}
{% endtabs %}

## OpenAPI Spec

The OpenAPI spec for Broadcasts API can be [found here](https://api.predicthq.com/docs/?urls.primaryName=Broadcasts+API).

## Guides

Below are some guides relevant to this API:

* [Live TV Event Guides](/getting-started/guides/live-tv-event-guides.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.predicthq.com/api/broadcasts/get-broadcasts-count.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
