# HTTP to Postman Converter - HTTP Handoff (`teagan101-cloud/http-to-postman-converter`) Actor

Convert named .http and .rest files into a Postman Collection v2.1 for customer handoffs and shared API examples. Preserves file-local variables and reports unsupported syntax. $0.05 per successful collection; hosting included.

- **URL**: https://apify.com/teagan101-cloud/http-to-postman-converter.md
- **Developed by:** [Teagan Doherty](https://apify.com/teagan101-cloud) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$50.00 / 1,000 exported collections

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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 examples already wired to this Actor's own input schema, see the [API](#api) section below.

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`).

# README

## HTTP to Postman Converter — HTTP Handoff

Turn your maintained `.http` and `.rest` request files into a Postman Collection v2.1 for customer handoffs and shared API examples. Regenerate the collection when your API requests change.

Supply named request files and any referenced text body files. Download one collection and its conversion diagnostics. The converter does not send your HTTP requests or execute source scripts.

### Get started

1. Remove secrets from the files you intend to upload.
2. Enter the files as relative paths and text contents, as shown below, and run the Actor.
3. Open **Storage > Key-value store** in the run. Use the download action beside **collection.json**, and check **diagnostics.json**. Import the collection JSON in Postman and supply your environment values before sending requests. The Output tab also links to these files; if your browser blocks an inline preview, use the Storage download action.

```json
{
  "files": [
    {
      "path": "api/items.http",
      "content": "@baseUrl = https://example.invalid\n### Items\nGET {{baseUrl}}/items?limit=10\n"
    }
  ],
  "collectionName": "Team API handoff",
  "includeLiteralCredentials": false
}
```

The example address is intentionally non-routable. Replace it with your API address before sending requests in Postman.

For repeated handoffs, invoke the Actor through the Apify API or CLI with updated file contents. Scheduling the same saved input will export the same content; this Actor does not watch or fetch your repository. The **API** tab provides the current integration endpoints.

### What is preserved

- One Postman folder per source request file.
- File-scoped variables, nested variables, repeated query parameters and multiline URLs.
- Raw text and JSON bodies, including text files referenced inside the supplied folder.
- Basic and Bearer authentication syntax, subject to the credential setting below.
- A limited response-script adapter for `client.test`, `client.assert`, `client.log`, `response.status` and `response.body`.

Postman environment values override file defaults. This is an explicit export policy, not complete JetBrains runtime equivalence. Public environment JSON files are not automatically imported; supply their values in a Postman environment after download.

### Limits and blocked input

Supply **1–200 text files**, up to **5 MiB total**, including at least one `.http` or `.rest` file. Relative paths use `/` separators and must fit within 240 characters. Absolute paths, traversal, duplicate paths, file/directory conflicts and request files in ignored build or metadata folders are rejected. The optional collection name is 1–120 characters.

Unsupported syntax blocks the entire collection with diagnostics. Examples include multipart bodies, dynamic/response-reference variables, external scripts, unsupported JetBrains runtime APIs, CONNECT and non-HTTP requests. Binary files are unsupported. The converter also caps a collection at 5,000 requests and 128 distinct file-variable names.

### Data and credentials

**Files are uploaded to and processed on Apify. Remove secrets before uploading.** Run input, output and diagnostics remain in Apify storage according to your account's retention settings. Temporary conversion files are removed after normal completion; terminated containers follow platform cleanup.

Private environment files (`http-client.private.env.json`, `.env` and `.env.*`) are prohibited. With `includeLiteralCredentials: false`, recognized credential headers and sensitive file variables become empty placeholders. This is not comprehensive secret detection: secrets in bodies, query strings or unrecognized fields may remain. Credential omission happens after upload and does not sanitize the stored input.

Source scripts are included for later execution in Postman. Review them and the diagnostics before running or sharing a collection. The Actor does not forward your source files to another service.

### Output and support

A result row shows conversion counts; it is not evidence of payment. Run output links lead to `collection.json`, `diagnostics.json` and the `OUTPUT` summary in the default key-value store. Blocked input produces diagnostics without a collection.

If output reports `payment-uncertain`, the saved collection remains available while the charge needs reconciliation. Do not submit a replacement run just to resolve that status. Contact the developer through the Actor's Issues tab with the run ID and a sanitized example; do not post credentials or confidential request files.

HTTP Handoff is independently developed and is not affiliated with or endorsed by JetBrains or Postman.

# Actor input Schema

## `files` (type: `array`):

1–200 objects with path and content strings, at most 5 MiB of UTF-8 content total. Use relative / paths. Include .http/.rest files and referenced text bodies. Do not upload private environment files.

## `collectionName` (type: `string`):

Optional name, 1–120 characters.

## `includeLiteralCredentials` (type: `boolean`):

Default false replaces recognized credential headers and sensitive file variables with empty placeholders. This does not redact every possible secret, especially bodies and query strings. Uploaded input remains in Apify.

## Actor input object example

```json
{
  "files": [
    {
      "path": "requests.http",
      "content": "### Example\nGET https://example.invalid/items?limit=10\n"
    }
  ],
  "includeLiteralCredentials": false
}
```

# Actor output Schema

## `summary` (type: `string`):

No description

## `collection` (type: `string`):

No description

## `diagnostics` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "files": [
        {
            "path": "requests.http",
            "content": "### Example\nGET https://example.invalid/items?limit=10\n"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("teagan101-cloud/http-to-postman-converter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "files": [{
            "path": "requests.http",
            "content": """### Example
GET https://example.invalid/items?limit=10
""",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("teagan101-cloud/http-to-postman-converter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "files": [
    {
      "path": "requests.http",
      "content": "### Example\\nGET https://example.invalid/items?limit=10\\n"
    }
  ]
}' |
apify call teagan101-cloud/http-to-postman-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,teagan101-cloud/http-to-postman-converter"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/LnVX9GZ4VFbr6MJuy/builds/aLFIHNSjY7lJZYJDd/openapi.json
