Welcome

XIVAPI provides a massive amount of FINAL FANTASY XIV game data in a JSON format via a REST API. You can fetch information on all sorts of game content that has been discovered and mapped in the SaintCoinach Schema. It also provides Character, Free Company, Linkshell, and PVP Team information from the Lodestone!

Discord

Join our small group of passionate developers, talk about your ideas for building FFXIV apps! The XIVAPI discord is for dev talk, datamining and all things FFXIV.

Jump into the discord: http://cafemaker.wakingsands.com/discord


Patreon Support!

By contributing a small amount every month you support development on XIVAPI, recognition on discord and appreciation from the devs heart!


API Environments

Production Staging Local
https://xivapi.com https://staging.xivapi.com http://xivapi.local

Please always use https when accessing the API.



Keeping up to date

The API is driven directly from the game files. All the data found is 99% raw data, unmodified from the game source. Custom changes are very limited. It is important to remember that the structure or even the location of data can change anytime there is an FFXIV Patch

It is your responsibility to maintain your usage of the API, including any data changes or updates to XIVAPI. Much care is taken to avoid breaking-changes however these can happen. Please ensure you're part of the Discord and following updates happening to the site, especially on FFXIV Patch Days.



API Access

The API can be fully accessed at anytime by hitting any of the desired endpoints. There are two methods of rate-limiting which are based on: Client IP or API key, for frontend applications it is recommended to not use an API key and your users will be rate limited individually. If you are using XIVAPI server side (thus have a static IP) you should use your API key with all requests.

To get your key, login via Discord and access Dev Account at the top.

The rate limit values are as follows:

API Key Client IP
20 / req / sec (*) 20 / req / sec
Lodestone endpoints are limited to 1/second. Lodestone has its own rate limit that is out of XIVAPI's control, you can read more about that on their relative documentation pages.
* Accounts have individually set rate limits and may change based on usage or requirements.
Due Diligence
Just because you can hit the API for X requests a second every second of the day; does not mean that you should. The rate-limit is intended to provide a fair amount of burst requests to each user. The API is used by many fellow FFXIV developers and it is expected of you to be reasonable about your usage and consider how often you really need to hit the site as well as if it's possible to cache/preload data.

Game Content is very static and real-time data (e.g. Characters) makes requests directly to the Lodestone. Be wise with regards to your usage.

Automated Bans Notice
XIVAPI will automatically ban request sources if they reach a high threshold. This lasts for 1 hour, this is very obvious to the creators of the API so if you hit this, know we're watching and we may perma ban either a request source or API key.

Note: XIVAPI does not keep a record of IPs and usage of them are SHA1 hashed in memory.

If you use an API key then the request IP is no longer factored into rate limit checks. You will also gain the benefit of Google Tracking and a higher rate limit. If your individual rate limit is not enough then hop onto the Discord and we can look into it! Before doing this have a consider what you're trying to achieve and if you can optimise your code.



Using your key

Provide your key to the query param: private_key

https://xivapi.com/item/1675?columns=Name&private_key=[your_key]

You can also pass it as a JSON payload

{
    columns: "Name",
    private_key: "[your_key]"
}


Getting Started

Basic curl request:

curl http://cafemaker.wakingsands.com/item/1675

Community Driven Libraries

Language Github
PHP https://github.com/xivapi/xivapi-php
Python https://github.com/xivapi/xivapi.py
JavaScript https://github.com/xivapi/xivapi-js
Angular Client https://github.com/xivapi/angular-client
Ruby https://github.com/xivapi/xivapi-ruby
Go https://github.com/xivapi/xivapi-go


Examples

PHP

<?php
$json = file_get_contents("https://xivapi.com/Item/1675");
$json = json_decode($json);

// I.Lv 80 Curtana
echo "I.Lv {$json->LevelItem} {$json->Name_en}";
echo "<img src=\"https://xivapi.com/{$json->Icon}\">";


Python

import urllib2, json

request = urllib2.Request("http://xivapi.com/Item/1675")
request.add_header('User-Agent', '&lt;User-Agent&gt;')
data = json.loads(urllib2.urlopen(request).read())

# I.Lv 80 Curtana
print "I.Lv %d %s" % (data['LevelItem'], data['Name_en'])


Javascript

// Stone II
fetch("https://xivapi.com/Action/127", { mode: 'cors' })
	.then(response => response.json())
	.then(data => console.info(data.Name_en))


JQuery

// Stone II
$.ajax({
	url: "https://xivapi.com/Action/127",
	dataType: "json",
	success: function(data) {
		console.info(data.Name_en)
	}
});


C#

using Flurl;
using Flurl.Http;
using System.Net.Http;

HttpResponseMessage req = await "https://xivapi.com/Item/1675".GetAsync();
dynamic item = JsonConvert.DeserializeObject(
	req.Content.ReadAsStringAsync().Result
);

Console.Write($"I.Lv {item.LevelItem} {item.Name_en}");




Open Source!

All of XIVAPI is open source, go nuts!

Github xivapi/xivapi.com



Saint Coinach

https://github.com/ufx/SaintCoinach

SaintCoinach is a tool that allows you to extract data from the FFXIV Game files, it can provide you with CSV data, Icons and Maps. It is very useful if you wish to build a FFXIV fan site or application!

https://github.com/ufx/SaintCoinach/blob/master/SaintCoinach/ex.json

The schema is a huge JSON file that describes the EXD files found in the FFXIV game files. Many community members take time to datamine and understand the way the EXD files are mapped and this file helps describe it in a universal format.