xivdata / xivapi-laravel

A Laravel SDK for xivapi.com


XIVAPI Laravel Client

This provides a very simple client to interact with the XIVAPI and obtain dynamic objects in return.

Getting Started

This library requires PHP 7.3+

Install vis composer: https://packagist.org/packages/xivdata/xivapi-laravel

  • composer require xivdata/xivapi-laravel


The xivapi-laravel package is a very simple libary to access XIVAPI.


$api = new XIVAPI();

Setting your key if you have one

You can set the environment variable: XIVAPI_KEY Or via:

Using Queries (excludes Search)

The API has a whole host of queries to allow you to customise the response, these are all passed to the API before you request data. Search has some extra queries that are hard coded as these interact with Elastic Search.


Content is dynamically driven based on what content is available in the game files using magic methods for invoking the different types, eg:

  • item()
  • instanceContent()
  • tripleTriadCard()

// examples
$item = $api->content->item()->one(1675);
$action = $api->content->action()->one(127);
$instances = $api->content->instanceContent()->list();

// non dynamic methods:



Search modification methods are:

// The column to search on

// the algorithm to use

// the page to start on

// sorting order
$api->search->sort($field, $order);

// limit results

// columns in the results

// change elastics filter bool condition (eg: should, must, must_not)

Filters are additive, multiple can be added, eg:

    ->filter('LevelItem', 30, SearchFilters::GREATER_THAN)
    ->filter('ItemSearchCategory', 10, SearchFilters::GREATER_THAN_OR_EQUAL_TO);


$api->character->search($name, $server, $page);
$api->character->get($id, $data = [], $extended = false);

Free Company

$api->freecompany->search($name, $server, $page);
$api->freecompany->get($id, $data = []);


$api->linkshell->search($name, $server, $page);
$api->linkshell->get($id, $data = []);


$api->pvpteam->search($name, $server, $page);
$api->pvpteam->get($id, $data = []);

Note: The _private API is for internal use within XIVAPI and MogBoard. It cannot be used publicly and is locked behind an access key.