Discover/Centurygame API
live

Centurygame APIkingshot-giftcode.centurygame.com

Redeem King's Shot gift codes, look up players by ID, and fetch gift code center config via 3 dedicated endpoints. JSON responses with reward data and error codes.

Endpoint health
verified 2d ago
redeem_code
get_player
get_gift_code_config
3/3 passing latest checkself-healing
Endpoints
3
Updated
16d ago

What is the Centurygame API?

The King's Shot Gift Code API exposes 3 endpoints for interacting with the Kingshot mobile game redemption center at kingshot-giftcode.centurygame.com. Use get_player to verify a player exists by their in-game numeric ID, redeem_code to submit a gift code and receive reward item data in return, and get_gift_code_config to retrieve promotional banner URLs for each supported language. All responses include a code field and an err_code for precise error handling.

Try it
The player's in-game ID (numeric string found via the in-game avatar).
api.parse.bot/scraper/ea8ff0bc-09f9-419a-a710-2374107ef49c/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X POST 'https://api.parse.bot/scraper/ea8ff0bc-09f9-419a-a710-2374107ef49c/get_player' \
  -H 'X-API-Key: $PARSE_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "fid": "12345"
}'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace kingshot-giftcode-centurygame-com-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""
King's Shot Gift Code API Client

Provides a client for interacting with the King's Shot mobile game gift code
redemption center API. Supports player lookup, gift code redemption, and
configuration retrieval.

Get your API key from: https://parse.bot/settings
"""

import os
import sys
from typing import Any, Dict, Optional

import requests


class ParseClient:
    """Client for King's Shot Gift Code API."""

    def __init__(self, api_key: Optional[str] = None):
        """
        Initialize the Parse API client.

        Args:
            api_key: API key for authentication. If not provided, reads from
                    PARSE_API_KEY environment variable.
        """
        self.base_url = "https://api.parse.bot"
        self.scraper_id = "ea8ff0bc-09f9-419a-a710-2374107ef49c"
        self.api_key = api_key or os.getenv("PARSE_API_KEY")

        if not self.api_key:
            raise ValueError(
                "API key not provided. Set PARSE_API_KEY env var or pass api_key parameter."
            )

    def _call(
        self, endpoint: str, method: str = "POST", **params
    ) -> Dict[str, Any]:
        """
        Make a request to the Parse API.

        Args:
            endpoint: The API endpoint name (e.g., 'get_player')
            method: HTTP method ('GET' or 'POST')
            **params: Query/body parameters for the request

        Returns:
            Parsed JSON response as dictionary

        Raises:
            requests.RequestException: If the HTTP request fails
        """
        url = f"{self.base_url}/scraper/{self.scraper_id}/{endpoint}"
        headers = {"X-API-Key": self.api_key, "Content-Type": "application/json"}

        try:
            if method.upper() == "GET":
                response = requests.get(url, headers=headers, params=params)
            else:  # POST
                response = requests.post(url, headers=headers, json=params)

            response.raise_for_status()
            return response.json()
        except requests.RequestException as e:
            print(f"API request failed: {e}")
            raise

    def get_player(self, fid: str) -> Dict[str, Any]:
        """
        Look up a King's Shot player by their in-game player ID.

        Args:
            fid: The player's in-game ID (numeric string)

        Returns:
            API response containing player information or error details
        """
        return self._call("get_player", method="POST", fid=fid)

    def redeem_code(self, fid: str, code: str) -> Dict[str, Any]:
        """
        Redeem a gift code for a King's Shot player.

        Args:
            fid: The player's in-game ID
            code: The gift code to redeem (case-sensitive)

        Returns:
            API response containing redemption result and rewards
        """
        return self._call("redeem_code", method="POST", fid=fid, code=code)

    def get_gift_code_config(self) -> Dict[str, Any]:
        """
        Retrieve the gift code center configuration.

        Returns:
            API response containing banner URLs for each supported language
        """
        return self._call("get_gift_code_config", method="GET")


