I want to add data from an API (census.gov - https://api.census.gov/data/2016/acs/acs5/variables.json) to ArcMap. How do I do that? If I have to publish it on ArcGIS Online first, I can do that but I didn't see how to add data from an API url there either. Any suggestions? Note (my end goal is to inject the api into a custom widget script that pulls the data from a user defined area).
By adding an API to ArcMap I'm guessing that you mean to ArcCatalog. Because ArcMap is actually the map workspace and ArcCatalog is the listing of folders and connections (DB, Services, WMS etc.). ArcCatalog is where one would make a connection to the Service.
Unfortunately you can't add a raw API that outputs json as a connection in ArcCatalog. You can save the json off as a file in a folder, and then connect to the folder in ArcCatalog, and then add the layer to a map in ArcMap. Connections to GIS services are specific in ArcCatalog, they need to be a certain format, \ArcGIS\rest\services, WMS or if you have the interoperability tool, WFS. I would suggest saving the json as a file, connecting the folder in ArcCatalog, and then adding the json layer as a layer to a map. There may also be ways to script in python, but that is a whole other question and area. Hope this helps.