API Documentation

Query API

Insider Transactions API

Form D API

Download and PDF Generator API

XBRL to JSON Converter API

Mapping API

Form 3, 4, 5 Parse API

Form 144 API - Restricted Sales

Nport - API

Nport API

Retrieve SEC Form N-PORT filings through the API, including detailed portfolio holdings, asset allocations, risk metrics, and fund-level financial information reported by registered investment companies. Access structured N-PORT data for analysis, monitoring, and compliance purposes.

POST https://api.secfilingdata.com/v1/filings/nport-data/

Authentication

All requests require an API token in the Authorization header.

Authorization: AUTH_TOKEN

Request Body Parameters

Parameter Type Required Description
query_type string No Search type.

Supported:
  • CIK
  • Can be empty for latest filings
query_value string Yes Search value based on query_type
from integer Yes Pagination starting offset
size integer Yes Number of records to return (Maximum:100)
sort_order string Yes ASC or DESC

Request Example

{
  "query_type": "cik",
  "query_value": "884394",
  "from": 0,
  "size": 1,
  "sort_order": "DESC"
}

Code Examples

<?php

$url = "https://api.secfilingdata.com/v1/filings/nport-data/";

$auth_token = 'AUTH_TOKEN';

$postData = array(
    'query_type' => 'cik',
    'query_value' => '884394',
    'from' => 0,
    'size' => 1,
    'sort_order' => 'DESC'
);

$ch = curl_init($url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postData));

curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Authorization: ' . $auth_token,
]);

$response = curl_exec($ch);

curl_close($ch);

echo $response;
import requests

url = "https://api.secfilingdata.com/v1/filings/nport-data/"

headers = {
    "Content-Type": "application/json",
    "Authorization": "AUTH_TOKEN"
}

payload = {
    "query_type": "cik",
    "query_value": "884394",
    "from": 0,
    "size": 1,
    "sort_order": "DESC"
}

response = requests.post(
    url,
    headers=headers,
    json=payload
)

print(response.json())
const url = "https://api.secfilingdata.com/v1/filings/nport-data/";

const payload = {
    query_type: "cik",
    query_value: "884394",
    from: 0,
    size: 1,
    sort_order: "DESC"
};

fetch(url, {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "Authorization": "AUTH_TOKEN"
    },
    body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
const axios = require("axios");

const url = "https://api.secfilingdata.com/v1/filings/nport-data/";

const payload = {
    query_type: "cik",
    query_value: "884394",
    from: 0,
    size: 1,
    sort_order: "DESC"
};

axios.post(url, payload, {
    headers: {
        "Content-Type": "application/json",
        "Authorization": "AUTH_TOKEN"
    }
})
.then(response => {
    console.log(response.data);
})
.catch(error => {
    console.error(error);
});
curl --location 'https://api.secfilingdata.com/v1/filings/nport-data/' \
--header 'Content-Type: application/json' \
--header 'Authorization: AUTH_TOKEN' \
--data '{
    "query_type":"cik",
    "query_value":"884394",
    "from":0,
    "size":1,
    "sort_order":"DESC"
}'
package main

import (
    "bytes"
    "fmt"
    "io/ioutil"
    "net/http"
)

func main() {

    url := "https://api.secfilingdata.com/v1/filings/nport-data/"

    payload := []byte(`{
        "query_type":"cik",
        "query_value":"884394",
        "from":0,
        "size":1,
        "sort_order":"DESC"
    }`)

    req, _ := http.NewRequest(
        "POST",
        url,
        bytes.NewBuffer(payload),
    )

    req.Header.Set(
        "Content-Type",
        "application/json",
    )

    req.Header.Set(
        "Authorization",
        "AUTH_TOKEN",
    )

    client := &http.Client{}

    resp, err := client.Do(req)

    if err != nil {
        panic(err)
    }

    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)

    fmt.Println(string(body))
}
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Scanner;

public class Main {