def main():
    """Practical workflow example for King's Shot Gift Code API."""

    # Initialize client
    client = ParseClient()

    # List of player IDs and gift codes to process
    players_and_codes = [
        {"player_id": "12345", "codes": ["WELCOME2024", "KINGSHOT100"]},
        {"player_id": "67890", "codes": ["CELEBRATE50"]},
        {"player_id": "11111", "codes": ["BONUS200", "FREEGEMS"]},
    ]

    print("=" * 60)
    print("King's Shot Gift Code Redemption Workflow")
    print("=" * 60)

    # Step 1: Get gift code configuration
    print("\n[Step 1] Fetching gift code center configuration...")
    try:
        config_response = client.get_gift_code_config()
        if config_response.get("data", {}).get("code") == 0:
            print("✓ Configuration retrieved successfully")
            languages = list(config_response.get("data", {}).get("data", {}).keys())
            print(f"  Supported languages: {', '.join(languages)}")
        else:
            print(
                f"✗ Failed to get config: {config_response.get('data', {}).get('msg')}"
            )
            return
    except Exception as e:
        print(f"✗ Error fetching config: {e}")
        return

    # Step 2: Verify players and redeem codes
    print("\n[Step 2] Processing player gift code redemptions...")
    print("-" * 60)

    redemption_results = []

    for player_info in players_and_codes:
        player_id = player_info["player_id"]
        codes = player_info["codes"]

        print(f"\nPlayer ID: {player_id}")

        # Verify player exists
        try:
            player_response = client.get_player(player_id)

            if player_response.get("data", {}).get("code") == 0:
                print("  ✓ Player found")
                player_data = player_response.get("data", {}).get("data")
                if isinstance(player_data, dict):
                    print(f"    Player details: {player_data}")
            else:
                print(
                    f"  ✗ Player not found: {player_response.get('data', {}).get('msg')}"
                )
                continue

        except Exception as e:
            print(f"  ✗ Error looking up player: {e}")
            continue

        # Redeem each code for this player
        for code in codes:
            print(f"  Redeeming code: {code}")

            try:
                redeem_response = client.redeem_code(player_id, code)
                response_data = redeem_response.get("data", {})

                if response_data.get("code") == 0:
                    rewards = response_data.get("data", [])
                    print("    ✓ Redeemed successfully")
                    if rewards:
                        print(f"      Rewards: {rewards}")
                    redemption_results.append(
                        {
                            "player_id": player_id,
                            "code": code,
                            "status": "success",
                            "rewards": rewards,
                        }
                    )
                else:
                    error_msg = response_data.get("msg")
                    error_code = response_data.get("err_code")
                    print(f"    ✗ Redemption failed: {error_msg} (code: {error_code})")
                    redemption_results.append(
                        {
                            "player_id": player_id,
                            "code": code,
                            "status": "failed",
                            "error": error_msg,
                        }
                    )

            except Exception as e:
                print(f"    ✗ Error redeeming code: {e}")
                redemption_results.append(
                    {
                        "player_id": player_id,
                        "code": code,
                        "status": "error",
                        "error": str(e),
                    }
                )

    # Step 3: Summary
    print("\n" + "=" * 60)
    print("Redemption Summary")
    print("=" * 60)

    successful = sum(1 for r in redemption_results if r.get("status") == "success")
    failed = sum(1 for r in redemption_results if r.get("status") == "failed")
    errors = sum(1 for r in redemption_results if r.get("status") == "error")

    print(f"Total attempts: {len(redemption_results)}")
    print(f"Successful: {successful}")
    print(f"Failed: {failed}")
    print(f"Errors: {errors}")

    if successful > 0:
        print("\n✓ Successfully redeemed codes:")
        for r in redemption_results:
            if r.get("status") == "success":
                print(f"  - Player {r['player_id']}: {r['code']}")

    if failed > 0:
        print("\n✗ Failed redemptions:")
        for r in redemption_results:
            if r.get("status") == "failed":
                print(f"  - Player {r['player_id']}: {r['code']} ({r['error']})")


if __name__ == "__main__":
    try:
        main()
    except KeyboardInterrupt:
        print("\n\nInterrupted by user")
        sys.exit(0)
    except Exception as e:
        print(f"\nFatal error: {e}")
        sys.exit(1)
All endpoints · 3 totalmissing one? ·

Look up a King's Shot player by their in-game player ID. Returns player information if the ID exists, or an error response (code=1, err_code=40001) if the player is not found. The player ID can be found in-game through the avatar in the top left corner.

Input
ParamTypeDescription
fidrequiredstringThe player's in-game ID (numeric string found via the in-game avatar).
Response
{
  "type": "object",
  "fields": {
    "msg": "string status message from the API",
    "code": "integer indicating success (0) or failure (1)",
    "data": "object containing player details when found, or empty array when not found",
    "err_code": "integer error code (0 for success, 40001 for player not found)"
  },
  "sample": {
    "data": {
      "msg": "role not exist.",
      "code": 1,
      "data": [],
      "err_code": 40001
    },
    "status": "success"
  }
}

About the Centurygame API

Player Lookup

