{
  "id": 23503614,
  "title": "How to call any API from Clay, one row at a time (with a real example)",
  "url": "https://urgent.news/2026/12/04/how-to-call-any-api-from-clay-one-row-at-a-time-with-a-real-example",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-12-04T22:19:46.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/data_xplorer/how-to-call-any-api-from-clay-one-row-at-a-time-with-a-real-example-4ag5"
  },
  "original_language": null,
  "account": "Clay, a platform with numerous built-in data providers, occasionally encounters situations where the desired data is housed within an API that isn't part of the pre-existing list. This article explains how to transform any HTTP API into a Clay column, using a specific Apify Actor called HTTP Request. The example will demonstrate how to determine which email provider each company utilizes, such as Google Workspace, Microsoft 365, or another provider.\n\nThe process involves starting a run of the actor with a small JSON input that outlines a single HTTP call for each row in your Clay table. The actor executes the call, retries it if it receives a 429 or 5xx status code, and then returns a row containing the status code, the body response, and any error type if there was no response at all.\n\nTo get started, you need to connect Apify to Clay. After creating a free Apify account, you can copy your API token from the Settings > API & Integrations section. In your Clay table, click Add enrichment, search for Apify, and select Run Apify Actor. Paste the token to link your accounts and choose the Actor data_xplorer/http-request.\n\nFor the initial step, you'll need to describe the call. If your table contains a Domain column, Google provides a free DNS over HTTPS endpoint that returns MX records (mail servers) for any domain as JSON. The URL is https://dns.google/resolve?name=apify.com&type=MX. In the Input Data box, input the call and insert the Domain column where the domain should be placed (type / in Clay to select a column). The JSON input should look like this: {\"url\" : \"https://dns.google/resolve\", \"params\" : {\"name\" : \"/Domain\", \"type\" : \"MX\"}}. Run the column on two or three rows first to validate the process.\n\nNext, transform the response into a clean column. Add a Clay formula column on top of the results, and use a condition such as: \"contains google.com or googlemail.com : Google Workspace\", \"contains outlook.com : Microsoft 365\", \"empty: no email on this domain\", and \"anything else: other\". This new enrichment column is created based on an API that Clay did not originally support.\n\nWhen dealing with APIs that require an API key in a header, the pattern remains the same. Simply modify the JSON input to include the key, for example: {\"url\" : \"https://api.example.com/v1/companies\", \"params\" : {\"domain\" : \"/Domain\"}, \"headers\" : {\"X-API-Key\" : \"YOUR_API_KEY\"}}. The API key will be included untouched in the API call, but it will be masked ([REDACTED]) in the stored results, so you can share runs without revealing the key.\n\nPaste the curl command from the API documentation as a shortcut. This will allow you to input the address, method, headers, and body directly from the provided command. All these methods work for POST requests with a JSON body, and for requests you can copy using the 'Copy as cURL' option in your browser's developer tools.\n\nUsing an actor has several benefits over directly calling the API. It handles rate limits by retrying with increasing pauses on 429 or 503 responses, providing clear failure indications, and even offers the ability to route calls through a chosen country using Apify Proxy. This actor can be utilized with various tools like n8n, Make, Zapier, Python, or AI agents. As your data grows, you can export it, run it in batches, and only pay for actual responses.\n\nWhen testing, start with the JSON input from the Actor's Input tab in Apify (switch to JSON view), modify it with fixed values in Clay, then replace those values with your columns. Any Clay errors related to JSON parsing are usually due to improper quoting of the inserted values. Set a run condition on the column (only when Domain is not empty) to avoid starting a run for empty rows.\n\nFor further exploration, you can find the Python script, a Clay guide, and an n8n template in the following repository: dataxplore19/http-request-api-python. The Actor page also provides a full list of options, such as redirects, response size, webhooks, and proxy settings: HTTP Request on Apify.",
  "summary": "Clay has a lot of data providers built in. But sooner or later, the data you need sits behind an API that is not in the list: a niche industry database, your own backend, a public endpoint you found in someone's docs. This post shows how to turn any HTTP API into a Clay column, using a small Apify Actor I built for that job, HTTP Request . We will build a real column as an example: which email…",
  "summary_source": "publisher",
  "key_points": [
    "Transform any HTTP API into a Clay column using Apify Actor HTTP Request",
    "Execute HTTP call per row in Clay table, retry on 429/5xx status",
    "Validate process with two or three rows, then create email provider enrichment"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "outlets_capped": false,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}