{
  "openapi": "3.0.1",
  "info": {
    "title": "Gitea / Forgejo Forge Extractor",
    "description": "Point at any Gitea or Forgejo instance (Codeberg, gitea.com, self-hosted) and get one structured row per repository: stars, forks, language, topics, license, issues/PR counts, timestamps and more.",
    "version": "0.1",
    "x-build-id": "xEGsv7vPWGYgaUnfx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~gitea-forge-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-gitea-forge-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/datamule~gitea-forge-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-gitea-forge-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/datamule~gitea-forge-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-gitea-forge-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "baseUrl"
        ],
        "properties": {
          "baseUrl": {
            "title": "Gitea / Forgejo instance URL",
            "type": "string",
            "description": "Root URL of a Gitea or Forgejo instance. Gitea and Forgejo (which powers Codeberg) expose the identical /api/v1 REST API, so one actor works against any of them: https://codeberg.org (Forgejo), https://gitea.com (reference Gitea), or any self-hosted / corporate / university instance. The /api/v1 path is appended for you (paste either the root or the /api/v1 URL). The run MODE is chosen automatically from the other fields you set (see below)."
          },
          "query": {
            "title": "Search query (MODE: search)",
            "type": "string",
            "description": "SEARCH MODE (default). A repository search term — matches repo names/descriptions across the whole instance via GET /api/v1/repos/search. Combine with language / topic / sort. Leave every mode field empty to run DISCOVERY mode (a single row describing the instance: software, version, repo count)."
          },
          "topic": {
            "title": "Topic filter (MODE: search)",
            "type": "string",
            "description": "SEARCH MODE. Restrict the search to repositories tagged with this exact topic (e.g. kubernetes, gamedev). Uses the instance's topic-only search. If both query and topic are set, topic takes the search keyword."
          },
          "language": {
            "title": "Language filter (MODE: search)",
            "type": "string",
            "description": "SEARCH MODE. Restrict results to a primary programming language (e.g. Go, Python, Rust). Matches the instance's own language index."
          },
          "sort": {
            "title": "Sort field (MODE: search)",
            "type": "string",
            "description": "SEARCH MODE. Optional sort field. Gitea/Forgejo commonly accept: alpha, created, updated, size, id (older) or newest, oldest, moststars, feweststars, mostforks, fewestforks (newer). Left as free text so any instance's accepted value passes through. Leave empty for the instance default (relevance)."
          },
          "order": {
            "title": "Sort order (MODE: search)",
            "type": "string",
            "description": "SEARCH MODE. Sort direction: asc or desc. Only used with sort."
          },
          "org": {
            "title": "Organization (MODE: org)",
            "type": "string",
            "description": "ORG MODE. Set an organization (or user-org) name to enumerate ALL of its repositories via GET /api/v1/orgs/{org}/repos (paginated). Overrides search mode when set. Example: forgejo (on codeberg.org)."
          },
          "owner": {
            "title": "Owner (MODE: repo)",
            "type": "string",
            "description": "REPO MODE. The owner (user or org) of a single repository. Set together with repo to fetch exactly one repository's full detail via GET /api/v1/repos/{owner}/{repo}. Example owner: forgejo."
          },
          "repo": {
            "title": "Repository name (MODE: repo)",
            "type": "string",
            "description": "REPO MODE. The repository name. Set together with owner to fetch a single repository's full detail (this is the only mode that returns the license object). Example repo: forgejo."
          },
          "maxRecords": {
            "title": "Max records (global cap)",
            "minimum": 1,
            "type": "integer",
            "description": "A GLOBAL cap on the number of repository rows to emit (each row is one repository and one billable event). Pagination stops as soon as the cap is reached, so a small value is a cheap, deterministic sample. Leave empty to fetch every matching repository — a broad search on a large instance (Codeberg has 100k+ repos) can return thousands."
          },
          "bearer": {
            "title": "Bearer token",
            "type": "string",
            "description": "Optional access token for a private / registration-required / rate-limited instance (sent as Authorization: Bearer ***). Not required for public repositories. Never logged."
          },
          "extraHeaders": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Optional extra HTTP headers as a JSON object, e.g. {\"x-api-key\": \"...\"} for gated instances. Not required for public repositories. Header values are never logged."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}