メむンコンテンツぞスキップ
芋出し画像

【2023幎床】noteの非公匏API䞀芧

    蚘事「【2020幎床】noteのAPI䞀芧[完党版]」が投皿されおから幎経ち、APIのバヌゞョンも新たにv3も远加されたり、゚ンドポむントも増えおいたすので、2023幎版を改めお曞く事にしたした。

    ムンクの叫び

    ちなみに、どう曞いお良いか方針が纏たらなかった時の悲鳎です。実はこの時、曞き始めた蚘事は今回の蚘事ず関係はしおたすが、別の蚘事です。

    あれ、曞きかけが枛っおないのでは

    目次

    手っ取り早く目的のAPIを芋たい方は 「note API䞀芧」の各カテゎリ蚘事などをクリックしおください。

    APIずは

    APIに぀いお


    APIApplication Programming Interfaceずは、゜フトりェア同士がコミュニケヌションを取るための特別なルヌルや手段の事です。

    䌚話をする時には、担圓ごず゚ンドポむントに圹割が分かれおいたす。

    APIず䌚話するずきには、次のような流れになりたす。

    クラむアントブラりザやアプリケヌション

    1. 䌚話する 窓口゚ンドポむントを決める

    2.  ゚ンドポむントに「䟝頌の内容皮別」HTTPメ゜ッドデヌタが欲しいなどを䌝える

    「䟝頌」は APIの立堎から芋るず 「操䜜」に圓たりたす。

    API

    1.  HTTPメ゜ッドで ゚ンドポむントを呌び出す

    2. 「クラむアント」に察しお (noteのAPIの堎合はJSON圢匏の)「デヌタ」 ず 䟝頌内容を実行した結果HTTPステヌタスコヌド成功、倱敗などの返事を返す

    HTTPメ゜ッド

    HTTPメ゜ッドは、クラむアントがAPIサヌバヌに察しおどのような凊理を芁求するかを瀺す手段です。

    noteのAPIで䜿われおいるHTTPメ゜ッドに぀いお説明したす。

    • GET: リ゜ヌスの取埗を芁求したす。指定したURLの情報を取埗したり、Webペヌゞを衚瀺する際に䜿甚されたす。

    • POST: デヌタの送信やリ゜ヌスの䜜成を芁求したす。フォヌムの入力デヌタや新しいデヌタをサヌバヌに送信する際に䜿甚されたす。

    • DELETE: リ゜ヌスの削陀を芁求したす。指定したURLに存圚するデヌタを削陀する際に䜿甚されたす。

    適切なHTTPメ゜ッドを䜿甚するこずで、デヌタの取埗、䜜成、曎新、削陀などの凊理を正確にAPIサヌバヌに䌝えるこずができたす。

    HTTPステヌタスコヌド

    HTTPステヌタスコヌドは、Webサヌバヌからのレスポンスに含たれる3桁の数字です。

    クラむアントブラりザやアプリケヌションに察しお実行結果や゚ラヌの情報を䌝える圹割を持ちたす。

    HTTPステヌタスコヌドは、クラむアントがサヌバヌの応答を正しく理解し、適切な凊理を行うための重芁な情報です。

    noteのAPIで䜿われおるHTTPステヌタスコヌドを説明したす。

    • 200: リク゚ストが成功し、正垞に凊理されたこずを瀺したす。OK

    • 201: リク゚ストが成功し、正垞に登録されたこずを瀺したす。CREATED

    • 400: リク゚ストが䞍正であるため、サヌバヌがリク゚ストを理解できたせん。noteのAPIでは怜玢するずきにパラメヌタヌの指定が間違っおいたずきなどに「400」が返されたす。Bad Request

    • 403: アクセスが犁止されおいるため、リ゜ヌスにアクセスできたせん。noteのAPIでは「すき」などを床に50を越える数をしたずきなど制限を越える䜿い方をした時に 「403」が返されたす。Forbidden

    noteのAPIのバヌゞョン

    noteの非公匏APIのバヌゞョンには 、バヌゞョン「v1」ず バヌゞョン「v2」「v3」が存圚したす。

    「v1」「v2」「v3」のURL はそれぞれ 「noteのURL」+ 「api」+ 「バヌゞョン」になりたす

    v1: https://note.com/api/v1
    v2:  https://note.com/api/v2
    v3:  https://note.com/api/v3

    note API䞀芧

    蚘事

    キヌワヌドを指定しお 蚘事を怜玢

    context を 「note」、怜玢したい語句をキヌワヌド「q」に指定しお蚘事の怜玢結果を取埗したす。

    たた APIの「v1」「v2」はペヌゞングのパラメヌタずしお「page」のみでしたが、「v3」では 「size」(䞀床に取埗する件数)ず「start」デヌタの取埗を開始する䜍眮を指定できる様になり柔軟に取埗出来るようになりたした。

    䟋に瀺した ゚ンドポむントでは size=1, start=0ず指定しお、先頭の䞀件のみ取埗しおいたす。

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    https://note.com/api/v3/searches?context=user&q=北海道&size=1&start=0

    レスポンス結果

    正垞

    {"data":{"note_cursor":"2","user_cursor":"initial","magazine_cursor":"initial","hashtag_cursor":"initial","circle_cursor":"initial","note_for_sale_cursor":"initial","notes":{"is_last_page":null,"contents":[{"id":54674002,"type":"TextNote","status":"published","name":"GPAからのおすすめ番倖線北海道癜糠町","description":null,"price":0,"key":"n344b94e2888f","slug":"slug-n344b94e2888f","publish_at":"2022-10-27T22:30:00.000+09:00","thumbnail_external_url":"","eyecatch":"https://assets.st-note.com/production/uploads/images/89806731/rectangle_large_type_2_7d67f0e74814b5c2e90b3995b85e4ba5.png?fit=bounds\u0026quality=85\u0026width=1280","user":{"id":4626785,"key":"21facb20f24958cdfd3fdb1ab32423d5","name":"Green Ponta ActionGPA","urlname":"gpa","nickname":"Green Ponta ActionGPA","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/52575486/profile_f474085c0933d77ddc190eb1e61631f5.png?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","custom_domain":null,"disable_support":true,"email_confirmed_flag":true,"like_appeal_text":"スキありがずうございたす","like_appeal_image":null,"twitter_nickname":"Ponta","magazine_add_appeal":{"text":"マガゞンぞの远加ありがずうございたす","image":null}},"can_read":true,"is_author":false,"external_url":null,"custom_domain":null,"body":"こんにちは、Green Ponta ActionGPAチヌムの「のっち」です\n\n10月22日からのGPAの「おすすめ」、もうチェックいただいたでしょうか\n実は今回、おすすめを制䜜するにあたり、北海道癜糠町でふるさず玍皎を担圓しおいる柎田さん、西川さんにお話を䌺いたした。\n\n返瀌品以倖にも癜糠町のいいずころをいっぱい教えおいただいたので、今回は「おすすめ番倖線」ずしお、みなさんに北海道癜糠町をご玹介しちゃいたす\n\n■癜糠町っおどんな町癜糠町は「笑顔かがやく食ず食材","separator":null,"is_limited":false,"is_trial":false,"can_update":false,"tweet_text":"GPAからのおすすめ番倖線北海道癜糠町Green Ponta ActionGPA @Ponta  #note #SDGsぞの向き合い方","is_refund":false,"highlight":"","eyecatch_type_2":null,"sp_eyecatch":"https://assets.st-note.com/production/uploads/images/89806731/square_large_7d67f0e74814b5c2e90b3995b85e4ba5.png","category":null,"comment_count":0,"like_count":3752,"is_liked":false,"is_included_private_purchase_magazine":false,"image_count":9,"format":"4.0","audio":{},"is_membership_connected":false,"has_available_circle_plans":false}],"top_search_contents":[],"total_count":10000,"rounded_total_count":10000},"magazines":{},"users":{},"hashtags":{},"circles":{},"notes_for_sale":{},"cursor":{"note":"2","magazine":"initial","user":"initial","hashtag":"initial","circle":"initial","note_for_sale":"initial"}}}

    HTTPステヌタスコヌド

    200

    ゚ラヌ

    {"error":{"message":"怜玢パラメヌタを凊理できたせん。","type":"bad_request"}}

    HTTPステヌタスコヌド

    400

    ナヌザヌの蚘事䞀芧

    ゚ンドポむントに「ナヌザヌ名」を指定しお ナヌザヌの蚘事䞀芧を取埗したす。

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    私の蚘事だずタむトルがない事も倚いため、 note公匏infoでテストしたした。

    creators/ナヌザヌ名/contents

    https://note.com/api/v2/creators/info/contents?kind=note&page=1

    レスポンス結果

    画像

    サむトマップずか䜜れそうですね。

    HTTPステヌタスコヌド

    200

    蚘事の詳现

    ゚ンドポむントに蚘事のキヌを指定しお蚘事の詳现を取埗したす。

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    notes/蚘事のキヌ

    
    https://note.com/api/v3/notes/n4f0c7b884789
    

    い぀の間にかAPIのバヌゞョンが廃止されバヌゞョンに倉曎されおいたす

    レスポンス結果

    {"data":{"id":66547812,"user_id":120,"status":"published","type":"TextNote","key":"n4f0c7b884789","slug":"slug-n4f0c7b884789","name":"【2023幎6月版】創䜜のネタ探しに連続投皿のヒントに6月の創䜜カレンダヌができたした","body":"\u003cp style=\"text-align: start\" name=\"bee25c95-7914-43f1-876c-dce00a6770ee\" id=\"bee25c95-7914-43f1-876c-dce00a6770ee\"\u003e創䜜のネタ探しや連続投皿のヒントをたずめ、毎月公開しおいる「\u003cstrong\u003enote創䜜カレンダヌ\u003c/strong\u003e」。2023幎6月版ができたした\u003c/p\u003e\u003cp style=\"text-align: start\" name=\"fc894a0b-a20c-4904-abcb-4aa506cc9e53\" id=\"fc894a0b-a20c-4904-abcb-4aa506cc9e53\"\u003e雚が倚くなる時期です。梅雚シヌズンを乗り切るためのグッズ玹介や、おうちで楜しめるコンテンツ玹介など、お埅ちしおいたす。\u003c/p\u003e\u003cfigure name=\"27cb230e-8c20-48be-ab74-094f01aff724\" id=\"27cb230e-8c20-48be-ab74-094f01aff724\"\u003e\u003cimg src=\"https://assets.st-note.com/img/1685088430937-URrmnd8M4u.png\" alt=\"2023幎6月の創䜜に圹立぀カレンダヌの画像\" width=\"620\" height=\"1343\"\u003e\u003cfigcaption\u003e\u003c/figcaption\u003e\u003c/figure\u003e\u003cp style=\"text-align: start\" name=\"debef16f-85f5-486f-9565-669401d26b1a\" id=\"debef16f-85f5-486f-9565-669401d26b1a\"\u003e画像をダりンロヌドしおスマホの埅ち受けに蚭定するず、ピッタリはたりたす。創䜜掻動やnoteを曞くヒントにお圹立おください。\u003c/p\u003e\u003ch3 style=\"text-align: start\" name=\"9d622918-56bf-4f67-aea0-4de42f43a633\" id=\"9d622918-56bf-4f67-aea0-4de42f43a633\"\u003e6月のおすすめお題\u003c/h3\u003e\u003cp style=\"text-align: start\" name=\"d37c2341-af0c-492f-aa7b-5cc23e8c3159\" id=\"d37c2341-af0c-492f-aa7b-5cc23e8c3159\"\u003e6月のむベントにぎったりなお題をピックアップ。\u003c/p\u003e\u003cp style=\"text-align: start\" name=\"4c31e1f1-57ce-44fb-8228-67c29a9fc369\" id=\"4c31e1f1-57ce-44fb-8228-67c29a9fc369\"\u003e・\u003ca href=\"https://note.com/contest/%E9%9B%A8%E3%81%AE%E6%97%A5%E3%82%92%E3%81%9F%E3%81%AE%E3%81%97%E3%81%8F?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#雚の日をたのしく\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E3%81%8A%E3%81%86%E3%81%A1%E6%99%82%E9%96%93%E3%82%92%E5%B7%A5%E5%A4%AB%E3%81%A7%E6%A5%BD%E3%81%97%E3%81%8F?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#おうち時間を工倫で楜しく\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E5%A4%9A%E6%A7%98%E6%80%A7%E3%82%92%E8%80%83%E3%81%88%E3%82%8B?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#倚様性を考える\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%E3%83%AC%E3%83%9D?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#むベントレポ\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E3%83%95%E3%82%A7%E3%82%B9%E8%A8%98%E9%8C%B2?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#フェス蚘録\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E3%82%B9%E3%83%9D%E3%83%BC%E3%83%84%E8%A6%B3%E6%88%A6%E8%A8%98?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#スポヌツ芳戊蚘\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E3%82%B5%E3%83%83%E3%82%AB%E3%83%BC%E3%82%92%E8%AA%9E%E3%82%8D%E3%81%86?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#サッカヌを語ろう\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E5%85%A8%E5%8A%9B%E3%81%A7%E6%8E%A8%E3%81%97%E3%81%9F%E3%81%84%E3%82%B2%E3%83%BC%E3%83%A0?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#党力で掚したいゲヌム\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E3%81%8A%E3%81%99%E3%81%99%E3%82%81%E3%82%AE%E3%83%95%E3%83%88?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#おすすめギフト\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E6%98%A0%E7%94%BB%E6%84%9F%E6%83%B3%E6%96%87?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#映画感想文\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E3%83%86%E3%83%AC%E3%83%93%E3%83%89%E3%83%A9%E3%83%9E%E6%84%9F%E6%83%B3%E6%96%87?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#テレビドラマ感想文\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E4%BB%8A%E3%81%93%E3%81%9D%E8%AA%AD%E3%81%BF%E3%81%9F%E3%81%84%E7%A5%9E%E3%83%9E%E3%83%B3%E3%82%AC?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#今こそ読みたい神マンガ\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E7%B5%90%E5%A9%9A%E5%BC%8F%E3%81%AE%E6%80%9D%E3%81%84%E5%87%BA?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#結婚匏の思い出\u003c/a\u003e\u003cbr\u003e・\u003ca href=\"https://note.com/contest/%E3%81%8A%E7%A5%AD%E3%82%8A%E3%83%AC%E3%83%9D%E3%83%BC%E3%83%88?f=trend\" target=\"_blank\" rel=\"nofollow noopener\"\u003e#お祭りレポヌト\u003c/a\u003e\u003c/p\u003e\u003cp style=\"text-align: start\" name=\"be6e7df8-a97e-4def-a691-578bb85ec9aa\" id=\"be6e7df8-a97e-4def-a691-578bb85ec9aa\"\u003e話題の䜜品やできごずに぀いおの蚘事は、note公匏Twitterなどで玹介するこずがありたす。みなさんの投皿、お埅ちしおいたす\u003c/p\u003e\u003cfigure name=\"82cb0b02-de40-4278-8f66-7b08a3066d55\" id=\"82cb0b02-de40-4278-8f66-7b08a3066d55\" data-src=\"https://twitter.com/note_PR/status/1658691908875714574?s=20\" data-identifier=\"null\" embedded-service=\"twitter\" embedded-content-key=\"embd2a4063e5500\"\u003e\u003cblockquote class=\"twitter-tweet\"\u003e\u003cp\u003e今週末開催のデザむンフェスタ\u003cbr\u003e出店するみなさんのお品曞きを玹介したす。\u003cbr\u003e\u003cbr\u003e🍪食べ物モチヌフのアクセサリヌ\u003ca href=\"https://t.co/DfgFO1KoQz\" rel=\"nofollow noopener\"\u003ehttps://t.co/DfgFO1KoQz\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e🥷忍者道具\u0026amp;グッズ \u003ca href=\"https://t.co/KJYP8YNWwa\" rel=\"nofollow noopener\"\u003ehttps://t.co/KJYP8YNWwa\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e🐀鳥グッズ \u003ca href=\"https://t.co/c23gWHYutj\" rel=\"nofollow noopener\"\u003ehttps://t.co/c23gWHYutj\u003c/a\u003e\u003ca href=\"https://twitter.com/hashtag/%E7%A7%81%E3%81%AE%E4%BD%9C%E5%93%81%E7%B4%B9%E4%BB%8B?src=hash\u0026amp;ref_src=twsrc%5Etfw\" rel=\"nofollow noopener\"\u003e#私の䜜品玹介\u003c/a\u003e で、販売する䜜品玹介などお埅ちしおいたす \u003ca href=\"https://twitter.com/hashtag/%E3%83%87%E3%82%B6%E3%83%95%E3%82%A7%E3%82%B957?src=hash\u0026amp;ref_src=twsrc%5Etfw\" rel=\"nofollow noopener\"\u003e#デザフェス57\u003c/a\u003e \u003ca href=\"https://t.co/Y2nLiiWfdP\" rel=\"nofollow noopener\"\u003epic.twitter.com/Y2nLiiWfdP\u003c/a\u003e\u003c/p\u003e— note (@note_PR) \u003ca href=\"https://twitter.com/note_PR/status/1658691908875714574?ref_src=twsrc%5Etfw\" rel=\"nofollow noopener\"\u003eMay 17, 2023\u003c/a\u003e\u003c/blockquote\u003e\n\n\u003c/figure\u003e\u003cp style=\"text-align: start\" name=\"40552d8c-fea4-428f-873b-b24422df7484\" id=\"40552d8c-fea4-428f-873b-b24422df7484\"\u003e\u003ca href=\"https://www.instagram.com/note_ig_official/\" target=\"_blank\" rel=\"nofollow noopener\"\u003e公匏Instagram\u003c/a\u003eでも、すおきな蚘事や創䜜のコツを玹介しおいたす。\u003c/p\u003e\u003cfigure name=\"b7eebcb6-463e-4613-b027-9c5aef2d5d1b\" id=\"b7eebcb6-463e-4613-b027-9c5aef2d5d1b\" data-src=\"https://www.instagram.com/p/CpKK0sQPd_x/\" data-identifier=\"null\" embedded-service=\"instagram\" embedded-content-key=\"emb780d44df71be\"\u003e\u003cblockquote class=\"instagram-media\" style=\"         width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);\"\u003e  \u003ca href=\"https://www.instagram.com/p/CpKK0sQPd_x/?utm_source=ig_embed\u0026amp;utm_campaign=loading\" target=\"_blank\" rel=\"nofollow noopener\"\u003e                   View this post on Instagram                                   \u003c/a\u003e\u003cp style=\"         text-align:center;  \"\u003e\u003ca href=\"https://www.instagram.com/p/CpKK0sQPd_x/?utm_source=ig_embed\u0026amp;utm_campaign=loading\" target=\"_blank\" rel=\"nofollow noopener\"\u003eA post shared by note【公匏】 (@note_ig_official)\u003c/a\u003e\u003c/p\u003e \u003c/blockquote\u003e\n\u003c/figure\u003e","separator":null,"description":"","index":[],"external_url":null,"disable_comment":true,"editable_scopes":["web"],"non_editable_reason":null,"capabilities":{"ruby_text":true,"formula_text":true,"duplication":true},"created_at":"2023-05-25T14:58:32.000+09:00","user":{"id":120,"key":"ebb1de3c7b1b301e26ea53cc3b57906f","urlname":"info","nickname":"note公匏","active_flag":true,"note_count":2025,"email_confirmed_flag":true,"created_at":"2014-04-04T20:07:41.000+09:00","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/93752369/profile_ae0f62081ec839762d6e066ef222a3d6.png?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","no_urlname_user":false,"disable_comment":false,"store_url":"","following_count":-1,"follower_count":-1,"profile":"ミッションは「だれもが創䜜をはじめ、続けられるようにする」。noteの最新情報や新機胜カむれンを玹介したす。\n線集郚アカりント : https://note.com/notemag || むベントアカりント : https://note.com/events","withdrawal":false,"is_me":false,"is_following":true,"is_followed":false,"is_admin":false,"custom_domain":null,"enable_serif":false,"others_related_notes_enabled":false,"disable_support":true,"twitter_nickname":"note_PR","socials":{"twitter":{"id":1990151,"nickname":"note_PR","name":"","uid":""}},"external_links":{"FacebookPageLink":{"url":"https://www.facebook.com/note.poc/"},"YoutubeLink":{"url":"https://www.youtube.com/c/note_event"}},"pro_user_id":291,"purchase_appeal_text_note":null,"purchase_appeal_text_magazine":null,"purchase_appeal_text_support":null,"follow_appeal_text":"創䜜の機䌚を広げるため、がんばりたす","follow_appeal_image":"https://assets.st-note.com/production/uploads/images/44189633/24aa76640a74255ba4b46846e9f4fb9c.gif?fit=bounds\u0026format=jpeg\u0026height=500\u0026quality=85\u0026width=500","like_appeal_text":"今日も楜しいnoteラむフを✚","like_appeal_image":"https://assets.st-note.com/production/uploads/images/23773239/9e816e792a9527d91a28b8ddf295e87b.gif?fit=bounds\u0026format=jpeg\u0026height=500\u0026quality=85\u0026width=500","share_appeal":{"text":"ありがずうございたすこのメッセヌゞはアカりント蚭定で远加できたす","image":"https://assets.st-note.com/production/uploads/images/44189813/2938d064835f00bcef0625d3ccc11bd1.gif?fit=bounds\u0026format=jpeg\u0026height=500\u0026quality=85\u0026width=500"},"magazine_add_appeal":{"text":"創䜜の機䌚を広げるため、がんばりたす","image":"https://assets.st-note.com/production/uploads/images/44189744/f4dab4cd18e33c3bb3c75af4295807bb.gif?fit=bounds\u0026format=jpeg\u0026height=500\u0026quality=85\u0026width=500"},"blocks_you":false,"is_blocked":false,"disable_guest_purchase":true,"enable_guest_paypay":false,"custom_support_box":{"text":"","button_title":null,"button_description":null,"link_url":"","background_color_code":"#196755","text_color_code":"#FFFFFF","banner_image_key":null,"banner_image_url":null}},"audio":null,"belonging_magazine_keys":[],"can_comment":true,"can_delete":false,"can_member_edit":false,"can_member_publish":false,"can_member_read":false,"can_member_write":false,"can_multiple_limited_note":true,"can_publish":false,"can_read":true,"can_review":true,"can_sell_on_first_come_note":false,"can_update":false,"can_vote":true,"can_show_hashtag_banner":true,"categories":[],"category":null,"classify_categories":[{"id":48}],"comment_viewable":true,"content_review_via":"free_pro_note","content_reviewers":[{"id":3794237,"nickname":"ゆきかぜ","urlname":"aketgw","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/103585642/profile_6316c4aa6dd79e3fde644a52abe42ca0.png?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","is_me":false},{"id":3569555,"nickname":"月草","urlname":"key102","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/59379868/profile_c93f608a911ab2db2d96f5effcac181f.png?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","is_me":false},{"id":2553721,"nickname":"かな","urlname":"kotonoha_kana","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/21544962/profile_241a782a621e4a4322b12f288e45ec25.jpg?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","is_me":false}],"custom_domain":null,"embedded_contents":[{"key":"embd2a4063e5500","url":"https://twitter.com/note_PR/status/1658691908875714574?s=20","service":"twitter","identifier":null,"embeddable_type":"Note","html_for_display":null,"caption":null,"created_at":"2023-05-25T15:16:25.000+09:00","html_for_embed":"\u003cspan\u003e\u003cblockquote class=\"twitter-tweet\" data-dnt=\"true\" align=\"center\"\u003e\u003cp lang=\"ja\" dir=\"ltr\"\u003e今週末開催のデザむンフェスタ\u003cbr\u003e出店するみなさんのお品曞きを玹介したす。\u003cbr\u003e\u003cbr\u003e🍪食べ物モチヌフのアクセサリヌ\u003ca href=\"https://t.co/DfgFO1KoQz\"\u003ehttps://t.co/DfgFO1KoQz\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e🥷忍者道具\u0026amp;グッズ \u003ca href=\"https://t.co/KJYP8YNWwa\"\u003ehttps://t.co/KJYP8YNWwa\u003c/a\u003e\u003cbr\u003e\u003cbr\u003e🐀鳥グッズ \u003ca href=\"https://t.co/c23gWHYutj\"\u003ehttps://t.co/c23gWHYutj\u003c/a\u003e\u003ca href=\"https://twitter.com/hashtag/%E7%A7%81%E3%81%AE%E4%BD%9C%E5%93%81%E7%B4%B9%E4%BB%8B?src=hash\u0026amp;ref_src=twsrc%5Etfw\"\u003e#私の䜜品玹介\u003c/a\u003e で、販売する䜜品玹介などお埅ちしおいたす \u003ca href=\"https://twitter.com/hashtag/%E3%83%87%E3%82%B6%E3%83%95%E3%82%A7%E3%82%B957?src=hash\u0026amp;ref_src=twsrc%5Etfw\"\u003e#デザフェス57\u003c/a\u003e \u003ca href=\"https://t.co/Y2nLiiWfdP\"\u003epic.twitter.com/Y2nLiiWfdP\u003c/a\u003e\u003c/p\u003e\u0026mdash; note (@note_PR) \u003ca href=\"https://twitter.com/note_PR/status/1658691908875714574?ref_src=twsrc%5Etfw\"\u003eMay 17, 2023\u003c/a\u003e\u003c/blockquote\u003e\n\u003cscript async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"\u003e\u003c/script\u003e\n\u003c/span\u003e"},{"key":"emb780d44df71be","url":"https://www.instagram.com/p/CpKK0sQPd_x/","service":"oembed","identifier":null,"embeddable_type":"Note","html_for_display":null,"caption":null,"created_at":"2023-05-25T15:16:44.000+09:00","html_for_embed":"\u003cspan\u003e\u003cblockquote class=\"instagram-media\" data-instgrm-permalink=\"https://www.instagram.com/p/CpKK0sQPd_x/?utm_source=ig_embed\u0026amp;utm_campaign=loading\" data-instgrm-version=\"14\" style=\" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; min-width:326px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);\"\u003e\u003cdiv style=\"padding:16px;\"\u003e \u003ca href=\"https://www.instagram.com/p/CpKK0sQPd_x/?utm_source=ig_embed\u0026amp;utm_campaign=loading\" style=\" background:#FFFFFF; line-height:0; padding:0 0; text-align:center; text-decoration:none; width:100%;\" target=\"_blank\"\u003e \u003cdiv style=\" display: flex; flex-direction: row; align-items: center;\"\u003e \u003cdiv style=\"background-color: #F4F4F4; border-radius: 50%; flex-grow: 0; height: 40px; margin-right: 14px; width: 40px;\"\u003e\u003c/div\u003e \u003cdiv style=\"display: flex; flex-direction: column; flex-grow: 1; justify-content: center;\"\u003e \u003cdiv style=\" background-color: #F4F4F4; border-radius: 4px; flex-grow: 0; height: 14px; margin-bottom: 6px; width: 100px;\"\u003e\u003c/div\u003e \u003cdiv style=\" background-color: #F4F4F4; border-radius: 4px; flex-grow: 0; height: 14px; width: 60px;\"\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"padding: 19% 0;\"\u003e\u003c/div\u003e \u003cdiv style=\"display:block; height:50px; margin:0 auto 12px; width:50px;\"\u003e\u003csvg width=\"50px\" height=\"50px\" viewBox=\"0 0 60 60\" version=\"1.1\" xmlns=\"https://www.w3.org/2000/svg\" xmlns:xlink=\"https://www.w3.org/1999/xlink\"\u003e\u003cg stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"\u003e\u003cg transform=\"translate(-511.000000, -20.000000)\" fill=\"#000000\"\u003e\u003cg\u003e\u003cpath d=\"M556.869,30.41 C554.814,30.41 553.148,32.076 553.148,34.131 C553.148,36.186 554.814,37.852 556.869,37.852 C558.924,37.852 560.59,36.186 560.59,34.131 C560.59,32.076 558.924,30.41 556.869,30.41 M541,60.657 C535.114,60.657 530.342,55.887 530.342,50 C530.342,44.114 535.114,39.342 541,39.342 C546.887,39.342 551.658,44.114 551.658,50 C551.658,55.887 546.887,60.657 541,60.657 M541,33.886 C532.1,33.886 524.886,41.1 524.886,50 C524.886,58.899 532.1,66.113 541,66.113 C549.9,66.113 557.115,58.899 557.115,50 C557.115,41.1 549.9,33.886 541,33.886 M565.378,62.101 C565.244,65.022 564.756,66.606 564.346,67.663 C563.803,69.06 563.154,70.057 562.106,71.106 C561.058,72.155 560.06,72.803 558.662,73.347 C557.607,73.757 556.021,74.244 553.102,74.378 C549.944,74.521 548.997,74.552 541,74.552 C533.003,74.552 532.056,74.521 528.898,74.378 C525.979,74.244 524.393,73.757 523.338,73.347 C521.94,72.803 520.942,72.155 519.894,71.106 C518.846,70.057 518.197,69.06 517.654,67.663 C517.244,66.606 516.755,65.022 516.623,62.101 C516.479,58.943 516.448,57.996 516.448,50 C516.448,42.003 516.479,41.056 516.623,37.899 C516.755,34.978 517.244,33.391 517.654,32.338 C518.197,30.938 518.846,29.942 519.894,28.894 C520.942,27.846 521.94,27.196 523.338,26.654 C524.393,26.244 525.979,25.756 528.898,25.623 C532.057,25.479 533.004,25.448 541,25.448 C548.997,25.448 549.943,25.479 553.102,25.623 C556.021,25.756 557.607,26.244 558.662,26.654 C560.06,27.196 561.058,27.846 562.106,28.894 C563.154,29.942 563.803,30.938 564.346,32.338 C564.756,33.391 565.244,34.978 565.378,37.899 C565.522,41.056 565.552,42.003 565.552,50 C565.552,57.996 565.522,58.943 565.378,62.101 M570.82,37.631 C570.674,34.438 570.167,32.258 569.425,30.349 C568.659,28.377 567.633,26.702 565.965,25.035 C564.297,23.368 562.623,22.342 560.652,21.575 C558.743,20.834 556.562,20.326 553.369,20.18 C550.169,20.033 549.148,20 541,20 C532.853,20 531.831,20.033 528.631,20.18 C525.438,20.326 523.257,20.834 521.349,21.575 C519.376,22.342 517.703,23.368 516.035,25.035 C514.368,26.702 513.342,28.377 512.574,30.349 C511.834,32.258 511.326,34.438 511.181,37.631 C511.035,40.831 511,41.851 511,50 C511,58.147 511.035,59.17 511.181,62.369 C511.326,65.562 511.834,67.743 512.574,69.651 C513.342,71.625 514.368,73.296 516.035,74.965 C517.703,76.634 519.376,77.658 521.349,78.425 C523.257,79.167 525.438,79.673 528.631,79.82 C531.831,79.965 532.853,80.001 541,80.001 C549.148,80.001 550.169,79.965 553.369,79.82 C556.562,79.673 558.743,79.167 560.652,78.425 C562.623,77.658 564.297,76.634 565.965,74.965 C567.633,73.296 568.659,71.625 569.425,69.651 C570.167,67.743 570.674,65.562 570.82,62.369 C570.966,59.17 571,58.147 571,50 C571,41.851 570.966,40.831 570.82,37.631\"\u003e\u003c/path\u003e\u003c/g\u003e\u003c/g\u003e\u003c/g\u003e\u003c/svg\u003e\u003c/div\u003e\u003cdiv style=\"padding-top: 8px;\"\u003e \u003cdiv style=\" color:#3897f0; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:550; line-height:18px;\"\u003eView this post on Instagram\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"padding: 12.5% 0;\"\u003e\u003c/div\u003e \u003cdiv style=\"display: flex; flex-direction: row; margin-bottom: 14px; align-items: center;\"\u003e\u003cdiv\u003e \u003cdiv style=\"background-color: #F4F4F4; border-radius: 50%; height: 12.5px; width: 12.5px; transform: translateX(0px) translateY(7px);\"\u003e\u003c/div\u003e \u003cdiv style=\"background-color: #F4F4F4; height: 12.5px; transform: rotate(-45deg) translateX(3px) translateY(1px); width: 12.5px; flex-grow: 0; margin-right: 14px; margin-left: 2px;\"\u003e\u003c/div\u003e \u003cdiv style=\"background-color: #F4F4F4; border-radius: 50%; height: 12.5px; width: 12.5px; transform: translateX(9px) translateY(-18px);\"\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"margin-left: 8px;\"\u003e \u003cdiv style=\" background-color: #F4F4F4; border-radius: 50%; flex-grow: 0; height: 20px; width: 20px;\"\u003e\u003c/div\u003e \u003cdiv style=\" width: 0; height: 0; border-top: 2px solid transparent; border-left: 6px solid #f4f4f4; border-bottom: 2px solid transparent; transform: translateX(16px) translateY(-4px) rotate(30deg)\"\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"margin-left: auto;\"\u003e \u003cdiv style=\" width: 0px; border-top: 8px solid #F4F4F4; border-right: 8px solid transparent; transform: translateY(16px);\"\u003e\u003c/div\u003e \u003cdiv style=\" background-color: #F4F4F4; flex-grow: 0; height: 12px; width: 16px; transform: translateY(-4px);\"\u003e\u003c/div\u003e \u003cdiv style=\" width: 0; height: 0; border-top: 8px solid #F4F4F4; border-left: 8px solid transparent; transform: translateY(-4px) translateX(8px);\"\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e \u003cdiv style=\"display: flex; flex-direction: column; flex-grow: 1; justify-content: center; margin-bottom: 24px;\"\u003e \u003cdiv style=\" background-color: #F4F4F4; border-radius: 4px; flex-grow: 0; height: 14px; margin-bottom: 6px; width: 224px;\"\u003e\u003c/div\u003e \u003cdiv style=\" background-color: #F4F4F4; border-radius: 4px; flex-grow: 0; height: 14px; width: 144px;\"\u003e\u003c/div\u003e\u003c/div\u003e\u003c/a\u003e\u003cp style=\" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;\"\u003e\u003ca href=\"https://www.instagram.com/p/CpKK0sQPd_x/?utm_source=ig_embed\u0026amp;utm_campaign=loading\" style=\" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none;\" target=\"_blank\"\u003eA post shared by note【公匏】 (@note_ig_official)\u003c/a\u003e\u003c/p\u003e\u003c/div\u003e\u003c/blockquote\u003e\n\u003cscript async src=\"//platform.instagram.com/en_US/embeds.js\"\u003e\u003c/script\u003e\u003c/span\u003e"}],"eyecatch":"https://assets.st-note.com/production/uploads/images/106542924/rectangle_large_type_2_aa172a29ce75949736807981c3463d66.png?fit=bounds\u0026quality=85\u0026width=1280","eyecatch_alt":"芋出し画像","eyecatch_height":670,"eyecatch_width":1280,"format":"4.0","has_coupon":false,"has_draft":false,"hashtag_notes":[{"id":384984427,"created_at":"2023-05-26T17:13:40.000+09:00","hashtag":{"name":"#カレンダヌ"}},{"id":384984428,"created_at":"2023-05-26T17:13:40.000+09:00","hashtag":{"name":"#6月"}},{"id":384984426,"created_at":"2023-05-26T17:13:40.000+09:00","hashtag":{"name":"#創䜜カレンダヌ"}}],"is_available":false,"is_circle_description":false,"is_draft":false,"is_for_work":false,"is_liked":false,"is_limited":false,"is_magazine_purchased":false,"is_member_edit":false,"is_member_editing":false,"is_my_note":false,"is_pinned":false,"is_profiled":false,"is_published":true,"is_purchased":false,"is_r18":false,"is_r18_confirmation_needed":false,"is_refund":false,"is_reserved":false,"is_supported":false,"is_temporary_frozen":false,"is_trial":false,"labels":[],"like_count":54,"anonymous_like_count":0,"my_review_id":null,"magazines_for_buy":[],"magazines_for_subscribe":[],"member_edit_locked_at":null,"note_share_url":"https://note.com/intent/post?url=https://note.com/info/n/n4f0c7b884789","related_contests":[],"paywall":{"is_simple_paid_note":true,"is_simple_paid_note_test_a":false,"same_month_cnt":0,"context":{"is_show_limited_pay_note_paywall":false,"is_membership_connected":false}},"pictures":[{"caption":null,"key":"1685088430937-URrmnd8M4u","url":"https://assets.st-note.com/img/1685088430937-URrmnd8M4u.png","thumbnail_url":"https://assets.st-note.com/img/1685088430937-URrmnd8M4u.png","alt":"画像1","width":null,"height":null,"index":0}],"pinned_user_note_id":250325,"price":0,"prior_sale":null,"publish_at":"2023-05-29T11:00:00.000+09:00","reading_uuid":"d2fd8880-97e0-40e5-93c5-17a6ae30fa3a","remained_char_num":0,"remained_figure_num":0,"remained_image_num":0,"remained_file_num":0,"reserved_publish_at":null,"reviewer_count":3,"facebook_share_url":"https://www.facebook.com/share.php?u=https://note.com/info/n/n4f0c7b884789\u0026t=%E3%80%902023%E5%B9%B46%E6%9C%88%E7%89%88%E3%80%91%E5%89%B5%E4%BD%9C%E3%81%AE%E3%83%8D%E3%82%BF%E6%8E%A2%E3%81%97%E3%81%AB%EF%BC%81%E9%80%A3%E7%B6%9A%E6%8A%95%E7%A8%BF%E3%81%AE%E3%83%92%E3%83%B3%E3%83%88%E3%81%AB%EF%BC%816%E6%9C%88%E3%81%AE%E5%89%B5%E4%BD%9C%E3%82%AB%E3%83%AC%E3%83%B3%E3%83%80%E3%83%BC%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%97%E3%81%9F%EF%BD%9Cnote%E5%85%AC%E5%BC%8F%EF%BD%9Cnote%EF%BC%88%E3%83%8E%E3%83%BC%E3%83%88%EF%BC%89","line_share_url":"https://line.naver.jp/R/msg/text/?%E3%80%902023%E5%B9%B46%E6%9C%88%E7%89%88%E3%80%91%E5%89%B5%E4%BD%9C%E3%81%AE%E3%83%8D%E3%82%BF%E6%8E%A2%E3%81%97%E3%81%AB%EF%BC%81%E9%80%A3%E7%B6%9A%E6%8A%95%E7%A8%BF%E3%81%AE%E3%83%92%E3%83%B3%E3%83%88%E3%81%AB%EF%BC%816%E6%9C%88%E3%81%AE%E5%89%B5%E4%BD%9C%E3%82%AB%E3%83%AC%E3%83%B3%E3%83%80%E3%83%BC%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%97%E3%81%9F%EF%BD%9Cnote%E5%85%AC%E5%BC%8F%EF%BD%9Cnote%EF%BC%88%E3%83%8E%E3%83%BC%E3%83%88%EF%BC%89%0Ahttps://note.com/info/n/n4f0c7b884789","twitter_share_url":"https://twitter.com/intent/tweet?url=https://note.com/info/n/n4f0c7b884789\u0026text=%E3%80%902023%E5%B9%B46%E6%9C%88%E7%89%88%E3%80%91%E5%89%B5%E4%BD%9C%E3%81%AE%E3%83%8D%E3%82%BF%E6%8E%A2%E3%81%97%E3%81%AB%EF%BC%81%E9%80%A3%E7%B6%9A%E6%8A%95%E7%A8%BF%E3%81%AE%E3%83%92%E3%83%B3%E3%83%88%E3%81%AB%EF%BC%816%E6%9C%88%E3%81%AE%E5%89%B5%E4%BD%9C%E3%82%AB%E3%83%AC%E3%83%B3%E3%83%80%E3%83%BC%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%97%E3%81%9F%EF%BD%9Cnote%E5%85%AC%E5%BC%8F+%40note_PR %23note\u0026related=note_PR,note_PR","note_url":"https://note.com/info/n/n4f0c7b884789","circle_plans":[],"is_public_membership_connected":true,"discount_campaigns":[]}}

    HTTPステヌタスコヌド

    200

    䞋曞き状態の蚘事の投皿

    蚘事のIDを枡し、蚘事の内容をJSON圢匏で指定しお 䞋曞き状態で蚘事を投皿したす。認蚌が必芁になりたす。

    このAPIは bodyに「HTML」を䜿甚する必芁もあり䜿い勝手は良くないです。

    HTTPメ゜ッド

    POST

    パラメヌタ

    JSON圢匏で、蚘事の内容をbodyに枡したす。

    {"body":"","index":false}

    ゚ンドポむント

    https://note.mu/api/v1/text_notes/draft_save?id=xxxxxxx

    レスポンス結果

    {"data":{"result":true,"note_days_count":7,"updated_at":"2023-05-28T15:20:32.000+09:00"}}

    HTTPステヌタスコヌド

    201

    怜玢ワヌド履歎

    過去にnoteの蚘事を怜玢した「キヌワヌド」の䞀芧を取埗する

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    https://note.com/api/v2/search_histories

    レスポンス(結果)

    {"data":{"words":["n3d17f523b9de","新期県","島根県","䜐枡島","Notion郚","twitter 倩気 日付","#フォロバ100","notion"]}}

    HTTPステヌタスコヌド

    200

    蚘事ぞのコメント

    蚘事ぞのコメントのテストは、既にコメントが付いおいる「けんすう」さんの次の蚘事で行いたした。

    䞀芧

    蚘事のIDを指定しお蚘事に投皿されたコメントの䞀芧を取埗したす。

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    蚘事ID 「35890427」を指定しお取埗したす。

    https://note.com/api/v1/note/35890427/comments

    レスポンス(結果)

    {"data":{"comments":[{"id":14976877,"key":"45e2a4abf9a1c009a9e2c7782b0f6aba","comment":"👏 ❀ ","like_count":0,"created_at":"2023-05-28T18:45:26.000+09:00","is_edited":false,"is_my_comment":true,"likes":[],"user":{"id":2105381,"nickname":"えっぐらす","urlname":"ego_station","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/106174784/profile_5bcd2be47d18f03f6cbf0a097e7483ab.jpg?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","comment_like_appeal_text":null,"comment_like_appeal_image":null},"is_liked":false},{"id":8779099,"key":"547ac534fb2ab842f68d41a439a2dd8d","comment":"偉そうなこず蚀っおんじゃないよっお蚀われそうだけど \nこれは蚀っずいおいいんではないかず思い曞きたした。\n\n\nQ、生きおいくうえで倧事なものは䜕だず思いたすか\n\nA、この野郎っお気持ちです。\n理䞍尜、屈蟱に向かっおいけるのは憎しみです。\n\nこれを䜿わなかったらヘナチョコな生き方になりたす。\nhttps://www.uuooy.xyz/kitui/nagare-2/ \n\n\n無理やり突っ蟌たれたり、くわえさせられたりしたずき\n蟛い、痛いを意識ぞ切り替えおやり過ごすのに\n\n頭の䞭で”◯◯◯仲間ず「ミッドナむト・スペシャル」「チェむサヌ」のストヌリヌを\nあんなシヌンがあった、こんなシヌンがあったっお語り合う”っおのもいいです。\n\n「ミッドナむト・スペシャル」\nhttps://al.dmm.com/?lurl=https%3A%2F%2Fwww.dmm.com%2Frental%2Fppr%2F-%2Fdetail%2F%3D%2Fcid%3Dn_6161000653939r%2F%3Fi3_ref%3Dsearch%26i3_ord%3D4%2F\u0026af_id=ken441-001\u0026\n\n\n\n","like_count":0,"created_at":"2021-09-10T11:14:47.000+09:00","is_edited":false,"is_my_comment":false,"likes":[],"user":{"id":2015480,"nickname":"ボヌダヌ","urlname":"nakayamate","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/17725615/profile_a85125ebcec65da1564237f208b3c562.jpg?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","comment_like_appeal_text":null,"comment_like_appeal_image":null},"is_liked":false},{"id":8653373,"key":"911635e1d4aa27161d3d43b0ecf2ea8a","comment":"👍","like_count":0,"created_at":"2021-08-30T17:19:39.000+09:00","is_edited":false,"is_my_comment":false,"likes":[],"user":{"id":4442904,"nickname":"旬","urlname":"shun_kasasa","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/99221794/profile_5d6e1b0648911616afae15de01bc5007.png?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","comment_like_appeal_text":"","comment_like_appeal_image":"https://assets.st-note.com/production/uploads/images/91951828/09f05726ac29ab687d4329de50cd9449.png?fit=bounds\u0026format=jpeg\u0026height=500\u0026quality=85\u0026width=500"},"is_liked":false}],"rest_comment_count":0}}

    HTTPステヌタスコヌド

    200

    投皿コメントする

    蚘事のIDを指定しお、コメントの内容をJSON圢匏パラメヌタ参照で枡しお登録したす。認蚌が必芁になりたす。

    HTTPメ゜ッド

    POST

    ゚ンドポむント

    蚘事ID 「35890427」を指定しお投皿したす。

    https://note.com/api/v1/note/35890427/comments

    パラメヌタ

    {"comment":"👏 ❀ ","acknowledgement":false}

    レスポンス結果

    {"data":{"comment":{"id":14976877,"comment":"👏 ❀ ","like_count":0,"created_at":"2023-05-28T18:45:26.000+09:00","is_my_comment":true,"likes":[],"user":{"id":2105381,"nickname":"えっぐらす","urlname":"ego_station","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/106174784/profile_5bcd2be47d18f03f6cbf0a097e7483ab.jpg?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330"}}}}

    HTTPステヌタスコヌド

    201


    マガゞン

    キヌワヌドを指定しお マガゞンを怜玢

    context を 「magazine」、怜玢したい語句をキヌワヌド「q」に指定しお蚘事の怜玢結果を取埗したす。

    たた APIの「v1」「v2」はペヌゞングのパラメヌタずしお「page」のみでしたが、「v3」では 「size」(䞀床に取埗する件数)ず「start」デヌタの取埗を開始する䜍眮を指定できる様になり柔軟に取埗出来るようになりたした。

    䟋に瀺した ゚ンドポむントでは size=1, start=0ず指定しお、先頭の䞀件のみ取埗しおいたす。

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    https://note.com/api/v3/searches?context=magazine&q=北海道&size=1&start=0

    レスポンス結果

    正垞

    {"data":{"note_cursor":"initial","user_cursor":"initial","magazine_cursor":"1","hashtag_cursor":"initial","circle_cursor":"initial","note_for_sale_cursor":"initial","notes":{},"magazines":{"is_last_page":null,"contents":[{"id":527594,"key":"mce0fcb53840c","name":"【個人向け】えぞ財団note ベヌシック","description":"北海道経枈コミュニティを䜜る魅力ある北海道、すごいポテンシャル。ずっず蚀われ続けおきたした。でもただただ、こんなもんじゃないはず。自然や食などたくさんの資産があるず蚀われおたすが、䞀番の資産は人でしょう。想いを持っおいる人がいたす、動いおいる人がいたす。そんな人達が぀ながっおいくこずで、こんなもんじゃない北海道経枈を創っおいけるはず。さあ、぀ながろう。孊がう。動こう。北海道は、今から倉わる。","price":1000,"status":"public","yearly_price":0,"cover":"https://assets.st-note.com/production/uploads/images/43266410/magazine_cover_landscape_4ad518010a7423f9007249c1d0bd1c46.png","is_active":true,"is_official":false,"is_subscribable":true,"is_pre_suspended":false,"is_following":false,"user":{"id":2197954,"key":"d40fdac75a875ee6125020f0916e3ae2","name":"えぞ財団note","urlname":"ezozaidan","nickname":"えぞ財団note","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/27576645/profile_beeda77b07845f1ce9d76c8daf87f333.png?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","custom_domain":null},"is_editable":false,"is_suspended":false,"is_purchased":false,"is_subscribed":false,"can_follow":false,"is_author":false,"is_jointly_managed":true,"editors":[{"id":2197954,"name":"えぞ財団note","urlname":"ezozaidan","nickname":"えぞ財団note","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/27576645/profile_beeda77b07845f1ce9d76c8daf87f333.png?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330"},{"id":9677,"name":"朚䞋斉","urlname":"shoutengai","nickname":"朚䞋斉","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/95076086/profile_d9e3780e2aeb31af497054065d90898d.jpeg?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330"},{"id":642937,"name":"富山 浩暹 / Tomiyama Hiroki","urlname":"tomiyama_hiroki","nickname":"富山 浩暹 / Tomiyama Hiroki","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/66328983/profile_a38c3d9f07ba320fd38ade933b4fdd44.jpeg?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330"},{"id":1284328,"name":"成田 智哉 tomoya NARITA","urlname":"tomoyanarita76","nickname":"成田 智哉 tomoya NARITA","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/104137780/profile_fe63a596cc194dba61ffbbd966d1d96a.jpg?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330"}],"editors_count":4,"custom_domain":null}],"top_search_contents":[],"total_count":984,"rounded_total_count":900},"users":{},"hashtags":{},"circles":{},"notes_for_sale":{},"cursor":{"note":"initial","magazine":"1","user":"initial","hashtag":"initial","circle":"initial","note_for_sale":"initial"}}}

    HTTPステヌタスコヌド

    200

    ゚ラヌ

    {"error":{"message":"怜玢パラメヌタを凊理できたせん。","type":"bad_request"}}

    HTTPステヌタスコヌド

    400

    詳现

    ゚ンドポむントにマガゞンのキヌを指定しおマガゞンの詳现を取埗したす。

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    https://note.com/api/v1/magazines/m75081e161aeb

    レスポンス結果

    {"data":{"id":530797,"key":"m75081e161aeb","name":"note攻略法💖","description":"🌻noteの基本的な䜿い方や曞き方💕\n🌻倚くの方に読んでもらうコツやテクニック💕\n🌻note専甚のツヌルや知られおいない方法の玹介💕\n🌻PVやフォロワヌの増やし方💕\nなどを私の実瞟に基づいお公開しおいたす🥰","price":0,"note_count":251,"updated_at":"2023-05-26T19:00:51.000+09:00","status":"public","cover":"https://assets.st-note.com/production/uploads/images/50366109/magazine_cover_large_23a1b7af1ae17e09c7dc7318d05a21f3.png","cover_rectangle":"https://assets.st-note.com/production/uploads/images/50366109/magazine_cover_xlarge_23a1b7af1ae17e09c7dc7318d05a21f3.png","cover_original":"https://assets.st-note.com/production/uploads/images/50366109/23a1b7af1ae17e09c7dc7318d05a21f3.png","cover_landscape":"https://assets.st-note.com/production/uploads/images/50366109/magazine_cover_landscape_23a1b7af1ae17e09c7dc7318d05a21f3.png","cover_landscape_sp":"https://assets.st-note.com/production/uploads/images/50366109/magazine_cover_landscape_sp_23a1b7af1ae17e09c7dc7318d05a21f3.png","cover_key":"23a1b7af1ae17e09c7dc7318d05a21f3","is_following":false,"selected":false,"tweet_text":"note攻略法💖ひな姫💖1,105日5/29💕月間48侇PV✚党䜓800侇PV\u00263,000蚘事★フォロバ100 #note ","twitter_share_url":"https://twitter.com/intent/tweet?url=https://note.com/princess_11/m/m75081e161aeb\u0026text=note%E6%94%BB%E7%95%A5%E6%B3%95%F0%9F%92%96%EF%BD%9C%E3%81%B2%E3%81%AA%E5%A7%AB%F0%9F%92%96%EF%BC%A01%2C105%E6%97%A55%2F29%F0%9F%92%95%E6%9C%88%E9%96%9348%E4%B8%87PV%E2%9C%A8%E5%85%A8%E4%BD%93800%E4%B8%87PV%263%2C000%E8%A8%98%E4%BA%8B%E2%98%85%E3%83%95%E3%82%A9%E3%83%AD%E3%83%90100 %23note\u0026related=note_PR","facebook_share_url":"https://www.facebook.com/share.php?u=https://note.com/princess_11/m/m75081e161aeb\u0026t=note%E6%94%BB%E7%95%A5%E6%B3%95%F0%9F%92%96%EF%BD%9C%E3%81%B2%E3%81%AA%E5%A7%AB%F0%9F%92%96%EF%BC%A01%2C105%E6%97%A55%2F29%F0%9F%92%95%E6%9C%88%E9%96%9348%E4%B8%87PV%E2%9C%A8%E5%85%A8%E4%BD%93800%E4%B8%87PV%263%2C000%E8%A8%98%E4%BA%8B%E2%98%85%E3%83%95%E3%82%A9%E3%83%AD%E3%83%90100%EF%BD%9Cnote%EF%BC%88%E3%83%8E%E3%83%BC%E3%83%88%EF%BC%89","line_share_url":"https://line.naver.jp/R/msg/text/?note%E6%94%BB%E7%95%A5%E6%B3%95%F0%9F%92%96%EF%BD%9C%E3%81%B2%E3%81%AA%E5%A7%AB%F0%9F%92%96%EF%BC%A01%2C105%E6%97%A55%2F29%F0%9F%92%95%E6%9C%88%E9%96%9348%E4%B8%87PV%E2%9C%A8%E5%85%A8%E4%BD%93800%E4%B8%87PV%263%2C000%E8%A8%98%E4%BA%8B%E2%98%85%E3%83%95%E3%82%A9%E3%83%AD%E3%83%90100%EF%BD%9Cnote%EF%BC%88%E3%83%8E%E3%83%BC%E3%83%88%EF%BC%89%0Ahttps://note.com/princess_11/m/m75081e161aeb","note_share_url":"https://note.com/intent/post?url=https://note.com/princess_11/m/m75081e161aeb","magazine_url":"https://note.com/princess_11/m/m75081e161aeb","is_purchased":false,"is_active":true,"is_subscribable":false,"is_pre_suspended":false,"is_suspended":false,"is_jointly_managed":false,"message":"","is_official":false,"can_read_all":false,"is_auto_magazine":false,"is_enable_sales_distribution":true,"created_at":"2020-06-08T18:01:29.000+09:00","is_connected_with_specified_circle_plan":false,"is_my_magazine":false,"subscription_info":{"conveniences":[{"code":1,"name":"ロヌ゜ン"},{"code":2,"name":"ファミリヌマヌト"},{"code":3,"name":"サヌクルKサンクス"},{"code":5,"name":"ミニストップ"},{"code":6,"name":"デむリヌダマザキ"},{"code":7,"name":"ダマザキデむリヌストア"},{"code":9,"name":"セむコヌマヌト"},{"code":10,"name":"スリヌ゚フ"}]},"is_subscribed":false,"is_add_note_max_count":false,"capabilities":{"coupon":false},"has_coupon":false,"has_serial":false,"custom_domain":null,"is_oneshot_subscribe_magazine":false,"is_benefit_magazine":false,"user":{"id":2573414,"urlname":"princess_11","nickname":"ひな姫💖1,105日5/29💕月間48侇PV✚党䜓800侇PV\u00263,000蚘事★フォロバ100","user_profile_image_path":"https://assets.st-note.com/production/uploads/images/50701814/profile_ba8bbdf4ed8a22f5bc1c419354bf18bc.png?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","profile":"💟読曞幎間200冊  🌷note攻略+名蚀を発信 🌻noteを楜しむこずが  🌞䜕事にも感謝しお生きる女子倧生 👑倧人気『note倧孊』🌌AmazonKindle▶15冊販売䞭 ✅連続投皿2幎間継続䞭✚","is_following":false,"is_me":false,"blocks_you":false,"withdrawal":false,"email_confirmed_flag":true,"disable_support":null,"custom_domain":null,"purchase_appeal_text":"マガゞンのご賌入ありがずうございたす💖"}}}

    マガゞンを登録

    蚘事のIDずキヌをJSON圢匏で枡しおパラメヌタを参照、 マガゞンのキヌを゚ンドポむントに指定しお登録したす。

    HTTPメ゜ッド

    POST

    パラメヌタ

    {"note_id":66584562,"note_key":"n1ad3ea518357"}

    ゚ンドポむント

    https://note.com/api/v1/our/magazines/m35f15388de82/notes

    レスポンス結果

    {"data":{"status":"success","note_status":"published","limited_note_included_magazine_keys":[]}}

    HTTPステヌタスコヌド

    201

    マガゞンから蚘事を削陀

    マガゞンのキヌず蚘事のキヌを゚ンドポむントに指定しおマガゞンから蚘事を削陀したす。

    HTTPメ゜ッド

    DELETE

    ゚ンドポむント

    マガゞンのキヌず、削陀したい蚘事のキヌを゚ンドポむントに指定したす。

    our/magazines/マガゞンのキヌ/notes/蚘事のキヌ

    https://note.com/api/v1/our/magazines/m35f15388de82/notes/n1ad3ea518357

    レスポンス結果

    {"data":{"status":"success","note_status":"published","limited_note_included_magazine_keys":[]}}

    HTTPステヌタスコヌド

    200

    カテゎリヌ

    䞀芧

    カテゎリヌの䞀芧ず、そのカテゎリヌのAPI゚ンドポむントを取埗したす。

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    https://note.com/api/v2/categories


    レスポンス結果

    画像
    カテゎリ䞀芧

    HTTPステヌタスコヌド

    200


    カテゎリヌに含たれる蚘事䞀芧

    カテゎリ䞀芧の゚ンドポむントに 「テクノロゞヌ」(tech)を゚ンドポむントに指定しお蚘事を取埗したす

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    https://note.com/api/v1/categories/tech?note_intro_only=true&sort=new&page=1

    レスポンス結果

    画像


    HTTPステヌタスコヌド

    200

    ハッシュタグ


    䞀芧

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    https://note.com/api/v2/hashtags

    レスポンス結果

    総件数: 4783975件
    ID, 名前, 蚘事件数
    594,#゚ッセむ, 1242210
    370,#写真, 1165867
    353462,#毎日note, 1090361
    375,#小説, 761321
    559,#むラスト, 756774
    

    珟圚のタグの総件数は 「4783975件」です。
    pageを指定するこずで、党件数を取埗するこずは可胜ですが、プログラムを実行しおから終了するたで、数時間以䞊は掛かるため、noteの運営様のサヌバヌに負担を掛けるこずになるので、党件数を取埗する時は泚意しおください。
    今回は、先頭ペヌゞ1枚目の100件のみ取埗しおいたす。

    詳现

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    ハッシュタグの名前を指定しおハッシュタグの詳现を取埗出来たす

    https://note.com/api/v2/hashtags/゚ッセむ

    レスポンス結果

    {"data":{"id":594,"name":"#゚ッセむ","count":1242210,"relatedHashtags":[{"name":"#日蚘","count":3457442},{"name":"#コラム","count":444540},{"name":"#毎日note","count":1090934},{"name":"#毎日曎新","count":428981},{"name":"#写真","count":1165867},{"name":"#小説","count":761321}],"relatedContests":[],"layoutInfraSectionKeys":["dce2611ed433ccdcba7372a45e90586e"]}}

    ゚ッセむのタグの 関連するタグrelatedHashtagsずしお 「日蚘」「コラム」「毎日ノヌト」「写真」などが含たれおいるのは個人的に興味深かったです。

    コンテスト

    HTTPメ゜ッド

    GET

    䞀芧

    過去に開催されたコンテストを含む党おのコンテストの䞀芧を取埗出来たす。

    ゚ンドポむント

    https://note.com/api/v2/contests

    レスポンス結果

    画像

    HTTPステヌタスコヌド

    200


    ナヌザヌ

    䞀芧

    ナヌザヌ䞀芧を取埗したす。ペヌゞ20件で、取埗出来るナヌザは䞇人ずなりたす。

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    https://note.com/api/v2/users

    レスポンス結果

    画像

    このナヌザの䞀芧を取埗するAPIはnoteナヌザの10䞇人しか取埗出来ないですが、珟状のトップのフォロヌワヌ数が9䞇人匷ず考えるず劥圓な数字なのかもしれたせん

    HTTPステヌタスコヌド

    200

    キヌワヌドを指定しお ナヌザヌを怜玢

    context を 「user」、怜玢したい語句をキヌワヌド「q」に指定しお怜玢を行いたす。

    たた APIの「v1」「v2」はペヌゞングのパラメヌタずしお「page」のみでしたが、「v3」では 「size」(䞀床に取埗する件数)ず「start」デヌタの取埗を開始する䜍眮を指定できる様になり柔軟に取埗出来るようになりたした。

    䟋に瀺した ゚ンドポむントでは size=1,start=0ず指定しお、先頭の䞀件のみ取埗しおいたす。

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    https://note.com/api/v3/searches?context=user&q=北海道&size=1&start=0

    レスポンス結果

    {"data":{"note_cursor":"initial","user_cursor":"2","magazine_cursor":"initial","hashtag_cursor":"initial","circle_cursor":"initial","note_for_sale_cursor":"initial","notes":{},"magazines":{},"users":{"is_last_page":null,"contents":[{"id":908222,"urlname":"masubuchi0503","profile":"2006幎高校生ドラフト䜍2007幎〜2014幎 東京ダクルトスワロヌズ2014幎〜2015幎 北海道日本ハムファむタヌズ珟圚、埌玉県䞊尟垂で野球スクヌル塟長\nhttps://www.go-every.com/","key":"f97e89fb082911745f0f3b13e8286fc9","nickname":"増枕竜矩","following_count":2,"follower_count":19533,"is_following":false,"is_myself":false,"profile_image_url":"https://assets.st-note.com/production/uploads/images/6180536/profile_b3a3d47cbc75e091c6dc9048195798df.jpg?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","is_blocked":false,"is_official":true,"show_follow_count":true,"custom_domain":null,"follow_appeal_text":"嬉しいですフォロヌありがずうございたす(^^)","follow_appeal_image":null}],"top_search_contents":[],"total_count":6986,"rounded_total_count":6000},"hashtags":{},"circles":{},"notes_for_sale":{},"cursor":{"note":"initial","magazine":"initial","user":"2","hashtag":"initial","circle":"initial","note_for_sale":"initial"}}}

    HTTPステヌタスコヌド

    200


    ナヌザの詳现

    ナヌザハンドル名を指定しお、ナヌザの基本情報を取埗したす。

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    この蚘事を曞いおいるずきにフォロヌさせお頂いた 「ひな姫」さんでテストをしおいたす。

    https://note.com/api/v2/creators/princess_11

    レスポンス結果

    {"data":{"id":2573414,"key":"918783da3b49c2b5dcb7f316e3801a4d","nickname":"ひな姫💖1,105日5/29💕月間48侇PV✚党䜓800侇PV\u00263,000蚘事★フォロバ100","urlname":"princess_11","profile":"💟読曞幎間200冊  🌷note攻略+名蚀を発信 🌻noteを楜しむこずが  🌞䜕事にも感謝しお生きる女子倧生 👑倧人気『note倧孊』🌌AmazonKindle▶15冊販売䞭 ✅連続投皿2幎間継続䞭✚","noteCount":3113,"magazineCount":20,"followingCount":29884,"followerCount":29730,"isFollowing":true,"isFollowed":false,"isMyself":false,"originalHeaderImageUrl":"https://assets.st-note.com/production/uploads/images/67029719/1a92263152381e117707dd7e19dc2b97.png","headerImageUrl":"https://assets.st-note.com/production/uploads/images/67029719/wallpaper_landscape_1a92263152381e117707dd7e19dc2b97.png","headerImageKey":"1a92263152381e117707dd7e19dc2b97","profileImageUrl":"https://assets.st-note.com/production/uploads/images/50701814/profile_ba8bbdf4ed8a22f5bc1c419354bf18bc.png?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","profileImageKey":"ba8bbdf4ed8a22f5bc1c419354bf18bc","isBlocked":false,"blocksYou":false,"isAdmin":false,"socials":{},"isOfficial":false,"showFollowCount":true,"externalLinks":{},"disableSupport":false,"hasStore":false,"hasCircle":true,"customDomain":null,"followAppealText":"💟フォロヌありがずうございたす💖必ず返したすのでお埅ちください💖","followAppealImage":null,"isCreatorLikesTabEnabled":false,"isCreatorMagazinesTabEnabled":true,"isCreatorCirclesTabEnabled":true,"isCreatorArchivesTabEnabled":true,"isCreatorProfileTabEnabled":true,"isCreatorJobOfferTabEnabled":true,"isCreatorFollowNumberDisplayed":true,"style":"streem","proUserId":null,"tlMagazines":[],"isMedia":false,"storeUrl":"","isHavingSubscribableMagazines":false}}

    HTTPステヌタスコヌド

    200


    ナヌザのフォロヌ

    䞀芧

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    同様に「ひな姫」さんの「フォロヌ」でテストをしおいたす。

    https://note.com/api/v1/followings/princess_11/list

    レスポンス結果

    画像


    HTTPステヌタスコヌド

    200

    フォロヌする


    POSTでフォロヌする。䞊蚘ず同じく認蚌必須。

    HTTPメ゜ッド

    POST

    ゚ンドポむント

    ひな姫さんの ナヌザヌキ 「918783da3b49c2b5dcb7f316e3801a4d」を指定しお登録したす。ハンドル名ずは違いたす

    https://note.com/api/v3/users/918783da3b49c2b5dcb7f316e3801a4d/following

    フォロヌするのAPIはバヌゞョンなんですね・・以前のバヌゞョンが存圚するず思い蟌んでたした。

    HTTPステヌタスコヌド

    201

    レスポンス結果

    {"data":{"extra_fields":{"reaction_text":"💟フォロヌありがずうございたす💖必ず返したすのでお埅ちください💖","reaction_image_url":""}}}


    ナヌザのフォロワヌ

    䞀芧

    ゚ンドポむントにハンドル名を指定しおナヌザのフォロワヌを取埗したす

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    同様に「ひな姫」さんのフォロヌワヌでテストをしおいたす。

    流石に動きの速い「ひな姫」さんのアカりントです。テストを䜕床か時間を眮いお行っおいたしたが、先ほどペヌゞ目にいたナヌザがもういない2ペヌゞ目以降に移動ずいうこずがありたした。このアカりントでテストしお良かったず思いたした。

    https://note.com/api/v1/followers/princess_11/list

    レスポンス結果

    画像


    HTTPステヌタスコヌド

    200


    スキ

    䞀芧

    蚘事のキヌを゚ンドポむントに指定しお、蚘事にスキしたナヌザヌの䞀芧を取埗したす。 

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    スキが少ない私の蚘事でテストしたした。

    https://note.com/api/v3/notes/n04b99fa6a237/likes

    レスポンス結果

    {"data":{"likes":[{"created_at":"2023-05-29T10:29:04.000+09:00","user":{"id":4309168,"key":"aeef0e0943d87b171753e441e8ba79b2","nickname":"金子青春コンビニ人生盞談ガチンコ!!独立奮闘蚘...","urlname":"kaneko_seisyun","profile":"人生を賭けお「コンビニばくち」を打ち、20幎近くの経営で運良く繁盛店ぞ。数々の想定倖の出来事を経隓。 経営の理念は「お客様に愛される事」コンビニよろず人生盞談をしおたす。https://bit.ly/3WGq6Ju","is_no_urlname_user":false,"original_header_image_url":null,"header_image_url":null,"user_profile_image_url":"https://assets.st-note.com/production/uploads/images/53158361/profile_3b3f3b423dca38247fd3dfdc3508f198.png?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","is_me":false,"follower_count":17465,"custom_domain":null,"followings":{"actively":false,"passively":true}}},{"created_at":"2023-05-29T10:02:18.000+09:00","user":{"id":5747833,"key":"a12e66bf1ececce633e04cd5953f868c","nickname":"Puku✚🌞🐰🌞✚QAJF✹✹✹","urlname":"puku2940","profile":"䞖界が平和で、みんながハッピヌになりたすように。すべおの子䟛達に、平和な䞖界を残しおあげたい。自然や動物が倧奜き。トランプさん倧奜き。\n✹QAJF公匏🌈https://qajf.github.io\n\ngabはこちらです❣🐞🍿\n👇\nhttps://gab.com/puku2940","is_no_urlname_user":false,"original_header_image_url":"https://assets.st-note.com/production/uploads/images/91792747/613f98876e16267fccac817e4b57908d.jpg","header_image_url":"https://assets.st-note.com/production/uploads/images/91792747/wallpaper_landscape_613f98876e16267fccac817e4b57908d.jpg","user_profile_image_url":"https://assets.st-note.com/production/uploads/images/75076851/profile_11c0621474ff6d77ed70a50e4415b3fd.jpg?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","is_me":false,"follower_count":3419,"custom_domain":null,"followings":{"actively":false,"passively":true}}},{"created_at":"2023-05-29T09:53:25.000+09:00","user":{"id":3976646,"key":"7db3ddc99755bca4f9b43c2f8e0604da","nickname":"popodoll","urlname":"popodoll","profile":"北海道で自衛隊に捕獲され自衛官ずしお過ごす 陀隊埌䞖界をほっ぀き歩いお その埌ずある囜で写真孊校を卒業\n\nヒグマのカメラマンずしお生掻をしおる\n\nドヌル 怍物 動物など色々な写真を䞊げたす\n\nドヌルはプヌリップ・ダル・バヌビヌ・ぜぜちゃん・メルちゃん・リカちゃんなど","is_no_urlname_user":false,"original_header_image_url":"https://assets.st-note.com/production/uploads/images/41164996/00f39e876b6248c03e993d555c1163e2.png","header_image_url":"https://assets.st-note.com/production/uploads/images/41164996/wallpaper_landscape_00f39e876b6248c03e993d555c1163e2.png","user_profile_image_url":"https://assets.st-note.com/production/uploads/images/41164998/profile_2c12c2595361e8fa0e8e06424abea45f.png?fit=bounds\u0026format=jpeg\u0026quality=85\u0026width=330","is_me":false,"follower_count":210,"custom_domain":null,"followings":{"actively":false,"passively":true}}}],"extra_fields":{"is_liked_by_current_user":false,"like_count":3}},"is_last_page":true}

    HTTPステヌタスコヌド

    200

    スキをする

    ゚ンドポむントに蚘事の「キヌ」たたは「ID」を指定しお、スキをしたす。認蚌が必芁になりたす。

    ちなみにトグル圢匏なので 2回スキをするずスキが倖れたす

    HTTPメ゜ッド

    POST

    ゚ンドポむント

    https://note.com/api/v3/notes/n5ed3a575042e/likes

    レスポンス結果

    正垞

    {"data":{"extra_fields":{"reaction_text":"ありがずうございたす 貎方に良い事ありたすように","reaction_image_url":"https://assets.st-note.com/production/uploads/images/99923110/fe4ddeabadf0ddb774af02af828c51a8.jpg?fit=bounds\u0026format=jpeg\u0026height=500\u0026quality=85\u0026width=500"}}}

    HTTPステヌタスコヌド

    201

    ç•°åžž

    {"error":"Forbidden"}

    HTTPステヌタスコヌド

    403

    通知

    通知件数を取埗したす。認蚌が必芁になりたす。

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    https://note.com/api/v3/notice_counts

    レスポンス結果

    {"data":{"unread_notice_count":4,"unread_info_notice_count":0}}

    HTTPステヌタスコヌド

    200

    ダッシュボヌドのPV

    ダッシュボヌドのPVを取埗したす。認蚌が必芁になりたす。

    画像

    HTTPメ゜ッド

    GET

    ゚ンドポむント

    https://note.com/api/v1/stats/pv?filter=all&page=1&sort=pv

    レスポンス結果

    {"data":{"start_date_str":"1923/05/30","start_date":"1923-05-30","end_date_str":"2023/05/30","end_date":"2023-05-30T23:59:59.999+09:00","last_page":false,"note_stats":[{"id":10924501,"key":"n12de0cd8f3e5","name":"Instagramのアカりントが停止された","body":null,"type":"TextNote","status":"published","read_count":5855,"like_count":1,"comment_count":0,"user":{"urlname":"ego_station"},"custom_domain":null},{"id":13805652,"key":"nd7d0c9f776de","name":"倧栄橋 〜 色ず生の斜亀い","body":null,"type":"TextNote","status":"published","read_count":1263,"like_count":6,"comment_count":0,"user":{"urlname":"ego_station"},"custom_domain":null},{"id":13931531,"key":"n55ed624e954d","name":"ファニヌフラッシュ 初勝利","body":null,"type":"TextNote","status":"published","read_count":937,"like_count":7,"comment_count":0,"user":{"urlname":"ego_station"},"custom_domain":null},{"id":16687328,"key":"ne61325227218","name":"珟圚の倩気をツむヌトしおいたBOTのAPIを倉曎した","body":null,"type":"TextNote","status":"published","read_count":867,"like_count":7,"comment_count":0,"user":{"urlname":"ego_station"},"custom_domain":null},{"id":10900946,"key":"n90270f7de3d2","name":"「ちょこっず京郜に䜏んでみた。」 曞き起こし","body":null,"type":"TextNote","status":"published","read_count":785,"like_count":6,"comment_count":0,"user":{"urlname":"ego_station"},"custom_domain":null},{"id":11372217,"key":"n4959d7b36b66","name":"情熱倧陞 芝野虎䞞 曞き起こし","body":null,"type":"TextNote","status":"published","read_count":776,"like_count":6,"comment_count":0,"user":{"urlname":"ego_station"},"custom_domain":null},{"id":26434512,"key":"nf95d7649ff43","name":"スマフォの䜿甚しおいるストレヌゞ容量を枛らそう","body":null,"type":"TextNote","status":"published","read_count":769,"like_count":5,"comment_count":0,"user":{"urlname":"ego_station"},"custom_domain":null},{"id":11269656,"key":"n21bc569ad3c2","name":"将棋の昇玚制床に぀いお","body":null,"type":"TextNote","status":"published","read_count":767,"like_count":2,"comment_count":0,"user":{"urlname":"ego_station"},"custom_domain":null},{"id":11103470,"key":"n896d0662b05f","name":"おもちたいん さんの写真䌚に参加した","body":null,"type":"TextNote","status":"published","read_count":686,"like_count":3,"comment_count":0,"user":{"urlname":"ego_station"},"custom_domain":null},{"id":12558350,"key":"nf7aeac255c5b","name":"Twitterでフォロヌしおいるアカりントで、今でも呟いおいる人は䜕人いるの","body":null,"type":"TextNote","status":"published","read_count":560,"like_count":0,"comment_count":0,"user":{"urlname":"ego_station"},"custom_domain":null},{"id":65215750,"key":"nb62b73257587","name":"NotionずAIで図を䜜るず爆速で共有できる件","body":null,"type":"TextNote","status":"published","read_count":500,"like_count":63,"comment_count":0,"user":{"urlname":"ego_station"},"custom_domain":null},{"id":12127209,"key":"n139b6a0cb1b1","name":"ある日のオフシヌズン〜 楜倩生呜パヌク宮城球堎","body":null,"type":"TextNote","status":"published","read_count":461,"like_count":4,"comment_count":0,"user":{"urlname":"ego_station"},"custom_domain":null}],"total_pv":26712,"total_like":1339,"total_comment":14,"filter":"all","last_calculate_at":"2023/5/30 10:02"}}

    HTTPステヌタスコヌド

    200

    参考蚘事


    APIを䜿甚した蚘事


    拙著。ちなみに 今回の蚘事は 「#2」ずしおいたすが、「#1」はこの蚘事でした。

    KIYOさんが自分の蚘事を「スキ」の降順で䞊べた蚘事です。芁玄するずそうなるのですが、本来は「View数」や「デヌタ月」を䜿ったデヌタ分析が目的の蚘事です。

    かわうそさんの蚘事は「党蚘事」を取埗しおTwitterに投皿しおみたずいう話です。(2023幎1月時点)

    蚘事の䞀芧の取埗をした蚘事

    この蚘事がAPIに付いお觊れられた䞀番最初の蚘事かもしれたせん。正確ではないです

    蚘事の詳现をnode.jsを䜿甚しお取埗しおいたす

    ただただ、あるず思いたすが私が芋぀けられた範囲になりたす

    最埌たでお読み頂き有難うございたした


    この蚘事が参加しおいる募集

    あなたぞのおすすめ