• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
jjwon

jjwon

ffxiv

Public
Like
ffxiv
Home
Code
4
.claude
.vtignore
TODO.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
TODO.md
Code
/
TODO.md
Search
7/20/2025
Viewing readonly version of main branch: v4
View latest version
TODO.md

Phase 1: The Data Layer (Val Town) Goal: Create a single, reliable Val Town API endpoint that provides all the necessary instance data, properly formatted and cached.

Task 1.1: Research the XIVAPI /instancecontent endpoint.

Familiarize yourself with its structure. You will need to request specific columns to get the data required by the PRD.

Identify the fields for:

Name: The instance's name.

ContentType.Name: This will give you the "Type" (e.g., "Dungeon").

ContentFinderCondition.Name: This often contains the common name for the duty.

Unlock Quest: This can be tricky. Look for a field like QuestUnlock which might be an object containing the quest name. You may need to experiment to find the most reliable field.

Note on Pagination: XIVAPI results are paginated (e.g., 100 results per page). Your script must loop through all pages to collect every instance.

Task 1.2: Create the Val Town "Val" (Function).

Create a new val in your Val Town workspace (e.g., ffxivInstanceList).

Write JavaScript code inside this val to perform the following logic:

Initialize an empty array, e.g., allInstances = [].

Make an initial fetch call to https://xivapi.com/instancecontent?columns=ID,Name,ContentType.Name,....

Write a while or for loop that continues as long as the API response indicates there is a next page (Pagination.PageNext != null). In each loop, fetch the next page and add the results to your allInstances array.

Once all instances are collected, process the array: Group the instances by their expansion. You may need another API call to /expansion or hardcode the expansion order and level caps to achieve this grouping.

Return the final, grouped JSON object.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.