{"openapi":"3.1.0","info":{"title":"Ajel Wire API","version":"1.0.0","description":"Official content-distribution API of Ajel (صحيفة عاجل) — Saudi news in 10 languages. Free with attribution. Every request requires an API key (no anonymous access), sent in the `x-api-key` header or as `Authorization: Bearer ajw_…`. Missing key → `401 key_required`; unknown key → `401 invalid_key`; revoked key, or a key of a suspended account → `401 revoked_key`. Every endpoint also accepts a Wire OAuth access token (`Authorization: Bearer <token>`, scope wire:read); an invalid, expired or disconnected token → `401 invalid_token`. Create a free key from your account dashboard at https://ajel.sa/wire/dashboard. Rate limits per hour: developer 1000/hour, publisher 10000/hour, partner 50000/hour; search (/v1/search and /v1/articles?q=) also has its own sub-limit of 600 queries/hour within that quota. Higher tiers are requested from the dashboard. Errors return `{ error: { code, message } }`: `code` is stable; `message` is in Arabic when the preferred `Accept-Language` is `ar`, otherwise English.","contact":{"url":"https://ajel.sa/wire"}},"servers":[{"url":"https://wire.ajel.sa"}],"security":[{"bearerKey":[]}],"x-rate-limits":{"unit":"requests/hour","tiers":{"developer":1000,"publisher":10000,"partner":50000}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Alternative to the Bearer header: the same Wire key (`ajw_...`) in an `x-api-key` header."},"bearerKey":{"type":"http","scheme":"bearer","description":"Wire key (`ajw_...`) created from https://ajel.sa/wire/dashboard, sent as `Authorization: Bearer ajw_...` on every request (or a Wire OAuth access token)."}},"responses":{"Unauthorized":{"description":"`key_required` (no key or token sent), `invalid_key` (unknown key), `revoked_key` (revoked key, or a key of a suspended account) or `invalid_token` (OAuth bearer token invalid, expired or disconnected)"},"RateLimited":{"description":"Hourly limit of the key's tier exceeded (developer 1000/hour, publisher 10000/hour, partner 50000/hour)"}},"schemas":{"Article":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"language":{"type":"string","enum":["ar","en","ur","es","fr","id","bn","hi","ru","tr"]},"direction":{"type":"string","enum":["rtl","ltr"]},"translation_of":{"type":["string","null"],"description":"Arabic origin id when this is a translation"},"title":{"type":"string"},"summary":{"type":["string","null"]},"content_text":{"type":"string","description":"Full plain text (single-article endpoint only)"},"content_html":{"type":["string","null"],"description":"Full sanitized HTML (single-article endpoint only)"},"canonical_url":{"type":"string","format":"uri"},"published_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time","description":"EDITORIAL update time (never precedes published_at)"},"status":{"type":"string","enum":["published","updated"]},"breaking":{"type":"boolean"},"section":{"type":["object","null"]},"authors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}}}},"media":{"type":"array","items":{"type":"object"}},"available_translations":{"type":"array","items":{"type":"string","enum":["ar","en","ur","es","fr","id","bn","hi","ru","tr"]},"description":"Other languages this article is published in (single-article endpoint only)"},"attribution":{"type":"object","properties":{"brand":{"type":"string"},"brand_latin":{"type":"string"},"text":{"type":"string"},"url":{"type":"string","format":"uri"}}},"usage":{"type":"object","description":"Reuse terms for this article (see https://ajel.sa/wire/policy)","properties":{"republication_allowed":{"type":"boolean"},"attribution_required":{"type":"boolean","description":"Show attribution.text linked to attribution.url"},"modification_allowed":{"type":"boolean","description":"Republishing in summarized/condensed form is allowed with attribution, without altering the meaning (usage policy: republish in full or summarized, without distortion)"},"summary_allowed":{"type":"boolean","description":"Summaries allowed with attribution, without distorting the story"},"translation_allowed":{"type":"boolean","description":"Machine translation for display is allowed, provided it is labelled as a translation and the meaning is not distorted"},"ai_processing_allowed":{"type":"boolean","description":"Use in AI systems is allowed, provided Ajel is cited as the source together with the story's link (attribution.text + attribution.url)"},"meaning_alteration_allowed":{"type":"boolean","description":"Always false — altering the meaning or misleading truncation is not allowed"},"commercial_use_allowed":{"type":"boolean"},"resale_of_raw_feed_allowed":{"type":"boolean","description":"Reselling the raw feed itself is not allowed"}}}}}}},"paths":{"/v1/languages":{"get":{"operationId":"listLanguages","summary":"Available language editions","responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/sections":{"get":{"operationId":"listSections","summary":"Sections of a language edition","description":"Section slugs/paths usable as `section` in /v1/latest and /v1/articles. Arabic lists the sections shown on the Arabic site; other editions list all of their sections.","parameters":[{"name":"language","in":"query","schema":{"type":"string","enum":["ar","en","ur","es","fr","id","bn","hi","ru","tr"],"default":"ar"},"description":"Edition language code"}],"responses":{"200":{"description":"OK"},"400":{"description":"Unknown language"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/latest":{"get":{"operationId":"getLatestNews","summary":"Latest published articles","parameters":[{"name":"language","in":"query","schema":{"type":"string","enum":["ar","en","ur","es","fr","id","bn","hi","ru","tr"],"default":"ar"},"description":"Edition language code"},{"name":"section","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/breaking":{"get":{"operationId":"getBreakingNews","summary":"Breaking news (last 72h)","parameters":[{"name":"language","in":"query","schema":{"type":"string","enum":["ar","en","ur","es","fr","id","bn","hi","ru","tr"],"default":"ar"},"description":"Edition language code"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/search":{"get":{"operationId":"searchNews","summary":"Search headlines/summaries","description":"Search has its own sub-limit of 600 queries/hour per account (shared with /v1/articles?q=), inside the tier's hourly quota.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":3}},{"name":"language","in":"query","schema":{"type":"string","enum":["ar","en","ur","es","fr","id","bn","hi","ru","tr"],"default":"ar"},"description":"Edition language code"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}}],"responses":{"200":{"description":"OK"},"400":{"description":"`query_too_short` (fewer than 3 characters) or unknown language"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/articles":{"get":{"operationId":"listArticles","summary":"List articles (filters + cursor pagination; q switches to search)","description":"With `q` this behaves like /v1/search and counts toward the same search sub-limit (600 queries/hour).","parameters":[{"name":"language","in":"query","schema":{"type":"string","enum":["ar","en","ur","es","fr","id","bn","hi","ru","tr"],"default":"ar"},"description":"Edition language code"},{"name":"section","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string","minLength":3}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"`query_too_short` (q shorter than 3 characters) or unknown language"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/articles/{id}":{"get":{"operationId":"getArticle","summary":"One article with full text and available translations","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"400":{"description":"`invalid_id` (not a uuid)"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not found or unpublished"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/articles/{id}/translations":{"get":{"operationId":"getArticleTranslations","summary":"All published language versions of an article","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"400":{"description":"`invalid_id` (not a uuid)"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not found or unpublished"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/topics":{"get":{"operationId":"listTopics","summary":"Curated topics (entities and cities) — Arabic only","description":"Hand-picked topics curated by Ajel's newsroom. Arabic edition only for now (`language` is always `ar`).","parameters":[{"name":"kind","in":"query","schema":{"type":"string","enum":["entity","city"]},"description":"Filter by topic kind"}],"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/v1/topics/{slug}/articles":{"get":{"operationId":"listTopicArticles","summary":"Articles of a curated topic — Arabic only","description":"Published Arabic articles linked to the topic, newest first. Paginate with `cursor` = `pagination.next_cursor` from the previous page (same mechanism as /v1/latest).","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque; pass `pagination.next_cursor` from the previous page as-is"},{"name":"before","in":"query","deprecated":true,"schema":{"type":"string","format":"date-time"},"description":"Deprecated — use `cursor` (millisecond precision can skip stories published at the same instant across a page boundary). Returns articles published before this time (from `pagination.next_before`); ignored when `cursor` is sent"}],"responses":{"200":{"description":"OK"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"`unknown_topic`"},"429":{"$ref":"#/components/responses/RateLimited"}}}}}}