Build and update datasets

Set up your agent to collect and refresh company financial data with sources.


Ask your agent to use Finbar to fill in a list of financial metrics or update a dataset you already have. Finbar researches historical company reports and returns values with sources, flagging anything it cannot verify.

Set up your agent

  1. Connect Finbar to your agent and sign in with an account that has API/MCP access.
  2. Enable Finbar in your conversation and make sure your account has AI credits.
  3. If your agent supports skills, download the optional Finbar datasets skill and install it using your agent's skill settings. It guides the agent through preparing a request, waiting for results and saving the complete dataset.

The skill is a separate, optional installation that uses your active Finbar connection. You can also use the dataset tools directly through the existing ChatGPT app or Claude connector.

Build a dataset

Give your agent the company, a clear list of metrics and the periods you want. You can paste the rows or supply an existing table to populate. Include units and reporting preferences where they matter, such as dollars in millions or GAAP rather than adjusted figures.

For example:

Use Finbar's build_dataset tool for Mastercard. Populate these rows: revenue, operating income, net income and diluted EPS. Use full-year 2023, 2024 and 2025, as originally reported under GAAP. Show dollar amounts in millions and EPS in dollars per share. Include sources, flag missing or calculated values, and save the complete dataset so I can update it later.

For a complete financial statement, first agree on the rows to include. Your agent can propose a list for you to review before asking Finbar to populate it.

Update a dataset

Give your agent the saved dataset and specify which periods to add or refresh:

Use Finbar's update_dataset tool to add Q1 2026 to this saved Mastercard dataset. Keep the existing rows and units. Include sources and highlight any values you could not update. Save the complete updated dataset.

What to expect

  • Allow several minutes. Ask your agent to check progress and collect the final results. A full progress count can appear before final checks finish; wait for the run to end. Pending values are still being processed. Keep the run ID if you need to resume checking later.
  • Runs use AI credits. Research already performed can incur charges even if a run fails or is cancelled. Checking progress and retrieving results do not use AI credits. Billing updates separately from execution.
  • Review gaps and warnings. Missing values are not zero. If an update cannot verify a new value, it keeps the previous value and flags it.
  • Save your results. Finbar keeps results for seven days after a run ends. Keep a copy of the complete dataset for future updates.

If a run fails, ask your agent to retrieve any completed results and explain the issue before retrying. Share the run ID and error message with support if you need help.

REST API

Use an access token as ACCESS_TOKEN. All paths below are relative to https://api.finbar.com/v1. Starting and cancelling runs requires both read and write; reading status and results requires read.

OperationMethod and path
BuildPOST /datasets/build
UpdatePOST /datasets/update
Status and usageGET /datasets/runs/{run_id}
Result pagePOST /datasets/runs/{run_id}/result
Complete JSON bundleGET /datasets/runs/{run_id}/bundle
CancelPOST /datasets/runs/{run_id}/cancel

Submit a build or update

Save a request as dataset-request.json, replacing the illustrative entity ID with an ID from company search:

{
  "dataset": {
    "entity_id": "O-11111111111111111111111111111111",
    "rows": [
      {
        "id": "revenue",
        "label": "Revenue",
        "basis": "GAAP",
        "scope": "Consolidated",
        "unit": "USD",
        "scale": 1000000
      }
    ],
    "observations": []
  },
  "target_periods": [{"year": 2025, "period_type": "Y", "period": 0}],
  "value_version": "original"
}

Each row needs a unique, stable id without a colon, a label, unit and positive scale. In this example, values are in millions of US dollars. Choose explicit historical fiscal periods. original requests originally reported values; latest_restated requests revised values. Optional instructions can clarify definitions and reporting conventions.

curl --fail-with-body --silent --show-error \
  'https://api.finbar.com/v1/datasets/build' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: revenue-2025-build-001' \
  --data-binary @dataset-request.json

HTTP 202 returns run_id and poll_after_seconds; the Location header gives the status URL. Persist the run ID. Reuse the same Idempotency-Key and body after a timeout or temporary failure, so a retry does not start another paid run. Changed input needs a new key; conflicting reuse returns 409.

For an update, send the same request shape to /datasets/update with the saved dataset and new target_periods. Update requires at least one numeric existing observation. Preserve prior observations, their statuses and sources. For a number supplied by you, use an observation such as:

{
  "row_id": "revenue",
  "period": {"year": 2024, "period_type": "Y", "period": 0},
  "value": 800,
  "status": "provided",
  "sources": []
}

Requests accept up to 200 rows, 40 unique target periods, 2,000 row/period combinations, 8,000 existing observations and 2 MiB of JSON.

Poll, retrieve and save

Set RUN_ID to the returned run ID and poll at poll_after_seconds intervals:

curl --fail-with-body --silent --show-error \
  "https://api.finbar.com/v1/datasets/runs/$RUN_ID" \
  --header "Authorization: Bearer $ACCESS_TOKEN"

Wait for terminal status: completed, failed or cancelled. Progress and current activity describe work in flight; a full progress count alone does not mean the run is complete. Billing can still be pending after execution ends; inspect the returned billing status and usage separately.

Retrieve the first result page with an empty body:

curl --fail-with-body --silent --show-error \
  "https://api.finbar.com/v1/datasets/runs/$RUN_ID/result" \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{}'

Continue with {"cursor":"RETURNED_NEXT_CURSOR"} until next_cursor is absent. Optional row_id, exact period and limit filters must stay unchanged across pages. The default limit is 25; the maximum is 100. A 48 KiB response bound can produce shorter pages. Merge rows by id and observations by row_id plus period, preserving sources, calculations, changes and messages.

Alternatively, download the complete result:

curl --fail-with-body --silent --show-error \
  "https://api.finbar.com/v1/datasets/runs/$RUN_ID/bundle" \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --output dataset-result.json

Bundles have a 2 MiB limit. On 413 dataset_bundle_too_large, use result pages. Save results before expires_at, seven days after termination. Expired result content returns 410. Failed or cancelled runs can retain completed work; retrieve it before deciding whether to submit another paid request.

Cancel a run

curl --fail-with-body --silent --show-error --request POST \
  "https://api.finbar.com/v1/datasets/runs/$RUN_ID/cancel" \
  --header "Authorization: Bearer $ACCESS_TOKEN"

Cancellation is a request to stop. Continue polling until execution is terminal. Work already performed can incur AI charges. Status checks, result pages and bundle downloads do not incur AI charges; normal API request limits still apply.

Previously published datasets

The company-level /entities/{entity_id}/dataset, /dataset/catalogue and /dataset/query readers were withdrawn in October 2026 pending production readiness. There is currently no supported public read route for a company's already-published dataset. Build and Update are paid research operations using your supplied rows and periods, not replacement reads of those snapshots. Requests to the retired paths return 410 endpoint_retired; retrying them will not restore access.