The get_player endpoint accepts a single required parameter, fid, which is the numeric player ID visible in-game via the avatar in the top-left corner. A successful response returns code: 0 along with a data object containing player details. If no player matches the supplied fid, the response returns code: 1 and err_code: 40001. This lets you validate player IDs before attempting redemption, reducing wasted requests.

Gift Code Redemption

The redeem_code endpoint takes both fid (player ID) and code (the alphanumeric gift code, case-sensitive). On success, data contains an array of reward items granted to the player. Failure states are communicated through err_code: 40014 signals the gift code was not found or is invalid, while 40001 indicates the player ID does not exist. Codes must be redeemed per-player — there is no batch redemption across multiple fid values in a single request.

Gift Code Center Configuration

The get_gift_code_config endpoint requires no parameters and returns a data object keyed by language code. Each language entry contains pc_banner and mob_banner URL strings pointing to the promotional imagery for that locale. This is useful for building localized redemption UIs that mirror the official gift code center's appearance.

Reliability & maintenanceVerified

The Centurygame API is a managed, monitored endpoint for kingshot-giftcode.centurygame.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when kingshot-giftcode.centurygame.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official kingshot-giftcode.centurygame.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
2d ago
Latest check
3/3 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Validate a King's Shot player ID before presenting a gift code redemption form
  • Build a self-service redemption tool where players enter their fid and a code to claim in-game rewards
  • Display language-specific promotional banners from get_gift_code_config in a web or mobile redemption portal
  • Surface clear error messages to users by mapping err_code values (40001, 40014) to human-readable feedback
  • Track redemption outcomes by logging data reward arrays returned from successful redeem_code calls
  • Automate gift code distribution campaigns by iterating over a list of player IDs and submitting codes programmatically
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does King's Shot or Century Games offer an official public developer API for gift code redemption?+
Century Games does not publish a documented public developer API for the King's Shot gift code center. The redemption portal at kingshot-giftcode.centurygame.com is intended for end-user redemption rather than third-party developer integration.
What does `redeem_code` actually return on a successful redemption?+
On success (code: 0, err_code: 0), the data field contains an array of reward items that were granted to the player. On failure, data is an empty array and err_code identifies the reason: 40014 means the gift code was not found or is invalid, and 40001 means the player ID does not exist.
Can I look up a player's game stats, inventory, or match history through this API?+
No — player data is limited to what get_player returns for a given fid, scoped to the gift code center context. Game stats, inventory, and match history are not covered. You can fork this API on Parse and revise it to add endpoints targeting other King's Shot data surfaces if they become available.
Is there a way to list all currently valid gift codes through this API?+
The API does not expose a gift code listing endpoint. The three endpoints cover player lookup, code redemption, and banner configuration. You can fork this API on Parse and revise it to add a gift code discovery endpoint if that data surface is accessible.
Are gift codes case-sensitive, and can the same code be redeemed more than once per player?+
Yes, the code parameter passed to redeem_code is case-sensitive. Attempting to redeem a code that has already been used by the same player, or one that does not exist, returns err_code: 40014. The API response does not distinguish between an already-used code and a completely invalid one — both surface the same error code.
Page content last updated . Spec covers 3 endpoints from kingshot-giftcode.centurygame.com.
Related APIs in EntertainmentSee all →
store.steampowered.com API
Search Steam Store listings, fetch featured categories (specials, top sellers, new releases), and retrieve app details and user reviews by Steam AppID.
store.epicgames.com API
Access data from store.epicgames.com.
seatgeek.com API
Search for events and performers, view ticket listings with pricing data, and explore venue information across multiple event categories. Get real-time insights into event details, ticket price trends, and what's currently trending to help you find and compare tickets.
poe.ninja API
Access real-time Path of Exile economy data from poe.ninja, including item prices, currency exchange rates, divination card values, market trends, and build statistics by class.
justwatch.com API
Search for movies and TV shows, retrieve streaming availability and detailed metadata, browse trending content, and discover similar titles — all via JustWatch.
axs.com API
Search for events, performers, and venues across AXS.com to find tickets, pricing, and availability information in your area or by category. Browse featured events, explore venues by city, and access detailed event information all in one place.
in.bookmyshow.com API
Browse movies and live events across Indian cities on BookMyShow. Retrieve recommended and now-showing movies, upcoming releases, and event listings with full details including cast, synopsis, ticket info, and similar recommendations.
ticketone.it API
Browse upcoming events and search for artists or venues on TicketOne.it, then check real-time ticket availability and get detailed event information all in one place. Discover featured events by category or search directly to find events to attend.