跳到正文
DEV Community· Tim Zinin·· 2 小時前AI 評分33

US Brand Federal Award Snapshot:將聯邦合約快照限定於單一確切受款方

Keep a federal contract snapshot bounded to one exact recipient

AI 導讀

US Brand Federal Award Snapshot 使用 USAspending API,按單一確切受款方 ID 和指定日期範圍擷取主承包合約交易快照。

正文

I maintain this Actor. This is an AI-assisted technical walkthrough checked against the installed source contract.

A company-name search is a weak foundation for an automated award history. Names can collide, subsidiaries can be grouped differently, and a first page can be mistaken for a complete record. A bounded snapshot becomes easier to interpret when identity and coverage are explicit from the start.

US Brand Federal Award Snapshot uses the official USAspending API for one exact recipient ID and one date window. It checks the recipient detail response against that exact child recipient and its UEI, then returns a bounded first-page view of prime contract transactions. It is a point-in-time collection step, not a complete history of every federal relationship.

Start from a resolved recipient

The input below reproduces the Actor's saved public prefill recipient ID with an illustrative date window. That prefill is an integration example; this article does not establish that the ID remains available today or predict which transactions a new run would return. Resolve the intended recipient in USAspending before adapting the request for an actual research task.

Use the exact source recipient identifier rather than a company name, a parent identifier, or a UEI in the recipientId field. If identity cannot be verified, repair the selection step. Substituting a fuzzy name match would change the evidence claim that this product is designed to preserve.

The maximum successful output is 25 exact-attributed transactions from the first source page. The example requests ten. The supported prime contract award type codes are A, B, C, and D, ordered by action date descending with deterministic tie-breakers. This is transaction-level evidence within the requested boundary, so do not relabel it as a complete count of awards.

Keep the source boundary in the result

A useful review packet records the exact recipient, requested start and end dates, source as-of time, returned transactions, and coverage limits. If the first page is full, that is a reason to inspect the coverage statement. It is not proof that exactly that many transactions exist in the entire window.

The source adapter has explicit operational limits: at most three source operations, six HTTP attempts total, and at most two attempts per operation. Decoded responses are bounded to one MiB per operation and three MiB overall. These limits protect a small snapshot workflow; they do not create an unlimited export path.

A source failure, unverified identity, or no-result outcome produces no successful snapshot result event. The automatic Actor start event remains separate. Check the terminal receipt and source error before deciding whether another purchase is appropriate. A repeated request is a new point-in-time snapshot, not a free continuation of the old collection.

Review the meaning before using it

Transaction amounts and dates need the context supplied by USAspending and the research question. This tool does not establish creditworthiness, legal compliance, procurement intent, or a sales opportunity. Its value is a small machine-readable evidence packet with a precise identity boundary and visible omissions.

For a later comparison, retain both snapshot IDs and their as-of times. A changed row set can reflect source updates or a changed request window. Explain those differences before attributing the movement to new commercial activity by the recipient.

Input and execution boundary

Save this workflow-specific contract example as input.json. This reproduces the saved public recipient prefill; a new request depends on the current source response.

{
  "schemaVersion": "1.1",
  "recipientId": "09c94e6e-003f-7a9a-a6a9-2305eb5b6025-C",
  "startDate": "2026-07-01",
  "endDate": "2026-08-04",
  "maxResults": 10,
  "requestId": "prefill-apple-contracts-2026-08"
}

A deliberate cloud execution can use the following asynchronous request. It creates a new run and may incur charges; this walkthrough did not execute it.

curl --request POST \
  'https://api.apify.com/v2/acts/zinin~us-brand-federal-award-snapshot/runs?build=0.3.1&timeout=180&maxTotalChargeUsd=0.10' \
  --header "Authorization: Bearer $APIFY_TOKEN" \
  --header 'Content-Type: application/json' \
  --data-binary @input.json

Save the returned run ID. Check that existing run before retrying after a client timeout, then inspect its terminal status, Dataset, and KVS OUTPUT. A timeout in the caller does not cancel a server run. The charge ceiling bounds the request; it does not guarantee delivery or remove the start event. The build selector pins the observed build number, while the run's actual build ID should be retained for provenance.

Price and reproducibility

On 19 October 2026, the observed FREE-plan rates are $0.005 for the automatic start event and $0.015 per successful bounded snapshot. The platform can count start events according to allocated memory. Other subscription tiers differ. Verify the current Actor page before purchasing a run; optional external services, where enabled, are separate.

This article uses the installed 0.3.1 source contract and saved public input shape, checked on the stated date. The arithmetic examples are explanatory, not fresh cloud acceptance, customer activity, or evidence of revenue. Preserve your input, actual build ID, observation boundary, and terminal receipt when adapting the workflow.

來源:DEV Community · dev.to