Light APIlight.gg ↗
Access Destiny 2 weapon stats, perk popularity, god roll rankings, and community reviews from Light.gg via 4 structured endpoints.
What is the Light API?
The Light.gg API exposes 4 endpoints covering Destiny 2 weapon data drawn from Light.gg and the Bungie API, including full weapon stats, perk popularity percentages, popular trait combinations, and community reviews. The get_weapon_details endpoint returns over 8 distinct fields per weapon — stats array, perks_popularity, popular_trait_combinations, community_insight, and user reviews — keyed by Bungie item hash ID.
curl -X GET 'https://api.parse.bot/scraper/8619cb88-88b8-490c-94fb-0c3b8b1b8f28/search_weapons?query=ace+of+spades' \ -H 'X-API-Key: $PARSE_API_KEY'
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 light-gg-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.
"""Walkthrough: Light.gg Destiny 2 weapon data — search, inspect, rank."""
from parse_apis.light_gg___destiny_2_weapon_api import LightGG, WeaponNotFound
client = LightGG()
# Search weapons by name — limit caps total items returned.
for result in client.weapons.search(query="hand cannon", limit=5):
print(result.name, result.url)
# Drill into the first result's full details.
hit = client.weapons.search(query="ace of spades", limit=1).first()
if hit:
weapon = hit.details()
print(weapon.name, weapon.item_type)
for stat in weapon.stats[:3]:
print(f" {stat.name}: {stat.value}")
# Browse the current popular weapons ranking.
for popular in client.weapons.popular(limit=5):
print(f"#{popular.rank} {popular.name}")
# Fetch a weapon by ID with typed-error handling.
try:
ace = client.weapons.get(item_id="347366834")
print(ace.name, ace.item_type, len(ace.reviews), "reviews")
except WeaponNotFound as exc:
print(f"Weapon not found: {exc.item_id}")
print("exercised: weapons.search / details / weapons.popular / weapons.get")
Full-text search over light.gg's weapon and item database by name. Returns matching items with their Bungie hash IDs and light.gg URLs. Results include weapons, catalysts, ornaments, and other named items whose title matches the query.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search term for weapon or item name (e.g. 'ace of spades', 'hand cannon') |
{
"type": "object",
"fields": {
"results": "array of matching weapon/item summaries with id, name, url"
},
"sample": {
"data": {
"results": [
{
"id": "347366834",
"url": "https://www.light.gg/db/items/347366834",
"name": "Ace of Spades"
}
]
},
"status": "success"
}
}About the Light API
Weapon Search and Lookup
The search_weapons endpoint accepts a free-text query parameter (e.g. 'ace of spades' or 'hand cannon') and returns an array of matching items, each with an id, name, and url. The id values returned here are Bungie item hash IDs, which feed directly into get_weapon_details as the item_id parameter.
Detailed Weapon Data
get_weapon_details is the core endpoint. Given a numeric Bungie item hash, it returns the weapon's stats array (each stat includes name, value, and hash), perks_popularity (each perk with its community adoption percentage), popular_trait_combinations (perk pairs with a popularity string), community_insight text, user reviews with ratings and comments, and metadata like itemTypeDisplayName and flavor description. This makes it straightforward to build god roll evaluation tools without maintaining your own Bungie API integration.
Popularity Rankings and Perk-Based Search
get_popular_weapons requires no inputs and returns up to 25 weapons ranked by community usage, each with an id, name, rank, and url — useful for tracking the current meta. search_by_perks takes a comma-separated list of perk hash IDs in the perk_ids parameter and returns all weapons that carry those perks, letting you approach the dataset from the perk side rather than the weapon side.
Data Coverage Notes
Weapon hash IDs in this API correspond directly to Bungie's item manifest, so they remain stable across Light.gg and any other Bungie-ecosystem tooling. Perk popularity percentages and community insights reflect Light.gg's user-contributed data and may lag shortly after new content releases.
The Light API is a managed, monitored endpoint for light.gg — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when light.gg 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 light.gg 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.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a god roll advisor that ranks perk combinations by the
popularityfield frompopular_trait_combinations - Display community-written
community_insighttext alongside weapon stats in a Destiny 2 companion app - Track meta shifts by polling
get_popular_weaponsand logging rank changes over time - Find all weapons that share a desired perk using
search_by_perkswith specific perk hash IDs - Aggregate user
reviewsand ratings fromget_weapon_detailsto surface sentiment on newly released weapons - Compare
statsarrays across multiple weapons by resolving multiple Bungie item hash IDs in sequence - Auto-complete weapon search in a loadout builder using
search_weaponsquery results
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 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.
Does Bungie offer an official API for Destiny 2 weapon data?+
What does `perks_popularity` actually represent in `get_weapon_details`?+
perks_popularity is an array where each object contains a perk name and a popularity percentage string reflecting how often that perk appears in Light.gg users' submitted rolls for that weapon. It is distinct from popular_trait_combinations, which shows paired perk combinations ranked by frequency.Does the API return data for Destiny 1 weapons or only Destiny 2?+
Is there pagination for `search_weapons` or `get_popular_weapons` results?+
get_popular_weapons returns up to 25 weapons with no pagination parameters. search_weapons returns all matching results for the query string in a single response array. Neither endpoint currently supports page or offset parameters. You can fork the API on Parse and revise it to add pagination or result-count controls.Does the API expose PvP or PvE-specific god roll recommendations separately?+
popular_trait_combinations array per weapon without splitting by activity type (PvP vs. PvE). The community_insight text field may contain activity-specific commentary, but it is unstructured. You can fork the API on Parse and revise it to add an activity-filter parameter if that distinction becomes available in the source data.