    public static void main(String[] args)
    throws Exception {

        URL url = new URL(
            "https://api.secfilingdata.com/v1/filings/nport-data/"
        );

        HttpURLConnection conn =
            (HttpURLConnection) url.openConnection();

        conn.setRequestMethod("POST");

        conn.setRequestProperty(
            "Content-Type",
            "application/json"
        );

        conn.setRequestProperty(
            "Authorization",
            "AUTH_TOKEN"
        );

        conn.setDoOutput(true);

        String jsonInputString = "{"
                + "\"query_type\":\"cik\","
                + "\"query_value\":\"884394\","
                + "\"from\":0,"
                + "\"size\":1,"
                + "\"sort_order\":\"DESC\""
                + "}";

        try(OutputStream os =
                conn.getOutputStream()) {

            byte[] input =
                jsonInputString.getBytes("utf-8");

            os.write(input, 0, input.length);
        }

        Scanner scanner =
            new Scanner(conn.getInputStream());

        while(scanner.hasNext()) {

            System.out.println(
                scanner.nextLine()
            );
        }

        scanner.close();
    }
}
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        var client = new HttpClient();

        client.DefaultRequestHeaders.Add(
            "Authorization",
            "AUTH_TOKEN"
        );

        var json = @"{
            ""query_type"": ""cik"",
            ""query_value"": ""884394"",
            ""from"": 0,
            ""size"": 1,
            ""sort_order"": ""DESC""
        }";

        var content = new StringContent(
            json,
            Encoding.UTF8,
            "application/json"
        );

        var response = await client.PostAsync(
            "https://api.secfilingdata.com/v1/filings/nport-data/",
            content
        );

        var result =
            await response.Content
            .ReadAsStringAsync();

        Console.WriteLine(result);
    }
}
require 'net/http'
require 'json'
require 'uri'

url = URI(
  "https://api.secfilingdata.com/v1/filings/nport-data/"
)

http = Net::HTTP.new(
  url.host,
  url.port
)

http.use_ssl = true

request = Net::HTTP::Post.new(url)

request["Content-Type"] =
  "application/json"

request["Authorization"] =
  "AUTH_TOKEN"

request.body = {
  query_type: "cik",
  query_value: "884394",
  from: 0,
  size: 1,
  sort_order: "DESC"
}.to_json

response = http.request(request)

puts response.body

Response Example

