# Call a JSON API for a list of URLs

**Use case:** 

Sends a GET request to every URL in the list, parses each JSON answer into a dataset row and copies chosen values into 'extracted'. Retries 429 and 5xx answers. This example queries the public Apify Store API.

## Input

```json
{
  "urls": [
    "https://api.apify.com/v2/store?search=ocr&limit=2",
    "https://api.apify.com/v2/store?search=transcription&limit=2"
  ],
  "method": "GET",
  "extract": {
    "total": "data.total",
    "firstActor": "data.items.0.name"
  },
  "parseJson": true,
  "maxResponseKb": 512,
  "includeResponseHeaders": false,
  "followRedirects": true,
  "maxRequests": 1000,
  "maxConcurrency": 10,
  "maxPerSite": 4,
  "delayMs": 0,
  "timeoutSecs": 30,
  "maxRetries": 2,
  "retryNonIdempotent": false
}
```

## Output

```json
{
  "index": {
    "label": "#",
    "format": "number"
  },
  "id": {
    "label": "Id"
  },
  "url": {
    "label": "URL",
    "format": "link"
  },
  "httpStatus": {
    "label": "HTTP",
    "format": "number"
  },
  "extracted": {
    "label": "Extracted",
    "format": "object"
  },
  "json": {
    "label": "JSON",
    "format": "object"
  },
  "body": {
    "label": "Body",
    "format": "text"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The HTTP Request Runner: Bulk API Calls from URLs & Datasets Actor is ready to run with the inputs already set for "Call a JSON API for a list of URLs". [Sign up or log in](https://console.apify.com/create-task-from-example/H1OVBkVwWhPSGglTF) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Call a JSON API for a list of URLs" task

The HTTP Request Runner: Bulk API Calls from URLs & Datasets Actor will start running based on the input automatically. You can also change all the input fields, like URLs, method, and more, to match your specific use case.

### 3. Receive the "Call a JSON API for a list of URLs" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as #, id, URL, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Call a JSON API for a list of URLs" task via API](https://apify.com/klarto/http-request-runner.md).

## FAQ

### How do I pass an API key?

Put it in Headers, for example Authorization: Bearer <key>. The JSON API task stores headers encrypted and does not send them on after a redirect to another site.

### Is a 404 answer charged?

Yes. The JSON API task charges $0.002 for every request that got an HTTP answer, 4xx and 5xx included. Network errors, timeouts and blocked addresses are free.

### Can I call the API once per row of a dataset?

Yes. Pick the dataset in 'Dataset rows to send' and write a URL template such as https://api.example.com/items/{{id}}; each answer gets the row's id and source.

## About this Actor

This example demonstrates how to use [HTTP Request Runner: Bulk API Calls from URLs & Datasets](https://apify.com/klarto/http-request-runner.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/klarto/http-request-runner.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/klarto/http-request-runner.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`).
