# Integrating the jobdata API with Zapier

Use Zapier + the jobdata API to automate job ingestion, alerts, enrichment, and reporting workflows without maintaining custom integrations.

---

Integrating the jobdata API with [Zapier](https://zapier.com/) lets you move fresh job listing data into tools your team already uses, like Google Sheets, Airtable, Slack, CRMs, and internal databases. This guide reflects current Zapier capabilities and current jobdata API behavior.

## Prerequisites

- **Zapier account** with access to **Webhooks by Zapier** (currently available on Professional, Team, and Enterprise plans).
- **jobdata API key** from your [jobdata dashboard](/accounts/dashboard/).
- A destination app where you want to send or process job data (e.g., Sheets, Airtable, Slack, Notion, etc.).

## Before You Build: Important API Details

- Use endpoint URLs with a trailing slash, e.g. `https://jobdataapi.com/api/jobs/`
- Authenticate with header:
  - `Authorization: Api-Key YOUR_API_KEY`
- Jobs responses are paginated and return:
  - `count`, `next`, `previous`, `results`
- `/api/jobs/` defaults to `max_age=90` when no explicit slicing/age range is provided.
- Some filters/features are plan-gated and may return `403` if your plan does not include them.

## Step 1: Create a New Zap

1. In Zapier, click **Create Zap**.
2. Give it a clear name, such as:
   - `Jobdata API -> Slack alerts`
   - `Jobdata API -> Google Sheets sync`

## Step 2: Pick the Right Trigger

For outgoing API polling, use **Schedule by Zapier** as the trigger.

Why: the old “Catch Hook trigger” pattern is for receiving inbound webhooks, not for scheduled outbound API requests.

Recommended setup:

- **App**: Schedule by Zapier
- **Trigger Event**: Every Hour (or custom frequency)
- Set timezone and interval that match your ingestion needs

Notes:

- Schedule is a built-in Zapier tool and does not count toward task usage.
- Start with hourly polling, then tighten frequency only if needed.

## Step 3: Call the jobdata API with Webhooks by Zapier

Add an action step:

- **App**: Webhooks by Zapier
- **Event**: `GET` (or `Custom Request` if you need advanced options)

Configure:

- **URL**: `https://jobdataapi.com/api/jobs/`
- **Query Params** (example):
  - `title=python`
  - `has_remote=true`
  - `max_age=7`
  - `page_size=200`
- **Headers**:
  - `Authorization: Api-Key YOUR_API_KEY`

Test the step and confirm you receive `count`, `next`, and `results`.

## Step 4: Process the Results

The `results` field is your list of job objects. Common next steps:

- **Looping by Zapier**: iterate each item in `results`
- **Filter by Zapier**: keep only records that match rules (country, language, keywords, etc.)
- **Formatter by Zapier**: normalize dates/text before writing downstream
- Destination action:
  - Google Sheets row create/update
  - Airtable record create/update
  - Slack alert
  - CRM/task system update

## Step 5: Handle Pagination (If You Need More Than One Page)

By default, one webhook call returns one page. For deeper pulls:

- Read `next` in the API response.
- Use a pagination strategy, for example:
  - loop through page numbers using `page` query parameter, or
  - store and re-use cursor/page state between runs.
- Keep page depth bounded to protect task usage and avoid long Zap runs.

Tip: for many “new jobs” workflows, a single page with tight filters (e.g., `max_age=1` or `max_age=7`) is enough and cheaper.

## Step 6: Add Reliability Controls

Use Zapier reliability features for production workflows:

- Enable **Autoreplay** for transient outages/timeouts.
- Use **custom error handling** paths for fallback actions (e.g., notify Slack + continue).
- Review Zap History regularly for:
  - `401`/`403` auth/plan issues
  - `429` throttling
  - `5xx` upstream transient errors

## Step 7: Optimize Task Usage

In Zapier, successful action steps consume tasks. For cost control:

- Keep polling interval practical (don’t overschedule).
- Use Filter steps early to stop irrelevant runs.
- Batch or aggregate where possible.
- Prefer built-in tools (`Filter`, `Formatter`, `Looping`, `Delay`) for control logic.
- Track usage in Zap History and billing dashboard.

## Step 8: Test End-to-End and Turn On

Before publishing:

1. Run trigger test.
2. Run webhook request test.
3. Verify field mapping from `results` to destination app.
4. Publish Zap and monitor first live runs.

## Common Troubleshooting

- **301 redirect / odd behavior**
  - Use `/api/jobs/` (with trailing slash), not `/api/jobs`
- **403 Forbidden**
  - Check API key and whether filter/feature requires a higher subscription tier
- **429 Too Many Requests**
  - Reduce polling frequency, reduce page depth, add retry/error handling
- **Missing older jobs**
  - You may be seeing default `max_age=90`; set `max_age` explicitly for your use case
- **No records in destination**
  - Verify you’re iterating over `results`, not only top-level response fields

## Conclusion

With Schedule + Webhooks + Looping, Zapier can run stable jobdata API automations with minimal setup. Start with a simple hourly pull and one destination, validate output quality, then expand into pagination, enrichment, and multi-system workflows once your baseline Zap is stable.
