SASEFRED Interface Engine

Example 48.13 Series for a Specific Category with the URL= Option

(View the complete code for this example.)

The following statements demonstrate how to use the URL= option to obtain the SERIES data set for a specific category and how to create a permanent data set named SERIES_CAT5 in the MyLib SAS library:[20]


options validvarname=any;

title 'Specifying the URL= Option to Create the SERIES_CAT5 Data Set';
libname _all_ clear;
libname mylib "< path to your folder for data >";
libname fred5 sasefred "%sysget(FRED)"  
   debug=on
   URL="https://api.stlouisfed.org/fred/category/series?category_id=125"
   APIKEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
   ;

data mylib.series_cat5;
   set fred5.XFREDtpu;
run;
proc print
   data=mylib.series_cat5;
run;

proc contents
   data=mylib.series_cat5;
run;

The returned data are stored in the XFREDTPU data set and are copied to the permanent data set named series_cat5.sas7bdat in the MyLib library. A side effect of the DATA step is the automatic creation of two SAS data sets, named series.sas7bdat and seriess.sas7bdat, in the FRED5 library’s location. The series that are returned for the specified category ID are shown in Output 48.13.1.

Output 48.13.1: Specifying the URL= Option to Create the SERIES_CAT5 Data Set

Specifying the URL= Option to Create the SERIES_CAT5 Data Set

