Is there any API where I can input chromosome location and it will provide us gene names, for example input chr: 1 location 154714693:154754070 and it will return a list of gene names or ID within this region?
With R biomaRt you can retrieve them.
ensembl = useMart("ensembl",dataset="hsapiens_gene_ensembl")
filterlist <- list("1:154714693:154754070","protein_coding")
genes <- getBM(attributes=c('hgnc_symbol', 'chromosome_name', 'start_position', 'end_position'), filters = c("chromosomal_region","biotype"),values = filterlist, mart = ensembl)
hgnc_symbol chromosome_name start_position end_position 1
KCNN3 1 154697455 154870280
The NCBI as an API called 'E-utilities' (see short intro) that allows access to almost all their databases. It's a bit tricky to get used to it (and sometimes it wants stupid - even discontinued - identifiers as input), but has a lot of power, there are libraries for this in biopython & bioperl (I think), R might have one too. It's possible to exactly the kind of search you want with the 'efetch' method and rettype 'feature table' (or maybe the full xml record) as well as seq start and stop (you need to have the accession of the chromsome one sequence as a qurey ID).
Another thing I have used are genome annotation tables from NCBI. They are on the FTP server (where the structure is apparently in constant flux, so it's again hard to find), but they list all annotations of a given genome assembly and are sorted by position, so you can easily search them with a script - if you are looking for multiple positions this may well be faster then going through an online API (This folder seems to have multiple files, if you want to take a look at it).
You can use the Ensembl REST API. This is how to do overlap queries: https://rest.ensembl.org/documentation/info/overlap_region