Skip to content

Freshness sources

Registering a source

Each source belongs to an entity and carries its own cadence and priority.

FieldPurpose
entity_idStable entity key, such as company_stripe
entity_typecompany, person, or product
source_keyLogical source name such as pricing_page
source_urlConcrete URL when one exists
refresh_cadenceNatural cadence string such as 7 days
priorityHigher numbers surface first in due lists

Register one tracked source

```bash curl https://api.faircompany.ai/v1/freshness/sources \ -X POST \ -H "Authorization: Bearer fc_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "entity_id": "company_stripe", "entity_type": "company", "source_key": "pricing_page", "source_url": "https://stripe.com/pricing", "refresh_cadence": "7 days", "priority": 90 }' ```

Recording a fetch

When you fetch a source, update the record with content hash, size, duration, and whether the content changed. That is what powers the dashboard and due queue.