R ipums api - ERROR message

hi,
I am new to the IPUMS community, and I expect to actively use the IPUMS API.

I am using R to get a data call using the IPUMS API key, but I am getting an error message that reads like this “Error: Your API call has errors. The API message returned is HTTP Status 404 ? Not Foundbody {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}

HTTP Status 404 ? Not Found

.”

I am not completely sure what is wrong. See script below

library(ipumsr)
library(mapview)

set_ipums_api_key(“I inserted the key code here”, save=TRUE)

dc_pums_2021 ← get_pums(variables =c(“SEX”,“AGEP”,“HHT”,“MV”),
state=“DC”, survey = “ACS5”,
year=2021, recode = TRUE)

It looks like the issue is that you are requesting variable names that do not exist in IPUMS USA. These appear to be original ACS variable names from the PUMS. IPUMS renames all variables. For example, in the original PUMS file, the age variable is AGEP, but in IPUMS USA, it is AGE. You can browse and find variables in the IPUMS USA extract system.

@Jose_Funes another issue is that get_pums() is a function from the tidycensus package, not ipumsr. I would recommend reading through this ipumsr vignette if you want to request IPUMS USA data via the IPUMS API.