EmergingTextiles: Understanding Our API

Understanding Our API

A plain-English guide, no coding experience required.

What Is an API?

API stands for Application Programming Interface. That sounds technical, but the idea is very simple.

Think of it this way

When you visit a website, you read data with your eyes and maybe copy-paste it into a spreadsheet. An API does the same thing, except it lets a computer program (such as Excel) read that data automatically, without you having to open a browser, scroll, and copy anything.

In practice, an API is simply a web address (a URL) that, instead of returning a web page, returns pure data ready to be used by your software.

🗄️
Our Database
Textile price data
🔗
API Endpoint
A specific URL
📊
Your Excel / System
Automatic import

Why Should I Care?

Without the API, your workflow probably looks like this: log in to EmergingTextiles.com, find the table you need, download a CSV or copy the data, and paste it into your spreadsheet or system. Repeat every time the data is updated.

With the API, all of this happens automatically. Open your Excel file, click Refresh, and the latest data appears. No website visits, no downloads, no copy-paste.

  • Save time: no more manual downloads
  • Always up-to-date: refresh your data in one click
  • No errors: no risk of copy-paste mistakes
  • Works with Excel, Google Sheets, databases, and custom software

One Table = One API Endpoint

Every data table you see on EmergingTextiles.com, and every CSV file you can download from the website, has a matching API endpoint. An endpoint is simply the specific web address that returns that particular table's data.

Simple rule

If you can see it or download it on our website, there is an API endpoint for it.

Here are a few examples:

Data Table on Our Website API Endpoint
New York Cotton Futures, Daily Prices /api/sheets/New-York_Cotton-Futures/NY-Daily-Prices
China Polyester Staple Fiber Prices, Weekly /api/sheets/EmergingTextiles_Daily-Weekly/psf-china-weekly
India Cotton Yarn Prices, Monthly /api/sheets/India-Yarn-Prices_Monthly/Cotton-Yarns-INR
Your Custom Spreadsheet /api/sheets/Your-Custom-Spreadsheet/Your-Selection

With hundreds of data tables available, you can request API access to any combination of them. Your dedicated API key unlocks exactly the data included in your subscription.

What You Receive: JSON Data

When you (or Excel) call an API endpoint, the response comes back in a format called JSON (JavaScript Object Notation). Don't let the name intimidate you. JSON is simply a way to organize data that computers can read easily.

Think of it this way

A CSV file organizes data in rows and columns separated by commas. JSON does the same thing, but uses a slightly different notation so that programs know exactly where each piece of data starts and ends. Excel knows how to read both.

Example: Cotton Futures, Daily Prices

Here is what the data looks like when it arrives from the API:

{ "spreadsheet": "New-York_Cotton-Futures", "sheet": "NY-Daily-Prices", "data": [ [ "Date", "March", "May", "July", "October", "December" ], [ "2025-01-13", 81.90, 82.56, 83.75, 85.10, 85.80 ], [ "2025-01-14", 82.15, 82.84, 84.00, 85.35, 86.01 ], [ "2025-01-15", 82.45, 83.12, 84.30, 85.67, 86.22 ] ] }

What It Looks Like in Excel

Once Excel imports the JSON above, it renders as a clean, familiar table:

NY Cotton Futures, Daily Prices (auto-refreshed via API)
Date March May July October December
2025-01-13 81.90 82.56 83.75 85.10 85.80
2025-01-14 82.15 82.84 84.00 85.35 86.01
2025-01-15 82.45 83.12 84.30 85.67 86.22

The same data, from JSON to a ready-to-use table, all automatic.

How to Find Your API Endpoints

You don't need to memorize or look up endpoint URLs. Every data table on our website includes a green "Copy API Endpoint" button right below it. Simply click the button, and the full endpoint URL is copied to your clipboard, ready to paste into Excel or any other tool.

