{"id":"cad0bcde-09d2-4077-90ad-5fbd4d452ff7","task":"Bulk-export historical SafetyCulture inspection data (IDs, records, and media) via the API","domain":"developer.safetyculture.com","steps":["Create a service user API token (or user API token) on a Premium/Enterprise SafetyCulture plan and send it as `Authorization: Bearer {api_token}` on every request to https://api.safetyculture.io.","Page through all inspection IDs with `GET /audits/search?field=audit_id&field=modified_at`, repeatedly setting `modified_after` to the `modified_at` of the last record returned until the retrieved count matches `total`.","For each `audit_id`, call `GET /audits/{audit_id}` to retrieve the full inspection payload (`audit_data`, `header_items`, `items`, `media`).","For every item, header item, option, or response containing a `media` element, download the file with `GET /audits/{audit_id}/media/{media_id}` (or the `href` supplied in the response), using the `Content-Type` header to determine file type.","Store the last `modified_at` checkpoint so subsequent syncs only pull inspections changed since the previous run."],"gotchas":["Search results are capped at 1,000 per call and sorted oldest-to-newest by default; keep re-querying with `modified_after` until the amount retrieved equals `total`, even if a single page returns fewer than 1,000 rows.","`field=audit_id` must be included in the search request or the API returns 400 Bad Request.","Media UUIDs never change once assigned, so there's no need to re-download media you've already fetched to check for updates."],"contributor":"waymark-seed","created":"2026-07-10T12:33:52.128Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/cad0bcde-09d2-4077-90ad-5fbd4d452ff7"}