Is it fine to use recently with the past simple tense in the following sentence?
Did you read any books recently?
Is it grammatically correct?
Or do I have to use:
Have you read any books recently?
As a native AmE speaker, I think your two examples are both acceptable and don't have any difference in meaning.
However, if you compared
Did you read Bleak House recently?
Have you read Bleak House recently?
then there is a difference.
"Did you read Bleak House recently?" pre-supposes that the other person has read that book once (or that we're discussing a particular time s/he read it) and asks whether that one time was recent.
"Have you read Bleak House recently?" suggests that the other person has read the book more than once and asks whether at least one of those readings was recent.
Recently is a general-time adverb. Together with already, yet, just, and many others, it states a non-definite and relative (to the listener or to the speaker) period of time, which could perfectly be sometime in the past (I've got no idea when) as well as sometime in the present (I still have to think about this sometime in the present, maybe a theme for a philosophy paper).
Thus, we should not use definite verb tenses for these situations.
What is important to bear in mind is that whenever a sentence tells you when the action happened with some precision (it could be today, yesterday, but it could also be 11:47 AM, which is rather precise, isn't it?) the general rule is to use definite verb tenses, like in the sentence
Did you read any books yesterday?
I will go to the market at 5 PM (Note: 5 PM sharp)
On the other hand, whenever we cannot say for sure when the action happened, the general rule is to use perfect tenses.
Have you read any books recently?
By 5 PM I will have gone to the market
Just as a reminder, in languages it's hell difficult to state "always" or "never". There can be situations in which rules will be vanished, so that's why I said "the general rule".
I'd use the present perfect, as recently does not imply a fixed date in the (recent) past.
A general rule I teach my students when asked whether to use simple past or present perfect is the following:
If the action is completed in the past, or there's a specified time, use the simple past.
Example: I read a book yesterday.
If you don't know if the action is completed, or it's still ongoing; and/or you don't know a specific time in the past, use the present perfect.
Example: Lately, I have had strange dreams. Or, indeed: Have you read any books recently?
Please see the definition of recently in the Oxford dictionary and look at its example sentences. I don't want to copy them all here due to concerns of violating a copyright. But one example is in the simple past:
Dean recently lost his job in a sports shop and applied to join the fire service.
The Merriam-Webster gives five example sentences for recently and four of them use recently with the simple past.
To say something like 'You have to use have you read' or 'we should not use definite verb tenses for these situations' is obviously incorrect.
The sentence with the simple past is grammatical and fine.
Did you read any book recently?
Have you read any book recently?
Both the sentences are correct grammatically,
The adverb recently means "not long ago" or "only a short time ago".
I saw him a short time ago" = I saw him recently.
You can use the recently in both the present perfect and the past simple. Look at the following sentences in the simple past:
She graduated from college recently.
I saw him recently for the first time in many years.
We received a letter from him recently.
Strangely enough, Merriam Webster has stated five sentences using the recently, four of which are in the simple past.
As a matter of fact, you cannot use the recently in the past simple with times in the past such as I saw him yesterday, he went to New York last week.
Did you read any book recently? is OK, but you cannot use the recently in the sentence "Did you read any book yesterday/last month".
Some adverbials, such as "just, recently, already, once/twice, ever/never, today, this morning /this week etc., and phrases with "for/since" are used with both forms [the Present Perfect and Past Simple]. With "recently" there's little difference in meaning.
We have recently moved house.(recently =lately )
We recently moved house. (recently =not long ago)
OGEG John Eastwood.