{
  "slug": "combine-multiple-apis-into-single-json",
  "title": "How to Combine Multiple API Responses into One JSON Without a Backend",
  "metaTitle": "Combine Multiple API Responses into One JSON - RealComposer",
  "metaDescription": "Combine multiple REST APIs into one JSON payload without a backend. RealComposer fetches upstream APIs concurrently at the edge with sub-10ms response.",
  "headline": "Zero-Maintenance Backend for Frontend (BFF) on Cloudflare Edge",
  "category": "aggregation",
  "categoryLabel": "Multi-API Aggregation",
  "urgency": 10,
  "clientPlatform": "Any Frontend / Mobile",
  "upstreamServices": [
    "REST APIs",
    "Microservices"
  ],
  "searchIntentQuery": "combine multiple api responses into single json without backend",
  "directAnswerSummary": "You do not need to spin up an Express, FastAPI, or Docker microservice just to stitch REST APIs together. RealComposer fetches multiple upstream endpoints concurrently at the edge, injects private credentials, and combines the responses into a single JSON schema with sub-10ms response times.",
  "problem": {
    "title": "The Microservice Tax for Simple Aggregations",
    "explanation": "Maintaining Docker containers, Kubernetes, or Node servers just to merge 2 JSON responses introduces CI/CD overhead, server maintenance, and security patch burdens.",
    "risks": [
      "High cloud hosting costs for idle microservices",
      "Maintaining server infrastructure for simple glue code"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Add Upstream REST Steps",
      "description": "Configure URLs and query params for each service."
    },
    {
      "stepNumber": 2,
      "title": "Map Keys in Visual Builder",
      "description": "Assemble clean output hierarchy in the browser."
    },
    {
      "stepNumber": 3,
      "title": "Deploy Live at Edge",
      "description": "Publish to Cloudflare edge in 1 click."
    }
  ],
  "pipelineConfig": {
    "name": "Multi-API Orchestrator",
    "method": "GET",
    "cacheTtlSeconds": 60,
    "steps": [
      {
        "stepKey": "serviceA",
        "upstreamUrlTemplate": "https://jsonplaceholder.typicode.com/users/1",
        "httpMethod": "GET",
        "headersTemplate": {},
        "timeoutMs": 3000
      },
      {
        "stepKey": "serviceB",
        "upstreamUrlTemplate": "https://jsonplaceholder.typicode.com/posts/1",
        "httpMethod": "GET",
        "headersTemplate": {},
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "author.name",
          "sourceStep": "serviceA",
          "sourcePath": "name"
        },
        {
          "targetPath": "author.email",
          "sourceStep": "serviceA",
          "sourcePath": "email"
        },
        {
          "targetPath": "article.title",
          "sourceStep": "serviceB",
          "sourcePath": "title"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "serviceA": {
      "name": "Leanne",
      "email": "sincere@april.biz"
    },
    "serviceB": {
      "title": "Edge Computing"
    }
  },
  "sampleSlimmedOutput": {
    "author": {
      "name": "Leanne",
      "email": "sincere@april.biz"
    },
    "article": {
      "title": "Edge Computing"
    }
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/acme/combined-feed\"",
  "faqs": [
    {
      "question": "How many APIs can I merge into one?",
      "answer": "RealComposer supports running multiple parallel steps concurrently via Promise.all."
    }
  ],
  "relatedRecipeSlugs": [
    "merge-supabase-and-stripe-into-single-endpoint",
    "trim-stripe-json-for-mobile-apps"
  ],
  "links": {
    "page": "https://realcomposer.com/recipes/combine-multiple-apis-into-single-json",
    "markdown": "https://realcomposer.com/recipes/combine-multiple-apis-into-single-json.md",
    "json": "https://realcomposer.com/recipes/combine-multiple-apis-into-single-json.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=combine-multiple-apis-into-single-json&via=agent"
  }
}