# APIs for the sources nobody connects

> Sixteen sources arrived as spreadsheets in someone's inbox. We built the connectors that did not exist, so the data arrives on its own, checked, every morning.

Project on Variable Frog. Page: https://variablefrog.com/work/api-integrations

- Client: A multi-brand advertiser
- Industry: Advertising
- Service: Foundation
- Stack: Python, REST APIs, Cloud Run, BigQuery
- What we built: 13 custom connectors and a guarded file door
- Outcome: Daily data by 6 am, 81% fewer uploads
- Headline number: -81% manual uploads

## In short

- The problem: 16 sources had no ready connector. Someone downloaded and uploaded each one by hand, every week.
- What we built: 13 custom API connectors with schemas, retries and alerts, and a validated drop folder for the 3 that remain files.
- The result: Manual uploads fell 81%, and data that used to be a week old lands daily by 6 am.

Chart: Every source that used to arrive as a file, one dot each.

16 sources used to arrive as files: 13 now arrive by API and 3 are still files, checked on arrival.

### At a glance

- Challenge: **16** Sources with no ready connector: television, out of home, local platforms and CRM reports, uploaded by hand each week.
- Approach: **13** Custom connectors, each a small service that signs in, pulls, checks and loads, and says so when it cannot.
- Result: **-81%** Manual uploads. Data that arrived weekly, when someone remembered, now lands daily by 6 am.

The big ad platforms come with connectors. The long tail does not: a television buying system with an API nobody had read, an out of home vendor who emailed a workbook, a CRM whose export took eleven clicks. Each one was a small weekly chore. Together they were most of a job.

## The problem

Hand uploads fail quietly. A column moves, a week is loaded twice, a file is forgotten over a holiday (In the six months before, 1 upload in 12 had an error that was only found later, in a chart that looked odd.). Nobody notices until a number looks wrong, and by then a decision has been made on it.

They also set the clock for everything downstream. If television arrives on Thursday, the weekly report cannot be honest before Thursday, however fast the rest of the pipeline is.

## What we built

A connector for every source that has an API, and a guarded front door for the three that still do not. Each connector is a small service with one job, built the same way, so the thirteenth took a fraction of the time of the first.

### The connectors, from vendor to warehouse

Vendor APIs, the CRM and remaining files pass through connectors, data contracts and a run log into the media hub, the warehouse and a status page.

- Sources: Vendor APIs (Reporting APIs for television, out of home and local platforms. Sign in, paging, rate limits and retries are handled for each.); CRM (An incremental pull through the CRM's API: only what changed since the last run.); Files that remain (Three vendors still send files. They now land in a watched folder, not an inbox.)
- What we built: Connectors (Thirteen small services on a schedule. Run one twice and the data is the same, never doubled.); Data contracts (A schema for every source. A missing column, a new currency or an impossible value stops the load and names the row.); Run log and alerts (Every run recorded: what was asked, what came back, how long it took. A failure reaches a person, with the reason.)
- Where it lands: The media hub (The new sources join the others under the same names and definitions.); The warehouse (Raw responses are kept beside the modelled tables, so any figure can be rebuilt from what the vendor sent.); Status page (Every source, when it last ran and whether it is fresh, on one page anyone can open.)

Fresh data changes what data is for. Weekly numbers can explain last week. Daily numbers can change this one.

## The result

Chart: Days from something happening to it reaching the dashboard: sources on connectors against sources uploaded by hand.

Average days from an event to the dashboard over 10 weeks: sources on connectors fall from about 7 days to about 1 while sources uploaded by hand stay near 7.

Of every hundred scheduled runs, more than 99 finish on their own. The rest retry, and the few that still fail tell someone why. The person who used to spend Mondays downloading files now reads the status page with a coffee and gets on with analysis.

## What they own now

### Theirs to keep

Every connector lives in their repository and runs in their cloud, on credentials only they hold.

- **The connectors**: 13 services, one pattern, fully tested.
- **The data contracts**: A schema and checks for every source.
- **The run log**: Every run, searchable, with its response.
- **The status page**: Freshness for every source, at a glance.
- **The runbook**: How to add the next source in a day.

### How it was measured

Delay is the average number of days between an event and its arrival on the dashboard, for sources moved to connectors and for sources still uploaded by hand, over ten weeks. Uploads are counted per week.

- Sources: 16: 13 by API, 3 checked files
- Schedule: Daily, landed by 6 am
- Period: 10 weeks
- Runs: Over 99% finish unaided

