# Call a REST API from Clay

**Use case:** 

Runs one public GET and returns HTTP status plus JSON body in the Dataset. Replace the sample URL and lookupKey with your Clay row values. Map body fields back into Clay columns after the run.

## Input

```json
{
  "requests": [
    {
      "lookupKey": "clay-row-1",
      "method": "GET",
      "url": "https://jsonplaceholder.typicode.com/posts/1",
      "headers": {
        "Accept": "application/json"
      }
    }
  ],
  "timeoutSecs": 30,
  "maxConcurrency": 5,
  "maxRetries": 1,
  "retryNonIdempotent": false,
  "maxResponseBytes": 262144,
  "treatNon2xxAsError": false,
  "maxRequests": 100
}
```

## Output

```json
{
  "inputIndex": {
    "label": "Input index"
  },
  "lookupKey": {
    "label": "Lookup key"
  },
  "method": {
    "label": "Method"
  },
  "url": {
    "label": "Url"
  },
  "status": {
    "label": "Status"
  },
  "httpStatus": {
    "label": "Http status"
  },
  "ok": {
    "label": "Ok"
  },
  "bytesReceived": {
    "label": "Bytes received"
  },
  "attempts": {
    "label": "Attempts"
  },
  "durationMs": {
    "label": "Duration ms"
  },
  "billable": {
    "label": "Billable"
  },
  "callbackStatus": {
    "label": "Callback status"
  }
}
```

## About this Actor

This example demonstrates how to use [HTTP Request - Batch API Calls [$4/1K]](https://apify.com/automa-flow/http-request-batch.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/automa-flow/http-request-batch.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/automa-flow/http-request-batch.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
