🔌API Guide

How to Use the Infinite Craft API: Complete Developer Guide

Integrate Infinite Craft recipes and combinations into your applications with our comprehensive REST API. This guide covers authentication, endpoints, code examples, and best practices for developers.

Introduction

The Infinite Craft API provides programmatic access to thousands of crafting recipes and combinations from Infinite Craft. Whether you're building a crafting calculator, a game guide app, or analyzing crafting patterns, our API makes it easy to access all the data you need.

Our API is RESTful, uses standard HTTP methods, and returns JSON responses. All endpoints are protected with API key authentication, ensuring secure access to our database of Infinite Craft combinations.

This guide will walk you through everything you need to know to start using the Infinite Craft API, from getting your API key to making your first request and implementing advanced features.

Getting Started

1. Get Your API Key

To use the Infinite Craft API, you'll need an API key. Contact us through our contact form to request access. Once approved, you'll receive your unique API key.

2. Base URL

All API requests should be made to:

https://nonstopcraft.com/api

3. Authentication

Include your API key in the Authorization header of every request:

Authorization: Bearer YOUR_API_KEY

API Endpoints

GET/api/merge

Combine two items to get a result. If the combination exists in our database, it returns immediately. Otherwise, our AI generates a new combination.

Query Parameters:

  • itemA - First item name
  • itemB - Second item name

Example Request:

GET /api/merge?itemA=fire&itemB=water

Example Response:

{
  "name": "steam",
  "icon": "💨",
  "isNew": false
}
GET/api/database

Retrieve all crafting combinations from our database. Supports optional search filtering.

Query Parameters:

  • search (optional) - Search term
GET/api/crafts/by-result

Get all recipes that produce a specific item. Useful for finding all ways to craft a particular element.

Query Parameters:

  • name - Item name to search for

Code Examples

JavaScript/TypeScript

async function combineItems(itemA, itemB) {
  const response = await fetch(
    `https://nonstopcraft.com/api/merge?itemA=${itemA}&itemB=${itemB}`,
    {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    }
  );
  return await response.json();
}

// Usage
const result = await combineItems('fire', 'water');
console.log(result); // { name: 'steam', icon: '💨', isNew: false }

Python

import requests

def combine_items(item_a, item_b, api_key):
    url = f"https://nonstopcraft.com/api/merge"
    params = {"itemA": item_a, "itemB": item_b}
    headers = {"Authorization": f"Bearer {api_key}"}
    
    response = requests.get(url, params=params, headers=headers)
    return response.json()

"color: #676e95;"># Usage
result = combine_items("fire", "water", "YOUR_API_KEY")
print(result)  "color: #676e95;"># {'name': 'steam', 'icon': '💨', 'isNew': False}

cURL

curl -X GET \
  "https://nonstopcraft.com/api/merge?itemA=fire&itemB=water" \
  -H "Authorization: Bearer YOUR_API_KEY"

Best Practices

Cache Responses
Cache API responses locally when possible. Crafting combinations don't change, so caching can significantly reduce API calls and improve performance.
🔄
Handle Rate Limits
Implement exponential backoff for retries. If you receive a 429 status code, wait before retrying the request.
🔒
Keep Your API Key Secure
Never expose your API key in client-side code or public repositories. Use environment variables or secure key management systems.
📊
Use Batch Endpoints
When fetching multiple items, use batch endpoints like /api/database/batch instead of making multiple individual requests.

Use Cases

📱 Mobile Apps

Build Infinite Craft companion apps that help players discover recipes and track their progress.

🌐 Web Tools

Create crafting calculators, recipe finders, or interactive guides for Infinite Craft players.

🎮 Game Development

Integrate Infinite Craft recipes into your own games or create Infinite Craft-inspired experiences.

📊 Data Analysis

Analyze crafting patterns, discover popular combinations, or study the Infinite Craft recipe graph.

Ready to Get Started?

View our complete API documentation with detailed endpoint descriptions, response formats, and more examples.

View Full Documentation

Get API Access

Contact us to get your API key. Our team usually responds within 24h.