How do download a specific state or province except for the country?

Is it possible to download a specific state from an API? because right now so much taking time to country wise download directly from the official website.

And is there any other way to extract “pdf” file without using this command?

./ -a import -i your-area.pbf

I need to download selected area from user current state or province and use that pdf file to extract “gh” folder programmatically in the android application except for this command manual.

Is there anyone help me for this functionality?