# API Integration Request Snippet Generator

**Use case:** 

Generate documented cURL, JavaScript, axios, and Python snippets for multiple GET and POST API calls in one run.

## Input

```json
{
  "requests": [
    {
      "url": "https://jsonplaceholder.typicode.com/posts/1",
      "method": "GET",
      "headers": {
        "Accept": "application/json"
      },
      "outputFormats": [
        "curl",
        "fetch",
        "python"
      ]
    },
    {
      "url": "https://jsonplaceholder.typicode.com/posts",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json"
      },
      "body": "{\"title\": \"Hello\", \"body\": \"Generated request example\", \"userId\": 1}",
      "bodyType": "json",
      "outputFormats": [
        "curl",
        "fetch",
        "axios",
        "python"
      ]
    }
  ],
  "includeComments": true,
  "prettyPrint": true
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "text"
  },
  "method": {
    "label": "Method",
    "format": "text"
  },
  "curl": {
    "label": "cURL",
    "format": "text"
  },
  "fetch": {
    "label": "fetch (JS)",
    "format": "text"
  },
  "axios": {
    "label": "axios",
    "format": "text"
  },
  "python": {
    "label": "Python requests",
    "format": "text"
  },
  "error": {
    "label": "Error",
    "format": "text"
  }
}
```

## About this Actor

This example demonstrates how to use [HTTP Request Builder](https://apify.com/automation-lab/http-request-builder) with a specific input configuration. Visit the [Actor detail page](https://apify.com/automation-lab/http-request-builder) to learn more, explore other use cases, and run it yourself.