# SEC XBRL Company Facts Scraper API - Financial Metrics (`pink_comic/sec-xbrl-company-facts-financial-metrics`) Actor

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.

- **URL**: https://apify.com/pink\_comic/sec-xbrl-company-facts-financial-metrics.md
- **Developed by:** [Ava Torres](https://apify.com/pink_comic) (community)
- **Categories:** Business, Automation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 sec xbrl company facts scraper api - financial met evidence items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## SEC XBRL Company Facts Scraper API

Turn SEC Company Facts into source-linked public-company financial metric evidence. Resolve ticker/company/CIK and filter exact taxonomy concepts, units, forms, fiscal periods, filed/end dates, and amendments.

### Default input

```json
{
  "ticker": "AAPL",
  "taxonomies": ["us-gaap"],
  "concepts": ["RevenueFromContractWithCustomerExcludingAssessedTax", "NetIncomeLoss", "Assets", "Liabilities"],
  "forms": ["10-K"],
  "units": ["USD"],
  "maxResults": 4
}
```

This returns up to four recent Apple facts for at most **$0.0081** ($0.0001 start + $0.002/item).

### Output and controls

Every found item includes CIK, resolved ticker, entity name, taxonomy, concept/label, unit/value, period, fiscal year/period, form, amendment flag, accession, official filing link, Company Facts URL, retrieval time, and disclosed query bounds. Duplicate SEC contexts are preserved rather than silently collapsed.

Use independent `maxConcepts`, `maxContextsPerConcept`, `maxCandidates`, and `maxResults` controls for predictable runtime and cost. Temporary official-source failures and no matches produce explicit evidence outcomes.

### Important limits

Company Facts is issuer-filed XBRL evidence. Values may be amended, restated, duplicated, issuer-specific, or context-dependent. The actor does not provide SEC verification, audited normalization, complete statements, valuation, or investment advice. Review the linked filing, footnotes, context, and later amendments before material decisions.

See the full README for examples, filtering semantics, reliability bounds, and authoritative-source links.

# Actor input Schema

## `ticker` (type: `string`):

Exact ticker resolved through SEC company\_tickers.json. Empty input defaults to AAPL.

## `company` (type: `string`):

Case-insensitive company-name substring. Used when ticker and CIK are empty.

## `cik` (type: `string`):

Exact 1-10 digit CIK. Takes precedence over ticker/company.

## `taxonomies` (type: `array`):

Exact taxonomy names such as us-gaap or dei.

## `concepts` (type: `array`):

Exact concept names. Empty means all concepts up to maxConcepts.

## `forms` (type: `array`):

Exact forms such as 10-K, 10-Q, 10-K/A, or 8-K.

## `fiscalYears` (type: `array`):

Optional issuer-reported fiscal years.

## `fiscalPeriods` (type: `array`):

Exact periods such as FY, Q1, Q2, or Q3.

## `units` (type: `array`):

Exact XBRL units such as USD, shares, or USD/shares.

## `filedFrom` (type: `string`):

Optional inclusive YYYY-MM-DD filing date.

## `filedTo` (type: `string`):

Optional inclusive YYYY-MM-DD filing date.

## `endDateFrom` (type: `string`):

Optional inclusive XBRL period-end date.

## `endDateTo` (type: `string`):

Optional inclusive XBRL period-end date.

## `amendmentFilter` (type: `string`):

Include any forms, exclude /A forms, or return only /A forms.

## `maxConcepts` (type: `integer`):

Independent cap after deterministic taxonomy/concept sorting.

## `maxContextsPerConcept` (type: `integer`):

Independent newest-first context cap per concept/unit.

## `maxCandidates` (type: `integer`):

Total candidate-context scan cap across concepts and units.

## `maxResults` (type: `integer`):

Total paid output cap. Default four items cost at most $0.0081 including the $0.0001 start event.

## Actor input object example

```json
{
  "ticker": "AAPL",
  "taxonomies": [
    "us-gaap"
  ],
  "concepts": [
    "RevenueFromContractWithCustomerExcludingAssessedTax",
    "NetIncomeLoss",
    "Assets",
    "Liabilities"
  ],
  "forms": [
    "10-K"
  ],
  "fiscalYears": [],
  "fiscalPeriods": [],
  "units": [
    "USD"
  ],
  "amendmentFilter": "any",
  "maxConcepts": 20,
  "maxContextsPerConcept": 500,
  "maxCandidates": 5000,
  "maxResults": 4
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "ticker": "AAPL",
    "maxResults": 4
};

// Run the Actor and wait for it to finish
const run = await client.actor("pink_comic/sec-xbrl-company-facts-financial-metrics").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "ticker": "AAPL",
    "maxResults": 4,
}

# Run the Actor and wait for it to finish
run = client.actor("pink_comic/sec-xbrl-company-facts-financial-metrics").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "ticker": "AAPL",
  "maxResults": 4
}' |
apify call pink_comic/sec-xbrl-company-facts-financial-metrics --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=pink_comic/sec-xbrl-company-facts-financial-metrics",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/nVDpOPasuvKRgMQ6w/builds/SWrb5G0ElJQDHtkhj/openapi.json
