{
  "openapi": "3.0.1",
  "info": {
    "title": "SEC XBRL Company Facts Scraper API - Financial Metrics",
    "description": "Extract source-linked public-company revenue, income, assets, liabilities, and other issuer-filed XBRL facts from SEC Company Facts. Resolve ticker/company/CIK; filter concepts, units, forms, fiscal periods, dates, and amendments.",
    "version": "0.1",
    "x-build-id": "SWrb5G0ElJQDHtkhj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pink_comic~sec-xbrl-company-facts-financial-metrics/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pink_comic-sec-xbrl-company-facts-financial-metrics",
        "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/pink_comic~sec-xbrl-company-facts-financial-metrics/runs": {
      "post": {
        "operationId": "runs-sync-pink_comic-sec-xbrl-company-facts-financial-metrics",
        "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/pink_comic~sec-xbrl-company-facts-financial-metrics/run-sync": {
      "post": {
        "operationId": "run-sync-pink_comic-sec-xbrl-company-facts-financial-metrics",
        "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",
        "properties": {
          "ticker": {
            "title": "Ticker",
            "type": "string",
            "description": "Exact ticker resolved through SEC company_tickers.json. Empty input defaults to AAPL.",
            "default": "AAPL"
          },
          "company": {
            "title": "Company Name",
            "type": "string",
            "description": "Case-insensitive company-name substring. Used when ticker and CIK are empty."
          },
          "cik": {
            "title": "SEC CIK",
            "pattern": "^$|^[0-9]{1,10}$",
            "type": "string",
            "description": "Exact 1-10 digit CIK. Takes precedence over ticker/company."
          },
          "taxonomies": {
            "title": "Taxonomies",
            "type": "array",
            "description": "Exact taxonomy names such as us-gaap or dei.",
            "items": {
              "type": "string"
            },
            "default": [
              "us-gaap"
            ]
          },
          "concepts": {
            "title": "XBRL Concepts",
            "type": "array",
            "description": "Exact concept names. Empty means all concepts up to maxConcepts.",
            "items": {
              "type": "string"
            },
            "default": [
              "RevenueFromContractWithCustomerExcludingAssessedTax",
              "NetIncomeLoss",
              "Assets",
              "Liabilities"
            ]
          },
          "forms": {
            "title": "SEC Forms",
            "type": "array",
            "description": "Exact forms such as 10-K, 10-Q, 10-K/A, or 8-K.",
            "items": {
              "type": "string"
            },
            "default": [
              "10-K"
            ]
          },
          "fiscalYears": {
            "title": "Fiscal Years",
            "type": "array",
            "description": "Optional issuer-reported fiscal years.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "fiscalPeriods": {
            "title": "Fiscal Periods",
            "type": "array",
            "description": "Exact periods such as FY, Q1, Q2, or Q3.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "units": {
            "title": "Units",
            "type": "array",
            "description": "Exact XBRL units such as USD, shares, or USD/shares.",
            "items": {
              "type": "string"
            },
            "default": [
              "USD"
            ]
          },
          "filedFrom": {
            "title": "Filed From",
            "pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Optional inclusive YYYY-MM-DD filing date."
          },
          "filedTo": {
            "title": "Filed To",
            "pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Optional inclusive YYYY-MM-DD filing date."
          },
          "endDateFrom": {
            "title": "Period End From",
            "pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Optional inclusive XBRL period-end date."
          },
          "endDateTo": {
            "title": "Period End To",
            "pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "Optional inclusive XBRL period-end date."
          },
          "amendmentFilter": {
            "title": "Amended Filings",
            "enum": [
              "any",
              "exclude",
              "only"
            ],
            "type": "string",
            "description": "Include any forms, exclude /A forms, or return only /A forms.",
            "default": "any"
          },
          "maxConcepts": {
            "title": "Maximum Concepts",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Independent cap after deterministic taxonomy/concept sorting.",
            "default": 20
          },
          "maxContextsPerConcept": {
            "title": "Maximum Contexts per Concept",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Independent newest-first context cap per concept/unit.",
            "default": 500
          },
          "maxCandidates": {
            "title": "Maximum Candidate Contexts",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Total candidate-context scan cap across concepts and units.",
            "default": 5000
          },
          "maxResults": {
            "title": "Maximum Results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Total paid output cap. Default four items cost at most $0.0081 including the $0.0001 start event.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}