EmergingTextiles: Understanding Our API

Understanding Our API

A plain-English guide, no coding experience required.

Just want data in Excel? Skip the theory and go straight to our two-minute Excel Quickstart. This page covers the full API for analysts, developers, and IT teams who want the complete picture.

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. The paths above show the JSON form (/api/sheets/...); for the CSV form used in Excel, simply swap /api/sheets/ with /api/csv/.

What You Receive: Two Formats

Our API serves the same data in two formats. You pick the one that fits your workflow. The URL you use determines which format you get back.

Format Best For URL Pattern
CSV
Plain text, comma-separated
Excel, Google Sheets, any spreadsheet tool. The simplest path for business users. /api/csv/...
JSON
Structured data for programs
BI tools (Power BI, Tableau), SQL databases, ERPs, custom applications, scripts. /api/sheets/...

Example: CSV Format

Plain text with comma-separated values. Opens directly in any spreadsheet:

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

Example: JSON Format

Same data, structured for programmatic consumption:

{ "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

Either format lands in Excel 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

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. Click it, and the full URL is copied to your clipboard.

1
Browse to any data table on our website Navigate to the prices or statistics page you are interested in.
2
Click the green "Copy API Endpoint" button It appears at the bottom of every table, next to the "Print Table" button. A popup confirms what was copied.
3
Paste into Excel (or any other system) Replace the YOUR_API_KEY placeholder with your personal key, and you're ready to import.

CSV or JSON? The button copies the CSV URL by default, which is the simplest format for Excel and spreadsheets. If you need the JSON version for BI tools, databases, or custom scripts, just swap /api/csv/ for /api/sheets/ in the URL, and send your key as an x-api-key header instead of a query parameter.

How to Get API Data Into Excel

Microsoft Excel (2016 and later) connects to our API out of the box through a built-in feature called Power Query. You do not need to install any extra software.

Full walkthrough with screenshots: Our Excel Quickstart guide shows every step in two minutes. Recommended if this is your first time.

The Short Version

1
In Excel: Data → From Web Paste the CSV URL with your API key, for example:
https://api.emergingtextiles.com/api/csv/New-York_Cotton-Futures/NY-Daily-Prices?api_key=YOUR_API_KEY
2
Click Close & Load The data appears in your worksheet as a regular Excel table, ready for charts, formulas, or pivot tables.
3
Refresh anytime Right-click the table → Refresh, or set Excel to auto-refresh on a schedule. The latest data pulls in automatically.

Once set up, your Excel file becomes a live connection to our database. No programming required. We also provide a ready-made Excel template: 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/csv/Your-Custom-Spreadsheet/Your-Selection?api_key=YOUR_API_KEY for Excel, or /api/sheets/Your-Custom-Spreadsheet/Your-Selection (with the x-api-key header) for JSON-based tools. Connect 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.