First of all, Area should be used for web app like MVC or razor pages which is used to group as a separate Namespace for routing/Folder structure for views and Razor Pages. We can also see scaffold option for Area creation in VS.

In the meantime, APIs should be distinguished by [Route] and http type, just like what you know as RESTful. Coming back to your topic, I created an .Net 6 MVC app and create Area structure. I have below controllers in Area.
[Area("Admin")]
[Route("admin/api/[controller]")]
[ApiController]
public class HelloController : ControllerBase
{
[HttpGet]
public string hello()
{
return "hello admin area";
}
}
[Area("Admin")]
public class HomeController : Controller
{
public IActionResult Index()
{
return View();
}
}
And below controllers.
[Route("api/[controller]")]
[ApiController]
public class HelloController : ControllerBase
{
[HttpGet]
public string hello()
{
return "hello world";
}
}
public class HomeController : Controller
{
public IActionResult Index()
{
return View();
}
}
Then I followed this document to integrate swagger ui into my app. It requires to install <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> and add codes below.
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
...
var app = builder.Build();
...
app.UseSwagger();
app.UseSwaggerUI();

Even if we don't put the Controllers inside Area folder, no matter what folder it is, swagger could also work well.

[Route]definition. For MVC controller, we can have the same controller name and action name, but in API controller, we have to make sure routes are different witth each other by setting Route attribute. You can see my sample codes below.