[
  {
    "filing_id": "21764206",
    "company_name": "SPDR S&P 500 ETF TRUST",
    "form_type": "NPORT-P",
    "fileNumber": null,
    "accession_number": "0001410368-26-055357",
    "nportData": {
      "genInfo": {
        "regName": "State Street(R) SPDR(R) S&P 500(R) ETF Trust",
        "regFileNumber": "811-06125",
        "regCik": "0000884394",
        "regLei": "549300NZAMSJ8FXPQQ63",
        "regStreet1": "11 WALL STREET",
        "regStreet2": "PDR SERVICES LLC C/O NYSE EURONEXT",
        "regCity": "New York",
        "regStateConditional": {
          "regCountry": "US",
          "regState": "US-NY"
        },
        "regZipOrPostalCode": "10005",
        "regPhone": "212-656-4440",
        "seriesName": "N/A",
        "seriesLei": "549300NZAMSJ8FXPQQ63",
        "seriesId": "",
        "repPdEnd": "2026-09-30",
        "repPdDate": "2026-03-31",
        "isFinalFiling": "N"
      },
      "fundInfo": {
        "totAssets": 653587391058.59,
        "totLiabs": 1999121111,
        "netAssets": 651588269947.59,
        "assetsAttrMiscSec": 0,
        "assetsInvested": 0,
        "amtPayOneYrBanksBorr": 0,
        "amtPayOneYrCtrldComp": 0,
        "amtPayOneYrOthAffil": 0,
        "amtPayOneYrOther": 0,
        "amtPayAftOneYrBanksBorr": 0,
        "amtPayAftOneYrCtrldComp": 0,
        "amtPayAftOneYrOthAffil": 0,
        "amtPayAftOneYrOther": 0,
        "delayDeliv": 0,
        "standByCommit": 0,
        "liquidPref": 0,
        "curMetrics": {
          "curMetric": {
            "curCd": "",
            "intrstRtRiskdv01": {
              "period10Yr": 0,
              "period1Yr": 0,
              "period30Yr": 0,
              "period3Mon": 0,
              "period5Yr": 0
            },
            "intrstRtRiskdv100": {
              "period10Yr": 0,
              "period1Yr": 0,
              "period30Yr": 0,
              "period3Mon": 0,
              "period5Yr": 0
            }
          }
        },
        "creditSprdRiskInvstGrade": {
          "period10Yr": 0,
          "period1Yr": 0,
          "period30Yr": 0,
          "period3Mon": 0,
          "period5Yr": 0
        },
        "creditSprdRiskNonInvstGrade": {
          "period10Yr": 0,
          "period1Yr": 0,
          "period30Yr": 0,
          "period3Mon": 0,
          "period5Yr": 0
        },
        "isNonCashCollateral": "N",
        "returnInfo": {
          "monthlyTotReturns": [
            {
              "classId": "",
              "rtn1": 1.44,
              "rtn2": -0.77,
              "rtn3": -4.97
            }
          ],
          "othMon1": {
            "netRealizedGain": 0,
            "netUnrealizedAppr": 0
          },
          "othMon2": {
            "netRealizedGain": 0,
            "netUnrealizedAppr": 0
          },
          "othMon3": {
            "netRealizedGain": 0,
            "netUnrealizedAppr": 0
          }
        },
        "mon1Flow": {
          "redemption": 0,
          "reinvestment": 0,
          "sales": 0
        },
        "mon2Flow": {
          "redemption": 0,
          "reinvestment": 0,
          "sales": 0
        },
        "mon3Flow": {
          "redemption": 0,
          "reinvestment": 0,
          "sales": 0
        },
        "invstOrSecs": [
          {
            "name": "Aflac Inc",
            "lei": "549300N0B7DOGLXWPP39",
            "title": "Aflac Inc",
            "cusip": "001055102",
            "balance": 5426878,
            "valUSD": 595382785.38,
            "pctVal": 0.091374079743,
            "assetCat": "EC",
            "issuerCat": "CORP",
            "invCountry": "US",
            "isRestrictedSec": "N",
            "fairValLevel": "1",
            "securityLending": {
              "isCashCollateral": "N",
              "isNonCashCollateral": "N",
              "isLoanByFund": "N"
            }
          },
          {
            "name": "AES Corp/The",
            "lei": "2NUNNB7D43COUIRE5295",
            "title": "AES Corp",
            "cusip": "00130H105",
            "balance": 8396293,
            "valUSD": 118303768.37,
            "pctVal": 0.018156215178,
            "assetCat": "EC",
            "issuerCat": "CORP",
            "invCountry": "US",
            "isRestrictedSec": "N",
            "fairValLevel": "1",
            "securityLending": {
              "isCashCollateral": "N",
              "isNonCashCollateral": "N",
              "isLoanByFund": "N"
            }
          },
          {
            "name": "AT&T Inc",
            "lei": "549300Z40J86GGSTL398",
            "title": "AT&T Inc",
            "cusip": "00206R102",
            "balance": 81517048,
            "valUSD": 2363179221.52,
            "pctVal": 0.362679828737,
            "assetCat": "EC",
            "issuerCat": "CORP",
            "invCountry": "US",
            "isRestrictedSec": "N",
            "fairValLevel": "1",
            "securityLending": {
              "isCashCollateral": "N",
              "isNonCashCollateral": "N",
              "isLoanByFund": "N"
            }
          },
          {
            "name": "Abbott Laboratories",
            "lei": "HQD377W2YR662HK5JX27",
            "title": "Abbott Laboratories",
            "cusip": "002824100",
            "balance": 20247440,
            "valUSD": 2078804664.8,
            "pctVal": 0.319036538973,
            "assetCat": "EC",
            "issuerCat": "CORP",
            "invCountry": "US",
            "isRestrictedSec": "N",
            "fairValLevel": "1",
            "securityLending": {
              "isCashCollateral": "N",
              "isNonCashCollateral": "N",
              "isLoanByFund": "N"
            }
          }          
        ]
      }
    }
  }
]
Important:

Requests must use: Content-Type: application/json

POST body must be JSON encoded using: json_encode($postData)

HTTP Status Codes

Status Code Description
200 Successful request
204 No results found
400 Invalid request parameters
401 Unauthorized / Invalid token
500 Internal server error