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

Obsseriess_ORDINALseries_ORDINALseries_idseries_realtime_startseries_realtime_endseries_titleseries_observation_startseries_observation_endseries_frequencyseries_frequency_shortseries_unitsseries_units_shortseries_seasonal_adjustmentseries_seasonal_adjustment_shortseries_last_updatedseries_popularityseries_group_popularityseries_notes
111AITGCBN2020-05-122020-05-12Advance U.S. International Trade in Goods: Balance2020-03-012020-03-01MonthlyMMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-04-28 07:46:13-05228This 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
212AITGCBS2020-05-122020-05-12Advance U.S. International Trade in Goods: Balance2020-03-012020-03-01MonthlyMMillions of DollarsMil. of $Seasonally AdjustedSA2020-04-28 07:46:10-052828This 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
313BOPBCA2020-05-122020-05-12Balance on Current Account (DISCONTINUED)1960-01-012014-01-01QuarterlyQBillions of DollarsBil. of $Seasonally AdjustedSA2014-06-18 08:41:28-051720This 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.
414BOPBCAA2020-05-122020-05-12Balance on Current Account (DISCONTINUED)1960-01-012013-01-01AnnualABillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:28-05620This 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.
515BOPBCAN2020-05-122020-05-12Balance on Current Account (DISCONTINUED)1960-01-012014-01-01QuarterlyQBillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:28-05120This 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.
616BOPBGS2020-05-122020-05-12Balance on Goods and Services (DISCONTINUED)1960-01-012014-01-01QuarterlyQBillions of DollarsBil. of $Seasonally AdjustedSA2014-06-18 08:41:28-0514This 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.
717BOPBGSA2020-05-122020-05-12Balance on Goods and Services (DISCONTINUED)1960-01-012013-01-01AnnualABillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:28-0544This 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.
818BOPBGSN2020-05-122020-05-12Balance on Goods and Services (DISCONTINUED)1960-01-012014-01-01QuarterlyQBillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:28-0514This 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.
919BOPBII2020-05-122020-05-12Balance on Investment Income (DISCONTINUED)1960-01-012014-01-01QuarterlyQBillions of DollarsBil. of $Seasonally AdjustedSA2014-06-18 08:41:27-0511This 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.
10110BOPBIIA2020-05-122020-05-12Balance on Investment Income (DISCONTINUED)1960-01-012013-01-01AnnualABillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:27-0511This 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.
11111BOPBIIN2020-05-122020-05-12Balance on Investment Income (DISCONTINUED)1960-01-012014-01-01QuarterlyQBillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:27-0511This 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.
12112BOPBM2020-05-122020-05-12Balance on Merchandise Trade (DISCONTINUED)1960-01-012014-01-01QuarterlyQBillions of DollarsBil. of $Seasonally AdjustedSA2014-06-18 08:41:27-0567This 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.
13113BOPBMA2020-05-122020-05-12Balance on Merchandise Trade (DISCONTINUED)1960-01-012013-01-01AnnualABillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:27-0517This 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.
14114BOPBMN2020-05-122020-05-12Balance on Merchandise Trade (DISCONTINUED)1960-01-012014-01-01QuarterlyQBillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:27-0517This 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.
15115BOPBSV2020-05-122020-05-12Balance on Services (DISCONTINUED)1960-01-012014-01-01QuarterlyQBillions of DollarsBil. of $Seasonally AdjustedSA2014-06-18 08:41:27-0511This 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.
16116BOPBSVA2020-05-122020-05-12Balance on Services (DISCONTINUED)1960-01-012013-01-01AnnualABillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:27-0511This 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.
17117BOPBSVN2020-05-122020-05-12Balance on Services (DISCONTINUED)1960-01-012014-01-01QuarterlyQBillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:27-0511This 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.
18118BOPCAT2020-05-122020-05-12Capital Account Transactions, Net (DISCONTINUED)1989-10-012014-01-01QuarterlyQBillions of DollarsBil. of $Seasonally AdjustedSA2014-06-18 08:41:26-0522This 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.
19119BOPCATA2020-05-122020-05-12Capital Account Transactions, Net (DISCONTINUED)1989-01-012013-01-01AnnualABillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:26-0512This 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.
20120BOPCATN2020-05-122020-05-12Capital Account Transactions, Net (DISCONTINUED)1989-10-012014-01-01QuarterlyQBillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:26-0512This 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.
21121BOPG2020-05-122020-05-12Unilateral Transfers, Net (DISCONTINUED)1960-01-012014-01-01QuarterlyQBillions of DollarsBil. of $Seasonally AdjustedSA2014-06-18 08:41:26-0555This 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.
22122BOPGA2020-05-122020-05-12Unilateral Transfers, Net (DISCONTINUED)1960-01-012013-01-01AnnualABillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:25-0515This 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.
23123BOPGN2020-05-122020-05-12Unilateral Transfers, Net (DISCONTINUED)1960-01-012014-01-01QuarterlyQBillions of DollarsBil. of $Not Seasonally AdjustedNSA2014-06-18 08:41:25-0515This 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.
24124BOPGSTB2020-05-122020-05-12Trade Balance: Goods and Services, Balance of Payments Basis1992-01-012020-03-01MonthlyMMillions of DollarsMil. of $Seasonally AdjustedSA2020-05-05 07:52:01-056868Further 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
25125BOPGTB2020-05-122020-05-12Trade Balance: Goods, Balance of Payments Basis1992-01-012020-03-01MonthlyMMillions of DollarsMil. of $Seasonally AdjustedSA2020-05-05 07:52:07-054141This 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
26126BOPSTB2020-05-122020-05-12Trade Balance: Services, Balance of Payments Basis1992-01-012020-03-01MonthlyMMillions of DollarsMil. of $Seasonally AdjustedSA2020-05-05 07:51:04-051717Further 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
27127IEABC2020-05-122020-05-12Balance on current account1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Seasonally AdjustedSA2020-03-19 09:01:02-055561Calculated by subtracting the imports of goods and services and income payments (debits) from the exports of goods and services and income receipts (credits)
28128IEABCA2020-05-122020-05-12Balance on current account1999-01-012019-01-01AnnualAMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:02-054061Calculated by subtracting the imports of goods and services and income payments (debits) from the exports of goods and services and income receipts (credits)
29129IEABCG2020-05-122020-05-12Balance on goods1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Seasonally AdjustedSA2020-03-19 09:01:07-0548Calculated by subtracting the imports of goods from the exports of goods
30130IEABCGA2020-05-122020-05-12Balance on goods1999-01-012019-01-01AnnualAMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:06-0578Calculated by subtracting the imports of goods from the exports of goods
31131IEABCGN2020-05-122020-05-12Balance on goods1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:25-0518Calculated by subtracting the imports of goods from the exports of goods
32132IEABCGS2020-05-122020-05-12Balance on goods and services1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Seasonally AdjustedSA2020-03-19 09:01:07-05315Calculated by subtracting the imports of goods and services from the exports of goods and services
33133IEABCGSA2020-05-122020-05-12Balance on goods and services1999-01-012019-01-01AnnualAMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:04-051315Calculated by subtracting the imports of goods and services from the exports of goods and services
34134IEABCGSN2020-05-122020-05-12Balance on goods and services1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:25-05115Calculated by subtracting the imports of goods and services from the exports of goods and services
35135IEABCN2020-05-122020-05-12Balance on current account1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:03-051461Calculated by subtracting the imports of goods and services and income payments (debits) from the exports of goods and services and income receipts (credits)
36136IEABCP2020-05-122020-05-12Balance on capital account1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Seasonally AdjustedSA2020-03-19 09:01:02-053743Calculated by subtracting the capital transfer payments and other debits from the capital transfer receipts and other credits
37137IEABCPA2020-05-122020-05-12Balance on capital account1999-01-012019-01-01AnnualAMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:03-052343Calculated by subtracting the capital transfer payments and other debits from the capital transfer receipts and other credits
38138IEABCPI2020-05-122020-05-12Balance on primary income1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Seasonally AdjustedSA2020-03-19 09:01:05-0547Calculated by subtracting the primary income payments from the primary income receipts
39139IEABCPIA2020-05-122020-05-12Balance on primary income1999-01-012019-01-01AnnualAMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:07-0537Calculated by subtracting the primary income payments from the primary income receipts
40140IEABCPIN2020-05-122020-05-12Balance on primary income1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:25-0517Calculated by subtracting the primary income payments from the primary income receipts
41141IEABCPN2020-05-122020-05-12Balance on capital account1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:04-05943Calculated by subtracting the capital transfer payments and other debits from the capital transfer receipts and other credits
42142IEABCS2020-05-122020-05-12Balance on services1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Seasonally AdjustedSA2020-03-19 09:01:25-0512Calculated by subtracting the imports of services from the exports of services
43143IEABCSA2020-05-122020-05-12Balance on services1999-01-012019-01-01AnnualAMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:07-0512Calculated by subtracting the imports of services from the exports of services
44144IEABCSI2020-05-122020-05-12Balance on secondary income1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Seasonally AdjustedSA2020-03-19 09:01:25-0513Calculated by subtracting the secondary income (current transfer) payments from the secondary income (current transfer) receipts
45145IEABCSIA2020-05-122020-05-12Balance on secondary income1999-01-012019-01-01AnnualAMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:06-0523Calculated by subtracting the secondary income (current transfer) payments from the secondary income (current transfer) receipts
46146IEABCSIN2020-05-122020-05-12Balance on secondary income1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:25-0513Calculated by subtracting the secondary income (current transfer) payments from the secondary income (current transfer) receipts
47147IEABCSN2020-05-122020-05-12Balance on services1999-01-012019-10-01QuarterlyQMillions of DollarsMil. of $Not Seasonally AdjustedNSA2020-03-19 09:01:09-0512Calculated 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