search/contentsholder/posts.list

作成された記事の一覧を取得

URL

GET /v1.0/search/contentsholder/posts.list

パラメータ

名前 必須 デフォルト値 説明
query 任意 空文字 キーワードによる絞り込み。また、別表の記法に対応。
offset 任意 0 取得開始位置。0~1000の範囲で指定。
limit 任意 10 取得件数。1~100の範囲で指定。
sort 任意 published_at 並び替えに使用する項目。作成日時ならcreated_at、公開日時ならpublished_atを指定。
direction 任意 desc 並び替えの方向。昇順ならasc、降順ならdescを指定。

queryの記法

下記の記法に対応しています。下記をスペースで連結することでAND検索になります。

記法 説明
東京 オリンピック キーワードによる絞り込み。東京とオリンピックを含む記事に絞り込む。
"one piece" 語順も含めた完全一致による絞り込み。
東京 オリンピック OR 五輪 OR検索。東京とオリンピックを含む記事か、東京と五輪を含む記事に絞り込む。
選挙 -大統領 NOT検索。選挙を含んで大統領を含まない記事に絞り込む。
(東京 オリンピック) OR (選挙 -大統領) かっこによるグルーピング。東京とオリンピックを含む記事か、選挙を含んで大統領を含まない記事に絞り込む。
unit_id:111111111111111111 コンテンツホルダー・ユニットによる絞り込み。コンテンツホルダー・ユニットのIDを指定。
tag:オリンピック タグによる絞り込み。記事に付与されているタグを指定。
label:オリンピック Deprecated. ラベルによる絞り込み。記事に付与されているラベルを指定。
official_label:オリンピック Deprecated. オフィシャルラベルによる絞り込み。記事に付与されているオフィシャルラベルを指定。
series_id:333333333333333333 連載による絞り込み。記事に付与されている連載のIDを指定。
topic_id:444444444444444444 トピックによる絞り込み。記事に付与されているトピックのIDを指定。
author_id:555555555555555555 オーサーによる絞り込み。オーサーのIDを指定。
published_at:>=2016-01-01T00:00:00+09:00 公開日時が指定した日時以降の記事に絞り込む。>、<、>=、<= の演算子が使用可能。
created_at:<=2016-01-01T00:00:00+09:00 作成日時が指定した日時以前の記事に絞り込む。 >、<、>=、<= の演算子が使用可能。
has:image 画像がある記事のみに絞り込む。
has:video 動画がある記事のみに絞り込む。
has:author オーサーがひもづいた記事のみに絞り込む。
title:オリンピック 検索対象をタイトルのみにする。

補足1: unit_id、series_id、topic_idに指定する値について

パラメータのqueryでunit_id、series_id、topic_idにそれぞれ任意の値を指定することで、コンテンツホルダー・ユニット、記事がひもづく連載およびトピックで絞り込みができます。unit_id、series_id、topic_idの値は、nor.cmsで調べられます。

レスポンス

{
    "ok": true,
    "posts": [
        {
            "id": "0123456",
            "url": "https://nordot.app/0123456",
            "title": "桜の開花もカウントダウン",
            "subtitle": "今週末にも開花の予想",
            "status": "public",
            "description": "本日ウェザーリポートが発表した最新の桜の開花予想によると、
            先週後半から全国的に気温の高い状態...",
            "published_at": "2015-12-10T20:09:31+00:00",
            "expired_at": "2016-11-10T20:09:31+00:00",
            "created_at": "2015-11-10T20:09:31+00:00",
            "updated_at": "2015-12-25T18:58:10+00:00",
            "cover_image": null,
            "has_video": false, 
            "images": [
                {
                    "id": "2345678",
                    "url": "https://img.nordot.jp/ch/images/2345678/origin_1.jpg",
                    "thumb_360": "https://img.nordot.jp/t_thumb_360/ch/images/2345678/origin_1.jpg",
                    "caption": "順番待ちの大きなつぼみたちも間もなく開花"
                }
            ],
            "labels": [
                {
                    "name": "天気",
                    "count": 0
                }
            ],
            "tags": [
                "天気",
                "ウェザーリポート"
            ],
            "series": null,
            "topic": null,
            "authors": [
                {
                    "id": "0012345",
                    "name": "山田太郎",
                    "job_title": "ライター",
                    "about": "桜の開花を予想して30年。",
                    "profile_image": {
                        "url": "https://nordot-res.cloudinary.com/members/0012345/profile_1.png",
                        "thumb_360": "https://nordot-res.cloudinary.com/t_thumb_360/members/0012345/profile_1.png"
                    }
                }
            ],
            "unit": {
                "id": "1234567",
                "name": "ノアドット新聞",
                "status": "public",
                "signature_color": "0123456",
                "header_type": "border",
                "header_position": "center",
                "copyright_owner": "株式会社ノアドット新聞",
                "website_url": "https://nordot.app/",
                "twitter_url": "https://twitter.com/nordot_jp",
                "facebook_url": "https://www.facebook.com/nordot/",
                "instagram_url": "",
                "youtube_url": "",
                "line_url": "",
                "introduction": "",
                "created_at": "2015-11-17T01:54:20+00:00",
                "updated_at": "2018-03-04T23:51:02+00:00",
                "header_image":{
                    "url": "https://nordot-res.cloudinary.com/t_thumb_360/ch/units/1234567/header_15.png",
                    "url_w": 300,
                    "url_h": 60,
                    "thumb_360": "https://nordot-res.cloudinary.com/t_thumb_360/ch/units/1234567/header_15.png",
                    "square_300": "https://nordot-res.cloudinary.com/t_square_300/ch/units/1234567/header_15.png"
                },
                "profile_image":{
                    "url": "https://nordot-res.cloudinary.com/ch/units/1234567/profile_1.png",
                    "square_200": "https://nordot-res.cloudinary.com/t_square_200/ch/units/1234567/profile_1.png"
                },
                "publisher":{
                    "id": "0012345",
                    "name": "株式会社ノアドット新聞",
                    "created_at": "2015-11-17T01:52:24+00:00",
                    "updated_at": "2018-06-15T09:07:50+00:00"
                },
                "language": "ja-JP",
                "timezone": "Asia/Tokyo"
            }
        },
        ...
    ],
    "paging": {
        "count": 10,
        "offset": 0,
        "limit": 10,
        "total": 517243,
        "has_next": true,
        "next_cursor": "WzE0NDc0MDYxNzE0NjQsNTkyNTE0NjUwMzcwNDU0Nl0="
    }
}

postsには、条件に一致したsearch contentsholder postオブジェクトの配列が入っています。詳細は、search contentsholder postオブジェクトとpagingオブジェクトを参照してください。

totalは、10000件以上の場合は“10000”になります。

エラー

エラーコード 説明
invalid_query 不正なqueryの指定
invalid_offset 不正なoffsetの指定
invalid_limit 不正なlimitの指定
invalid_sort 不正なsortの指定
invalid_direction 不正なdirectionの指定

上記以外のエラーは、共通エラーの項目を参照してください。