Extract Publish Date API

Extract the publish date of an article (news or blog). The API will return the publish date of the article if it can be found. The date returned is in the format YYYY-MM-DD.

If no publish date can be found, publish_date is null.

GET
https://api.apileague.com/extract-publish-date

Parameters

NameExampleDescription
url
s r q
https://www.nytimes.com/2024/03/27/world/australia/economy-cost-of-living.htmlThe url for which the publish date should be extracted.
api-key
s r q
abcd1234Your API key.
Example Request and Response
GET
https://api.apileague.com/extract-publish-date?url=https%3A%2F%2Fwww.nytimes.com%2F2024%2F03%2F27%2Fworld%2Faustralia%2Feconomy-cost-of-living.html
{
    "publish_date": "2024-03-27"
}
 Copy Codecurl -X GET 'https://api.apileague.com/extract-publish-date?url=https%3A%2F%2Fwww.nytimes.com%2F2024%2F03%2F27%2Fworld%2Faustralia%2Feconomy-cost-of-living.html' \ -H 'x-api-key: myapikey'

Headers

Response Headers:

  • Content-Type: application/json
  • X-API-Quota-Request: The number of tokens used by the request
  • X-API-Quota-Used: The number of tokens used in total today
  • X-API-Quota-Left: The number of tokens left today (depends on your plan)

Frequently Asked Questions

What format is the date returned in?

The API returns the publish date in the standard ISO 8601 format: YYYY-MM-DD.

Can it extract the modification date?

The API primarily targets the original publish date. However, on some sites, if the modification date is the only date available or prominently displayed, it might be returned.

Does it work on non-news websites?

Yes, it can work on blog posts and other content pages that have a clear publication date, but it is most effective on news articles and blogs.

How is the Extract Publish Date API different from the Extract Dates API?

The Extract Publish Date API is designed to find the single publication date of a web page, whereas the Extract Dates API finds all date mentions within a text string.

Questions? Need Help? Ask Away

Quotas

Calling this endpoint costs
1 token