Obs seriess_ORDINAL series_ORDINAL series_id series_realtime_start series_realtime_end series_title series_observation_start series_observation_end series_frequency series_frequency_short series_units series_units_short series_seasonal_adjustment series_seasonal_adjustment_short series_last_updated series_popularity series_group_popularity series_notes
1 1 1 AITGCBN 2020-05-12 2020-05-12 Advance U.S. International Trade in Goods: Balance 2020-03-01 2020-03-01 Monthly M Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-04-28 07:46:13-05 2 28 This advance estimate represents the current month statistics of nearly complete coverage. The current month statistics reflecting complete coverage is available on the Census website at the U.S. International Trade in Goods and Services report (FT-900) https://www.census.gov/foreign-trade/statistics/historical/index.html For more information on data collection and methodology, see https://www.census.gov/econ/indicators/methodology.html
2 1 2 AITGCBS 2020-05-12 2020-05-12 Advance U.S. International Trade in Goods: Balance 2020-03-01 2020-03-01 Monthly M Millions of Dollars Mil. of $ Seasonally Adjusted SA 2020-04-28 07:46:10-05 28 28 This advance estimate represents the current month statistics of nearly complete coverage. The current month statistics reflecting complete coverage is available on the Census website at the U.S. International Trade in Goods and Services report (FT-900) https://www.census.gov/foreign-trade/statistics/historical/index.html, the corresponding series in FRED is at https://fred.stlouisfed.org/series/BOPGTB For more information on data collection and methodology, see https://www.census.gov/econ/indicators/methodology.html
3 1 3 BOPBCA 2020-05-12 2020-05-12 Balance on Current Account (DISCONTINUED) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:28-05 17 20 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
4 1 4 BOPBCAA 2020-05-12 2020-05-12 Balance on Current Account (DISCONTINUED) 1960-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:28-05 6 20 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
5 1 5 BOPBCAN 2020-05-12 2020-05-12 Balance on Current Account (DISCONTINUED) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:28-05 1 20 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
6 1 6 BOPBGS 2020-05-12 2020-05-12 Balance on Goods and Services (DISCONTINUED) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:28-05 1 4 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
7 1 7 BOPBGSA 2020-05-12 2020-05-12 Balance on Goods and Services (DISCONTINUED) 1960-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:28-05 4 4 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
8 1 8 BOPBGSN 2020-05-12 2020-05-12 Balance on Goods and Services (DISCONTINUED) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:28-05 1 4 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
9 1 9 BOPBII 2020-05-12 2020-05-12 Balance on Investment Income (DISCONTINUED) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:27-05 1 1 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
10 1 10 BOPBIIA 2020-05-12 2020-05-12 Balance on Investment Income (DISCONTINUED) 1960-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:27-05 1 1 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
11 1 11 BOPBIIN 2020-05-12 2020-05-12 Balance on Investment Income (DISCONTINUED) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:27-05 1 1 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
12 1 12 BOPBM 2020-05-12 2020-05-12 Balance on Merchandise Trade (DISCONTINUED) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:27-05 6 7 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
13 1 13 BOPBMA 2020-05-12 2020-05-12 Balance on Merchandise Trade (DISCONTINUED) 1960-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:27-05 1 7 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
14 1 14 BOPBMN 2020-05-12 2020-05-12 Balance on Merchandise Trade (DISCONTINUED) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:27-05 1 7 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
15 1 15 BOPBSV 2020-05-12 2020-05-12 Balance on Services (DISCONTINUED) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:27-05 1 1 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
16 1 16 BOPBSVA 2020-05-12 2020-05-12 Balance on Services (DISCONTINUED) 1960-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:27-05 1 1 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
17 1 17 BOPBSVN 2020-05-12 2020-05-12 Balance on Services (DISCONTINUED) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:27-05 1 1 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
18 1 18 BOPCAT 2020-05-12 2020-05-12 Capital Account Transactions, Net (DISCONTINUED) 1989-10-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:26-05 2 2 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
19 1 19 BOPCATA 2020-05-12 2020-05-12 Capital Account Transactions, Net (DISCONTINUED) 1989-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:26-05 1 2 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
20 1 20 BOPCATN 2020-05-12 2020-05-12 Capital Account Transactions, Net (DISCONTINUED) 1989-10-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:26-05 1 2 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
21 1 21 BOPG 2020-05-12 2020-05-12 Unilateral Transfers, Net (DISCONTINUED) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Seasonally Adjusted SA 2014-06-18 08:41:26-05 5 5 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
22 1 22 BOPGA 2020-05-12 2020-05-12 Unilateral Transfers, Net (DISCONTINUED) 1960-01-01 2013-01-01 Annual A Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:25-05 1 5 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
23 1 23 BOPGN 2020-05-12 2020-05-12 Unilateral Transfers, Net (DISCONTINUED) 1960-01-01 2014-01-01 Quarterly Q Billions of Dollars Bil. of $ Not Seasonally Adjusted NSA 2014-06-18 08:41:25-05 1 5 This series has been discontinued as a result of the comprehensive restructuring of the international economic accounts (https://apps.bea.gov/scb/pdf/2014/07%20July/0714_annual_international_transactions_accounts.pdf). For a crosswalk of the old and new series in FRED see: http://research.stlouisfed.org/CompRevisionReleaseID49.xlsx.
24 1 24 BOPGSTB 2020-05-12 2020-05-12 Trade Balance: Goods and Services, Balance of Payments Basis 1992-01-01 2020-03-01 Monthly M Millions of Dollars Mil. of $ Seasonally Adjusted SA 2020-05-05 07:52:01-05 68 68 Further information related to the international trade data can be found at https://www.census.gov/foreign-trade/data/index.html Methodology details can be found at https://www.census.gov/foreign-trade/Press-Release/current_press_release/explain.pdf
25 1 25 BOPGTB 2020-05-12 2020-05-12 Trade Balance: Goods, Balance of Payments Basis 1992-01-01 2020-03-01 Monthly M Millions of Dollars Mil. of $ Seasonally Adjusted SA 2020-05-05 07:52:07-05 41 41 This series represents monthly statistics of complete coverage. The advance estimate of the current month of nearly complete coverage is available on FRED at https://fred.stlouisfed.org/series/AITGCBS Further information related to the international trade data can be found at https://www.census.gov/foreign-trade/data/index.html Methodology details can be found at https://www.census.gov/foreign-trade/Press-Release/current_press_release/explain.pdf
26 1 26 BOPSTB 2020-05-12 2020-05-12 Trade Balance: Services, Balance of Payments Basis 1992-01-01 2020-03-01 Monthly M Millions of Dollars Mil. of $ Seasonally Adjusted SA 2020-05-05 07:51:04-05 17 17 Further information related to the international trade data can be found at https://www.census.gov/foreign-trade/data/index.html Methodology details can be found at https://www.census.gov/foreign-trade/Press-Release/current_press_release/explain.pdf
27 1 27 IEABC 2020-05-12 2020-05-12 Balance on current account 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2020-03-19 09:01:02-05 55 61 Calculated by subtracting the imports of goods and services and income payments (debits) from the exports of goods and services and income receipts (credits)
28 1 28 IEABCA 2020-05-12 2020-05-12 Balance on current account 1999-01-01 2019-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:02-05 40 61 Calculated by subtracting the imports of goods and services and income payments (debits) from the exports of goods and services and income receipts (credits)
29 1 29 IEABCG 2020-05-12 2020-05-12 Balance on goods 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2020-03-19 09:01:07-05 4 8 Calculated by subtracting the imports of goods from the exports of goods
30 1 30 IEABCGA 2020-05-12 2020-05-12 Balance on goods 1999-01-01 2019-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:06-05 7 8 Calculated by subtracting the imports of goods from the exports of goods
31 1 31 IEABCGN 2020-05-12 2020-05-12 Balance on goods 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:25-05 1 8 Calculated by subtracting the imports of goods from the exports of goods
32 1 32 IEABCGS 2020-05-12 2020-05-12 Balance on goods and services 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2020-03-19 09:01:07-05 3 15 Calculated by subtracting the imports of goods and services from the exports of goods and services
33 1 33 IEABCGSA 2020-05-12 2020-05-12 Balance on goods and services 1999-01-01 2019-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:04-05 13 15 Calculated by subtracting the imports of goods and services from the exports of goods and services
34 1 34 IEABCGSN 2020-05-12 2020-05-12 Balance on goods and services 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:25-05 1 15 Calculated by subtracting the imports of goods and services from the exports of goods and services
35 1 35 IEABCN 2020-05-12 2020-05-12 Balance on current account 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:03-05 14 61 Calculated by subtracting the imports of goods and services and income payments (debits) from the exports of goods and services and income receipts (credits)
36 1 36 IEABCP 2020-05-12 2020-05-12 Balance on capital account 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2020-03-19 09:01:02-05 37 43 Calculated by subtracting the capital transfer payments and other debits from the capital transfer receipts and other credits
37 1 37 IEABCPA 2020-05-12 2020-05-12 Balance on capital account 1999-01-01 2019-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:03-05 23 43 Calculated by subtracting the capital transfer payments and other debits from the capital transfer receipts and other credits
38 1 38 IEABCPI 2020-05-12 2020-05-12 Balance on primary income 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2020-03-19 09:01:05-05 4 7 Calculated by subtracting the primary income payments from the primary income receipts
39 1 39 IEABCPIA 2020-05-12 2020-05-12 Balance on primary income 1999-01-01 2019-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:07-05 3 7 Calculated by subtracting the primary income payments from the primary income receipts
40 1 40 IEABCPIN 2020-05-12 2020-05-12 Balance on primary income 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:25-05 1 7 Calculated by subtracting the primary income payments from the primary income receipts
41 1 41 IEABCPN 2020-05-12 2020-05-12 Balance on capital account 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:04-05 9 43 Calculated by subtracting the capital transfer payments and other debits from the capital transfer receipts and other credits
42 1 42 IEABCS 2020-05-12 2020-05-12 Balance on services 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2020-03-19 09:01:25-05 1 2 Calculated by subtracting the imports of services from the exports of services
43 1 43 IEABCSA 2020-05-12 2020-05-12 Balance on services 1999-01-01 2019-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:07-05 1 2 Calculated by subtracting the imports of services from the exports of services
44 1 44 IEABCSI 2020-05-12 2020-05-12 Balance on secondary income 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Seasonally Adjusted SA 2020-03-19 09:01:25-05 1 3 Calculated by subtracting the secondary income (current transfer) payments from the secondary income (current transfer) receipts
45 1 45 IEABCSIA 2020-05-12 2020-05-12 Balance on secondary income 1999-01-01 2019-01-01 Annual A Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:06-05 2 3 Calculated by subtracting the secondary income (current transfer) payments from the secondary income (current transfer) receipts
46 1 46 IEABCSIN 2020-05-12 2020-05-12 Balance on secondary income 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:25-05 1 3 Calculated by subtracting the secondary income (current transfer) payments from the secondary income (current transfer) receipts
47 1 47 IEABCSN 2020-05-12 2020-05-12 Balance on services 1999-01-01 2019-10-01 Quarterly Q Millions of Dollars Mil. of $ Not Seasonally Adjusted NSA 2020-03-19 09:01:09-05 1 2 Calculated by subtracting the imports of services from the exports of services




[20] Disclaimer: SAS may reference other websites or content or resources for use at Customer's sole discretion. SAS has no control over any websites or resources that are provided by companies or persons other than SAS. Customer acknowledges and agrees that SAS is not responsible for the availability or use of any such external sites or resources, and does not endorse any advertising, products, or other materials on or available from such websites or resources. Customer acknowledges and agrees that SAS is not liable for any loss or damage that may be incurred by Customer or its end users as a result of the availability or use of those external sites or resources, or as a result of any reliance placed by Customer or its end users on the completeness, accuracy, or existence of any advertising, products, or other materials on, or available from, such websites or resources.

Last updated: June 19, 2025