MuniPDF API

Introduction

This document describes how to access MuniPDF data through the API.

The API consists of two primary output points:

  • Muni bond meta data and mapping data

Key Features

  • Simple HTTP interface to retrieve files
  • Download files programmatically or with a web browser

Key Data Points

Field Name Description
entity_name Name of the Entity
country Country of Incorporation of the Entity
sector Sector of the Entity
isin ISIN
cusip CUSIP
issue_date Issue Date of the Identifier
maturity_date Maturity Date of the Identifier
bond_type Bond Category (Fixed, Floating, Convertible, etc)
issuance_coupon Issuance Coupon of the Identifier
issue_currency Currency in which the Instrument is issued
amount_issued Initial Amount at the time of Issuance of the bond

API URL

https://api.munipdf.com/search

Authentication

In order to authenticate with the API, you must provide your API key (Please refer to API Key) as the _api_key URL query string parameter during every HTTP request.

Request The Token

The token can be requested from the FactEntry Support Team (support@factentry.com) and should be replaced with XXXXX in the API key

Request Format

The request is passed in via HTTP request body. The only supported HTTP verb is POST/GET.

Example Query String

https://api.munipdf.com/search?key=XXXXXXXXXXXXXXXX&_fields=entity_name,isin&isin=US70917TCY55,US13068L7Z28

Input Parameters

Fields Name Type Mandatory
key String Mandatory
entity_name String Any of the field mandatory
country String
isin String

Response Format

Type Example
JSON
{
    "code": 200,
    "error": false,
    "data": [
        {
            "_id": "21198c698575ce814a315db325f68fc1",
            "cusip": "98840AAN5",
            "insured": "No",
            "entity_name": "YUCAIPA VALLEY WATER DISTRICT WATER SYSTEM REFUNDING REVENUE BONDS SERIES 2015A",
            "tax_status": "Tax Exempt",
            "issue_currency": "USD",
            "amount_issued": 1695000,
            "issuance_coupon": 5,
            "maturity_date": "2027-09-01",
            "issue_date": "2015-02-26",
            "use_of_proceed": "Utility",
            "state": "CA",
            "country_of_issuer": "United States",
            "source_or_repayment": "Revenue",
            "region": "N.Amer",
            "sector": "Utility",
            "isin": "US98840AAN54",
            "coupon_type": "Fixed",
            "seniority": "Senior"
        }
    ]
}
            

Output

Group Type Field Name
Entity sector
entity_name
region
Identifier isin
cusip
Date issue_date
maturity_date
BondDetails issue_currency
country_of_issuer
insured
source_or_repayment
coupon_frequency
coupon_type
rankings
issuance_coupon
amount_issued
seniority
state
tax_status
use_of_proceed

Status Code

Code Description
200 Request and Response success
400 Request not Valid
401 The API_KEY is invalid.
402 Invalid request method
403 Too many request
500 Internal Server Error

Python

import requests

response_json = requests.get('https://api.munipdf.com/search?key=XXXXXXXXXXXXXXXXXXXXXXX&_fields=entity_name,isin&entity_name=%22Morgan Stanley Finance LLC%22')
print(response_json)

PHP

$url = "https://api.munipdf.com/search";
$post = "key=XXXXXXXXXXXXXXXXXXXXXXX&_fields=entity_name,isin&entity_name=%22Morgan Stanley Finance LLC%22";

$curl = curl_init();	
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,false);
$content=curl_exec($curl);
curl_close($curl);

//print JSON data 
echo $content;

Java

package javaapplication1;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.logging.Level;
import java.util.logging.Logger;

public class JavaApplication1 {
    
    public static void main(String[] args) {
        HttpURLConnection connection = null;
        String urlParameters = null;
        try {
            urlParameters = "key=" + URLEncoder.encode("xxxxxxxxTOKENxxxxxxxxxxxx", "UTF-8")+
                    "&_fields=entity_name,isin_regs&entity_name=" + URLEncoder.encode("%22Morgan Stanley Finance LLC%22", "UTF-8");
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(JavaApplication1.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        try {
        //Create connection
        URL url = new URL("https://api.munipdf.com/search");
        connection = (HttpURLConnection) url.openConnection();
        connection.setRequestMethod("POST");
        connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");

        //connection.setRequestProperty("Content-Length", Integer.toString(urlParameters.getBytes().length));
        connection.setRequestProperty("Content-Language", "en-US");  

        connection.setUseCaches(false);
        connection.setDoOutput(true);

        //Send request
        DataOutputStream wr = new DataOutputStream (
            connection.getOutputStream());
        wr.writeBytes(urlParameters);
        wr.close();

        //Get Response  
        InputStream is = connection.getInputStream();
        BufferedReader rd = new BufferedReader(new InputStreamReader(is));
        StringBuilder response = new StringBuilder(); // or StringBuffer if Java version 5+
        String line;
        while ((line = rd.readLine()) != null) {
          response.append(line);
          response.append('\r');
        }
        rd.close();
        System.out.println(response.toString());
      } 
      catch (Exception e) {
          
      } 
        finally {
        if (connection != null) {
          connection.disconnect();
        }
      }
    }
}

Find Out More

If you want more information on our products or have a general enquiry, please contact us.