---
title: "Marketstack / Accounts Payable Frames"
description: "Marketstack tool marketstack-frames-accounts-payable on looot: input fields, $0.000899 per call, output shape, and code to run it with curl, JavaScript or Python."
sidebar:
  hidden: true
---

{/* Generated by scripts/generate-api-reference.mjs from data/api-reference.json. Do not edit. */}

The frames API aggregates one fact for each reporting entity that is the last filed that most closely fits the calendrical period requested. This API supports annual, quarterly, and instantaneous data. This API endpoint is made for the US-GAAP taxonomy and the Accounts Payable Current type of the taxonomy. * Where the units of measure specified in the API contain a numerator and a denominator, these are separated by “-per-” such as “USD-per-shares”. Note that the default unit in XBRL is “pure”. * The period format is CY#### for annual data (duration 365 days +/- 30 days), CY####Q# for quarterly data (duration 91 days +/- 30 days), and CY####Q#I for instantaneous data. Because company financial calendars can start and end on any month or day and even change in length from quarter to quarter according to the day of the week, the frame data is assembled by the dates that best align with a calendar quarter or year. Data users should be mindful of the different reporting start and end dates for facts contained in a frame.

- **Tool id:** `marketstack-frames-accounts-payable`
- **Provider:** [Marketstack](/providers/marketstack)
- **Job:** [Accounts payable frames](/reference/jobs/frames-accounts-payable) (`frames.accounts-payable`)
- **Price:** $0.000899 per call. A call that fails at the provider costs $0.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `frame` | string | yes |   |
| `limit` | integer | no |   |
| `offset` | integer | no |   |
| `unit` | string | yes |   |

## Output

The run's `result` holds the provider's answer. Signed in, `looot inspect marketstack-frames-accounts-payable` prints its fields.

## Run it

Every call needs your API token in `LOOOT_TOKEN`; [Sign in](/get-started/sign-in#use-the-token-in-scripts-and-agents) shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With `wait: 30` the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll `GET /v1/runs/<runId>`.

Example input with placeholder values:

<CodeGroup>

```bash curl
curl -X POST "https://api.looot.ai/v1/runs" \
  -H "Authorization: Bearer $LOOOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"endpointId":"marketstack-frames-accounts-payable","input":{"unit":"<unit>","frame":"<frame>"},"wait":30}'
```

```js JavaScript
const response = await fetch("https://api.looot.ai/v1/runs", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    endpointId: "marketstack-frames-accounts-payable",
    input: {
      unit: "<unit>",
      frame: "<frame>",
    },
    wait: 30,
  }),
});
const run = await response.json();
console.log(run.status, run.result);
```

```python Python
import os
import uuid

import requests

response = requests.post(
    "https://api.looot.ai/v1/runs",
    headers={
        "Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "endpointId": "marketstack-frames-accounts-payable",
        "input": {
            "unit": "<unit>",
            "frame": "<frame>",
        },
        "wait": 30,
    },
    timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))
```

</CodeGroup>

To let looot pick among every provider of this job instead, send `job:frames.accounts-payable` as `endpointId`; see [the job page](/reference/jobs/frames-accounts-payable).
