Home Docs Apps |

Getting Started

Before we begin, make sure you have an API Key!

API Keys


Performing a curl request

Do a basic curl request

curl https://xivapi.com/item/1675?key=_YOUR_APP_KEY_

Libraries

Language Library
PHP https://github.com/xivapi/xivapi-php
Javascript https://github.com/xivapi/xivapi-js
Angular https://github.com/xivapi/angular-client
Ruby https://github.com/xivapi/xivapi-ruby
Go https://github.com/xivapi/xivapi-go

Examples

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', '<User-Agent>')
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}");