Skip to main content
POST
/
api
/
habr
/
articles
/
search
/habr/articles/search
curl --request POST \
  --url https://api.anysite.io/api/habr/articles/search \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "count": 2,
  "timeout": 300,
  "lang": "ru",
  "query": "python",
  "hub": "python",
  "company": "ruvds",
  "user": "denis-19",
  "news": false,
  "sort": "date",
  "period": "daily"
}
'
[
  {
    "id": "<string>",
    "@type": "@habr_article_ref",
    "title": "<string>",
    "lead": "<string>",
    "url": "<string>",
    "image": "<string>",
    "post_type": "<string>",
    "lang": "<string>",
    "complexity": "<string>",
    "reading_time": 123,
    "is_corporative": false,
    "tags": [],
    "published_at": "<string>",
    "author": {
      "id": "<string>",
      "alias": "<string>",
      "@type": "@habr_author",
      "fullname": "<string>",
      "speciality": "<string>",
      "image": "<string>",
      "rating": 123,
      "score": 123
    },
    "statistics": {
      "@type": "@habr_article_statistics",
      "comment_count": 123,
      "favorite_count": 123,
      "reading_count": 123,
      "score": 123,
      "vote_count": 123,
      "vote_count_plus": 123,
      "vote_count_minus": 123,
      "reach": 123,
      "reader_count": 123
    },
    "hubs": [],
    "flows": []
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
count
integer
required

Max result count

Required range: x >= 1
Example:

20

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
lang
enum<string>
default:ru

Content language

Available options:
ru,
en
query
string | null

Search keyword

Example:

"python"

hub
string | null

Filter by hub alias

Example:

"python"

company
string | null

Filter by company alias

Example:

"ruvds"

user
string | null

Filter by author alias

Example:

"denis-19"

news
boolean
default:false

Return news posts instead of articles

sort
enum<string>
default:date

Result ordering

Available options:
date,
rating
period
enum<string>
default:daily

Time window when sort is rating

Available options:
daily,
weekly,
monthly,
yearly,
alltime

Response

Successful Response

id
string
required
@type
string
default:@habr_article_ref
title
string | null
lead
string | null
url
string | null
image
string | null
post_type
string | null
lang
string | null
complexity
string | null
reading_time
integer | null
is_corporative
boolean
default:false
tags
string[]
published_at
string | null
author
HabrAuthor · object
statistics
HabrArticleStatistics · object
hubs
HabrHubRef · object[]
flows
HabrFlowRef · object[]