1
Browse to any data table on our website Navigate to the prices or statistics page you are interested in.
2
Look for the green "Copy API Endpoint" button It appears at the bottom of every table, next to the "Print Table" button.
3
Click it and paste The endpoint URL is now in your clipboard. Paste it into Excel's Power Query, your script, or any system that needs the data.

How to Get API Data Into Excel

Microsoft Excel (2016 and later) has a built-in feature called Power Query that can connect directly to our API. You do not need to install any extra software.

Good news: Power Query is already included in your version of Excel (Windows and Mac, 2016 or later, as well as Microsoft 365). There is nothing to download or install.

Step-by-Step Setup (5 minutes)

1
Open Excel and go to the Data tab Click Get DataFrom Other SourcesFrom Web.
2
Enter the API endpoint URL Paste the endpoint we provide you, for example:
https://api.emergingtextiles.com/api/sheets/New-York_Cotton-Futures/NY-Daily-Prices?key=YOUR_API_KEY
3
Let Power Query process the JSON Excel will open the Power Query editor and show the data. Click Into Table, then expand the columns as prompted.
4
Load the data into your worksheet Click Close & Load. The data appears as a regular Excel table, ready for charts, formulas, or analysis.
5
Refresh anytime Right-click the table → Refresh, or set Excel to auto-refresh at a schedule you choose. The latest data will be pulled in automatically.

That's it. Once set up, your Excel file becomes a live connection to our database. No programming required. We also provide a ready-made Excel template to make this even easier: just open it and enter your API key.

Your Custom Spreadsheet Endpoint

As a Corporate subscriber, you can select exactly which products and markets matter to you. We will then build a custom spreadsheet that gathers all of them in one place, and assign it a single, dedicated API endpoint.

In other words

Instead of calling ten different endpoints for ten different products, you get one URL that returns all your selected data at once. One call, all your data.

What You Choose What We Deliver
Products you want to track (e.g. cotton, polyester, viscose…) All prices consolidated in one spreadsheet
Markets of interest (e.g. China, India, USA, EU…) Region-specific tabs within your spreadsheet
Frequency (daily, weekly, monthly data) Data updated at the frequency you need

Your custom spreadsheet is accessible at a single endpoint like /api/sheets/Your-Custom-Spreadsheet/Your-Selection?key=YOUR_API_KEY. Connect it to Excel once, and you're done.

Visit our Custom Spreadsheet page to see the available options and configure yours.

Beyond Excel: Connecting to Databases

Our API uses a standard called REST (Representational State Transfer), which is the most common way systems exchange data on the internet. This means our data can flow not only into Excel, but into virtually any system your organization uses.

Destination How It Works
SQL Databases (MySQL, PostgreSQL, SQL Server…) A simple script calls our API and inserts the data into your database on a schedule
Business Intelligence tools (Power BI, Tableau…) Connect directly using the built-in web/REST data connector
ERP / Internal systems Your IT team can integrate our JSON data into any system that supports REST APIs
Google Sheets Use the built-in IMPORTDATA function or Apps Script for automated updates

In every case, the data format is the same standard JSON. Whether you use Excel, a database, or a custom application, our API delivers the data in a universal format that works everywhere.

Ready to Get Started?

API access is included with Corporate subscriptions. Once you subscribe, we will provide your personal API key. Your endpoint URLs are displayed each time you access tables or CSV download files on our website.

1
Subscribe to our Corporate plan Visit our Corporate Subscription page. Already on a Single or Team plan? Log in first to see your prorated upgrade rate: you only pay the difference for the remaining time on your subscription. It's also a great way to test our APIs before your next renewal. Upgrades are available to all active subscribers with at least 30 days left on their current plan.
2
Start using your API Connect Excel (or any system) and enjoy automatic data updates.

Want to Try It First?

We offer a test environment with sample data so you can see how everything works before committing. Contact us to request your free test API key.

Questions? Our team is happy to walk you through the setup. Reach us at subscriptiondpt@emergingtextiles.info or visit our Contact Page.