GitHub Actions Cache API

Manage workflow dependency caches

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /repos/{owner}/{repo}/actions/caches List a repository's Actions caches · List Github Actions Caches for a Repository #
Ask an LLM
“What dependency caches are my GitHub Actions workflows keeping for this repo?”
“Can I see only the caches created for a particular branch ref?”
Tell an agent
List the Actions caches in {owner}/{repo}.
Show caches in {owner}/{repo} for ref {ref}.
DELETE /repos/{owner}/{repo}/actions/caches Delete caches matching a full cache key · Delete Github Actions Caches for a Repository (by Key) #
Ask an LLM
“How do I clear every cache entry that has a specific key?”
“Can I purge a cache key on just one branch ref?”
Tell an agent destructive · confirm first
Delete all caches with key {key} in {owner}/{repo}.
Purge the cache key {key} only for ref {ref}.
DELETE /repos/{owner}/{repo}/actions/caches/{cache_id} Delete one Actions cache by its ID · Delete a Github Actions Cache for a Repository (by Id) #
Ask an LLM
“Can I delete a single cache entry when I know its cache ID?”
“How do I remove one specific corrupted cache instead of every cache with that key?”
Tell an agent destructive · confirm first
Delete cache {cache_id} from {owner}/{repo}.
Remove the single cache entry with ID {cache_id}.
GET /repos/{owner}/{repo}/actions/cache/usage Check a repository's Actions cache usage · Get Github Actions Cache Usage for a Repository #
Ask an LLM
“How much cache storage is my repository using in GitHub Actions?”
“How many active caches does this repo have right now?”
Tell an agent
Show the total Actions cache usage for {owner}/{repo}.
Tell me how close {owner}/{repo} is to its cache storage limit.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/github-actions:github-actions-cache-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

github-actions-cache-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitHub Actions Cache API
  description: REST API for managing GitHub Actions workflows, runs, artifacts, secrets, runners, caches, variables, permissions, and OIDC.
  version: 1.0.0
  contact:
    name: GitHub Support
    url: https://support.github.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: https://api.github.com
  description: GitHub REST API
security:
- bearerAuth: []
- personalAccessToken: []
tags:
- name: Cache
  description: Manage workflow dependency caches
paths:
  /repos/{owner}/{repo}/actions/caches:
    get:
      operationId: listActionsCaches
      summary: List Github Actions Caches for a Repository
      description: Lists the GitHub Actions caches for a repository.
      tags:
      - Cache
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - name: ref
        in: query
        schema:
          type: string
        example: example_value
      - name: key
        in: query
        schema:
          type: string
        example: example_value
      - name: sort
        in: query
        schema:
          type: string
          enum:
          - created_at
          - last_accessed_at
          - size_in_bytes
          default: last_accessed_at
        example: created_at
      - name: direction
        in: query
        schema:
          type: string
          enum:
          - asc
          - desc
          default: desc
        example: asc
      - $ref: '#/components/parameters/perPage'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: Successfully retrieved caches
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_count:
                    type: integer
                  actions_caches:
                    type: array
                    items:
                      $ref: '#/components/schemas/ActionsCacheEntry'
              examples:
                Listactionscaches200Example:
                  summary: Default listActionsCaches 200 response
                  x-microcks-default: true
                  value:
                    total_count: 10
                    actions_caches:
                    - id: abc123
                      ref: example_value
                      key: example_value
                      version: example_value
                      last_accessed_at: '2026-01-15T10:30:00Z'
                      created_at: '2026-01-15T10:30:00Z'
                      size_in_bytes: 10
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: deleteActionsCacheByKey
      summary: Delete Github Actions Caches for a Repository (by Key)
      description: Deletes one or more GitHub Actions caches for a repository, using a complete cache key.
      tags:
      - Cache
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - name: key
        in: query
        required: true
        schema:
          type: string
        example: example_value
      - name: ref
        in: query
        schema:
          type: string
        example: example_value
      responses:
        '200':
          description: Successfully deleted caches
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/actions/caches/{cache_id}:
    delete:
      operationId: deleteActionsCacheById
      summary: Delete a Github Actions Cache for a Repository (by Id)
      description: Deletes a GitHub Actions cache for a repository, using a cache ID.
      tags:
      - Cache
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - name: cache_id
        in: path
        required: true
        schema:
          type: integer
        example: '500123'
      responses:
        '204':
          description: Successfully deleted cache
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /repos/{owner}/{repo}/actions/cache/usage:
    get:
      operationId: getActionsCacheUsage
      summary: Get Github Actions Cache Usage for a Repository
      description: Gets GitHub Actions cache usage for a repository.
      tags:
      - Cache
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      responses:
        '200':
          description: Successfully retrieved cache usage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionsCacheUsage'
              examples:
                Getactionscacheusage200Example:
                  summary: Default getActionsCacheUsage 200 response
                  x-microcks-default: true
                  value:
                    full_name: example_value
                    active_caches_size_in_bytes: 10
                    active_caches_count: 10
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    ActionsCacheEntry:
      type: object
      properties:
        id:
          type: integer
          example: abc123
        ref:
          type: string
          example: example_value
        key:
          type: string
          example: example_value
        version:
          type: string
          example: example_value
        last_accessed_at:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
        created_at:
          type: string
          format: date-time
          example: '2026-01-15T10:30:00Z'
        size_in_bytes:
          type: integer
          example: 10
    ActionsCacheUsage:
      type: object
      properties:
        full_name:
          type: string
          example: example_value
        active_caches_size_in_bytes:
          type: integer
          example: 10
        active_caches_count:
          type: integer
          example: 10
  parameters:
    repo:
      name: repo
      in: path
      required: true
      schema:
        type: string
      description: The name of the repository without the .git extension.
    page:
      name: page
      in: query
      schema:
        type: integer
        default: 1
      description: The page number of the results to fetch.
    perPage:
      name: per_page
      in: query
      schema:
        type: integer
        default: 30
        maximum: 100
      description: The number of results per page (max 100).
    owner:
      name: owner
      in: path
      required: true
      schema:
        type: string
      description: The account owner of the repository.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: GitHub personal access token or OAuth token
    personalAccessToken:
      type: http
      scheme: bearer
      description: Fine-grained personal access token with Actions permissions