openapi: 3.2.0 info: title: Opoint Search API version: 1.0.0 description: 'Operations tagged search across 2 of this provider''s published API definitions: opoint-openapi-original.yml, opoint-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.opoint.com tags: - name: Search paths: /search/: post: operationId: search_create description: Main search endpoint. Serializes expressions and params, then sends the search to searchd. Supports JSON and XML response formats. summary: Expression search parameters: - in: query name: format schema: type: string enum: - json - jsonl - xml tags: - Search requestBody: content: application/json: schema: $ref: '#/components/schemas/Search' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Search' multipart/form-data: schema: $ref: '#/components/schemas/Search' security: - JWT: [] - ephmeralId: [] - staticToken: [] - cookieAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/SearchResultSchema' application/jsonl: schema: $ref: '#/components/schemas/SearchResultSchema' application/xml: schema: $ref: '#/components/schemas/SearchResultSchema' description: '' servers: - url: https://api.opoint.com /search/articles/: post: operationId: search_articles_create description: Retrieve visibility information for a specific set of articles by their site and article IDs. summary: Articles search parameters: - in: query name: format schema: type: string enum: - json - xml tags: - Search requestBody: content: application/json: schema: $ref: '#/components/schemas/SearchArticles' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/SearchArticles' multipart/form-data: schema: $ref: '#/components/schemas/SearchArticles' required: true security: - JWT: [] - ephmeralId: [] - staticToken: [] - cookieAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/SearchResultSchema' application/xml: schema: $ref: '#/components/schemas/SearchResultSchema' description: '' '400': description: Invalid JSON in request body servers: - url: https://api.opoint.com /search/find_article/: post: operationId: search_find_article_create description: Attempts to find an article in the index by matching text, URL, and header. summary: Find article tags: - Search requestBody: content: application/json: schema: $ref: '#/components/schemas/FindArticle' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/FindArticle' multipart/form-data: schema: $ref: '#/components/schemas/FindArticle' required: true security: - JWT: [] - ephmeralId: [] - staticToken: [] - cookieAuth: [] responses: '200': description: Article match results with id_link, remapping flag, and results list '400': description: Validation error or text too short servers: - url: https://api.opoint.com /search/glue_search/: post: operationId: search_glue_search_create description: Composite search that glues multiple search expressions together. summary: Glue search parameters: - in: query name: format schema: type: string enum: - json - xml tags: - Search requestBody: content: application/json: schema: $ref: '#/components/schemas/GlueSearch' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/GlueSearch' multipart/form-data: schema: $ref: '#/components/schemas/GlueSearch' required: true security: - JWT: [] - ephmeralId: [] - staticToken: [] - cookieAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/SearchResultSchema' application/xml: schema: $ref: '#/components/schemas/SearchResultSchema' description: '' servers: - url: https://api.opoint.com /search/tag/{tag_id}/reports/: post: operationId: search_tag_reports_create description: Search for articles included in a tag-based report. summary: Tag reports search parameters: - in: path name: tag_id schema: type: integer required: true tags: - Search requestBody: content: application/json: schema: $ref: '#/components/schemas/TagReportSearch' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/TagReportSearch' multipart/form-data: schema: $ref: '#/components/schemas/TagReportSearch' security: - JWT: [] - ephmeralId: [] - staticToken: [] - cookieAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/SearchResultSchema' description: '' servers: - url: https://api.opoint.com /search/usage_log/: post: operationId: search_usage_log_create description: Return articles for customer's aggregated access_groups and licences. summary: Usage log search tags: - Search requestBody: content: application/json: schema: $ref: '#/components/schemas/UsageSearch' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/UsageSearch' multipart/form-data: schema: $ref: '#/components/schemas/UsageSearch' required: true security: - JWT: [] - ephmeralId: [] - staticToken: [] - cookieAuth: [] responses: '200': description: Usage log data as JSON '400': description: Validation error servers: - url: https://api.opoint.com components: schemas: EntitiesSchema: type: object properties: location: type: array items: $ref: '#/components/schemas/EntitySchema' organization: type: array items: $ref: '#/components/schemas/EntitySchema' person: type: array items: $ref: '#/components/schemas/EntitySchema' SentimentEnum: enum: - Positive - Negative - Neutral type: string description: '* `Positive` - Positive * `Negative` - Negative * `Neutral` - Neutral' MatchSchema: type: object properties: type: type: string text: type: string description: Text that was matched. If wildcards are used this contains the actual word or phrase matched. color: type: integer play_offset: type: integer description: Offset of match in video or radio clip, in seconds. required: - color - text - type TopicsAndEntitiesSchema: type: object properties: topics: type: array items: $ref: '#/components/schemas/IptcTopicSchema' entities: $ref: '#/components/schemas/EntitiesSchema' sentiment: allOf: - $ref: '#/components/schemas/SentimentEnum' description: 'Overall sentiment of the article. * `Positive` - Positive * `Negative` - Negative * `Neutral` - Neutral' sentiment_score: type: number format: double description: Aggregated sentiment score from -1.0 to 1.0. SearchLine: type: object properties: searchterm: type: string filters: type: array items: $ref: '#/components/schemas/SearchLineFilter' SearchArticles: type: object properties: articles: type: array items: $ref: '#/components/schemas/SearchArticle' linkobs: type: boolean default: true html: type: boolean default: false transform: type: boolean required: - articles SummarySchema: type: object properties: text: type: string matches: type: boolean description: Whether search matches are highlighted in this field. compare: type: integer description: Edit distance between compare_text parameter and the combined summary and body text. truncated: type: boolean required: - text FirstSourceSchema: type: object properties: id: type: integer name: type: string sitename: type: string url: type: string siteurl: type: string required: - id - name - sitename - siteurl - url QuoteSchema: type: object properties: matches: type: boolean text: type: string required: - text SiteReadershipSchema: type: object properties: P: type: number format: double value: type: integer Rfc822TimeSchema: type: object properties: text: type: string description: RFC 822 formatted time. required: - text ListStateSchema: type: object properties: id_list: type: integer state: type: integer state_name: type: string required: - id_list - state SortGroupSchema: type: object properties: group: type: integer description: Group id. 0 for articles not matching any group. weight: type: integer count: type: integer description: Number of articles in group. name: type: string required: - group TextFieldSchema: type: object properties: text: type: string matches: type: boolean description: Whether search matches are highlighted in this field. required: - text PdfFileSchema: type: object properties: all: type: string args: type: string pdf_parts: type: array items: $ref: '#/components/schemas/PdfPartSchema' required: - all - args - pdf_parts SearchResultSchema: type: object description: 'Top-level search result wrapper. The searchresult field contains either a successful SearchResponse or a SearchError.' properties: searchresult: allOf: - $ref: '#/components/schemas/SearchResponseSchema' description: The search result. Contains either a successful response with documents, or an error. required: - searchresult UserCommentSchema: type: object properties: id_user: type: integer username: type: string first_name: type: string last_name: type: string signature: type: string email: type: string id_group: type: integer description: Comment group the comment belongs to. id_site: type: integer id_article: type: integer timestamp: type: integer description: When the comment was made. comment: type: string required: - comment - email - first_name - id_article - id_group - id_site - id_user - last_name - signature - timestamp - username DebugLineSchema: type: object properties: state: type: integer description: 1 if the line had an error, 0 otherwise. query: type: string description: What the query was interpreted as, if the line had errors corrected. required: - state BodySchema: type: object properties: text: type: string matches: type: boolean description: Whether search matches are highlighted in this field. readmore: type: boolean truncated: type: boolean required: - text AlmostIdenticalSchema: type: object properties: id_site: type: integer id_article: type: integer sim: type: integer description: Similarity score. Higher is more similar. required: - id_article - id_site - sim TranslatedHeaderSchema: type: object properties: text: type: string matches: type: boolean description: Whether search matches are highlighted in this field. language: type: string required: - text TagReportSelectionTypeEnum: enum: - tagged - used type: string description: '* `tagged` - tagged * `used` - used' LocalTimeSchema: type: object properties: text: type: string description: ISO 8601 formatted time. GMT: type: integer required: - GMT - text ObservationSchema: type: object description: Single link observation. properties: level: type: string images: type: object additionalProperties: {} ShortFieldSchema: type: object properties: text: type: string matches: type: boolean description: Whether search matches are highlighted in this field. length: type: integer removed: type: integer required: - text ArticleReadershipSchema: type: object properties: value: type: integer description: Estimated number of readers of the article so far. DeltaPValue: type: integer description: Predicted additional readers in the next hour. ExpectedPValue: type: integer description: Predicted number of people that will eventually read the article. StdExpectedPValue: type: integer description: Standard deviation of ExpectedPValue. P: type: number format: double description: Estimated fraction of the site's readers having read the article so far. DeltaP: type: number format: double ExpectedP: type: number format: double StdExpectedP: type: number format: double SearchArticle: type: object properties: id_site: type: integer id_article: type: integer required: - id_article - id_site DocumentSchema: type: object description: A single article/document in the search response. properties: id_site: type: integer description: Id of the site the article was published on. id_article: type: integer description: Site-specific article id, unique within each site. position: type: integer description: Index of the document in the result list (one-based). unix_timestamp: type: integer description: Unix timestamp of when the article was published. stimestamp: type: integer description: Internal timestamp. stimestamp_index: type: integer description: Internal timestamp. header: $ref: '#/components/schemas/HeaderSchema' summary: $ref: '#/components/schemas/SummarySchema' body: $ref: '#/components/schemas/BodySchema' author: type: string word_count: type: integer short_header: $ref: '#/components/schemas/ShortFieldSchema' short_summary: $ref: '#/components/schemas/ShortFieldSchema' short_body: $ref: '#/components/schemas/ShortFieldSchema' translated_header: $ref: '#/components/schemas/TranslatedHeaderSchema' manual_summary: $ref: '#/components/schemas/TranslatedHeaderSchema' extract: type: boolean matches: type: array items: $ref: '#/components/schemas/MatchSchema' quotes: $ref: '#/components/schemas/QuotesSchema' first_source: $ref: '#/components/schemas/FirstSourceSchema' sources: $ref: '#/components/schemas/SourcesSchema' topics: type: array items: $ref: '#/components/schemas/TopicSchema' topics_and_entities: $ref: '#/components/schemas/TopicsAndEntitiesSchema' language: $ref: '#/components/schemas/LanguageSchema' countryname: type: string countrycode: type: string local_time: $ref: '#/components/schemas/LocalTimeSchema' local_rcf822_time: $ref: '#/components/schemas/Rfc822TimeSchema' orig_url: type: string description: URL where the article was found. url_common: type: string description: Domain name of the site where the article was found. url: type: string description: Link to tool displaying the crawled article. articleimages: $ref: '#/components/schemas/ArticleImagesSchema' caption: $ref: '#/components/schemas/TextFieldSchema' screenshots: type: array items: $ref: '#/components/schemas/ScreenshotSchema' articlemedia: type: array items: $ref: '#/components/schemas/ArticleMediaSchema' playlength: type: integer description: Length of timemap, if present, in seconds. mediafile: type: integer pdf_file: $ref: '#/components/schemas/PdfFileSchema' mediatype: $ref: '#/components/schemas/MediaTypeSchema' similarweb: $ref: '#/components/schemas/SimilarwebSchema' site_rank: $ref: '#/components/schemas/SiteRankSchema' meta_data: type: object additionalProperties: {} description: Various metadata about the article, like social media engagement. identical_documents: $ref: '#/components/schemas/IdenticalDocumentsSchema' almost_identical: $ref: '#/components/schemas/AlmostIdenticalSchema' equalgroup: type: integer sort_group_ref: type: integer list_states: type: array items: $ref: '#/components/schemas/ListStateSchema' tags: type: array items: $ref: '#/components/schemas/TagSchema' linkobs: $ref: '#/components/schemas/LinkobsSchema' internal_search_reply: $ref: '#/components/schemas/InternalSearchReplySchema' usercomments: $ref: '#/components/schemas/UserCommentsSchema' hidden: type: boolean existinbasket: type: string compare: type: integer content_protected: type: integer distribute_conditions: type: string circulation: type: integer adprice: type: integer reach: type: integer stored_search_id: type: integer profile_id: type: integer profile_name: type: string required: - id_article - id_site - position - stimestamp - stimestamp_index - unix_timestamp SimilarwebSchema: type: object properties: domain: type: string mvisit: type: integer description: Monthly visits. unique_mobile_visits: type: integer unique_desktop_visits: type: integer page_per_visit: type: number format: double bounce_rate: type: number format: double time_on_site: type: number format: double description: Average time on site per visit, in seconds. category: type: string category_rank: type: integer sanitize: type: number format: double readership: $ref: '#/components/schemas/SiteReadershipSchema' article_readership: $ref: '#/components/schemas/ArticleReadershipSchema' InternalSearchReplySchema: type: object properties: id_site: type: integer id_article: type: integer text: type: string required: - id_article - id_site - text TagReportSearch: type: object description: 'Tag report query builder. The previous way of selecting content for a report was only based on stimestamp_used, using the stimestamp field in the request body. Since we need more fine grained selection based on stimestamp_set, we migrate to a tagged union serializer, and make the old and the new request body format mutually exclusive to ease transition.' properties: stimestamps: type: array items: type: integer selections: type: array items: $ref: '#/components/schemas/TagReportSelection' SiteRankSchema: type: object properties: rank_global: type: integer rank_country: type: integer MatchTableRowSchema: type: object properties: match_item: $ref: '#/components/schemas/MatchItemSchema' GlueItem: type: object properties: list_one: $ref: '#/components/schemas/SearchTerm' list_two: $ref: '#/components/schemas/SearchTerm' glue_start: type: string glue_middle: type: string glue_end: type: string required: - glue_end - glue_start - list_one GlueSearch: type: object properties: params: type: object additionalProperties: {} writeOnly: true items: type: array items: $ref: '#/components/schemas/GlueItem' minItems: 1 expand_persistent: type: boolean default: false required: - items MediaTypeSchema: type: object properties: timemap: type: boolean duration: type: integer description: Length of timemap in seconds. clip: type: boolean hastext: type: boolean haslogo: type: boolean paywall: type: boolean description: Whether article was fetched from behind a paywall. fulltext: type: boolean text: type: string required: - clip - fulltext - haslogo - hastext - paywall - text - timemap MatchItemSchema: type: object properties: rowspan: type: integer colspan: type: integer type: type: string color: type: integer active: type: boolean length: type: integer removed: type: integer text: type: string LinkobSourceSchema: type: object properties: id: type: integer depth: type: integer name: type: string obs: $ref: '#/components/schemas/ObservationSchema' ProfileItem: type: object properties: id: type: integer searchline: $ref: '#/components/schemas/SearchLine' linemode: $ref: '#/components/schemas/LinemodeEnum' searchmode: type: string writeOnly: true required: - linemode - searchline - searchmode MatchTableSchema: type: object properties: rows: type: integer cols: type: integer row: $ref: '#/components/schemas/MatchTableRowSchema' IdenticalDocumentsSchema: type: object properties: cnt: type: integer document: type: array items: type: object additionalProperties: {} required: - cnt EntitySchema: type: object properties: entity: type: string wikidata_id: type: string crunchbase: type: string permid: type: string lei: type: string figi: type: string sentiment: type: string required: - entity FindArticle: type: object properties: url: type: string text: type: string header: type: string id_site: type: integer required: - header - text - url LinkobsSchema: type: object properties: cnt: type: integer source: $ref: '#/components/schemas/LinkobSourceSchema' required: - cnt SourceSchema: type: object properties: id: type: integer name: type: string sitename: type: string url: type: string siteurl: type: string linktype_max: type: integer linktype_now: type: integer required: - id - name - sitename - siteurl - url LinemodeEnum: enum: - R - O - E type: string description: '* `R` - Required * `O` - Optional * `E` - Exclude' SearchTerm: type: object properties: searchterm: type: string expressions: type: array items: $ref: '#/components/schemas/ProfileItem' use_raw_query: type: boolean default_search: type: string LanguageSchema: type: object properties: encoding: type: string text: type: string required: - encoding - text DebugSchema: type: object properties: count: type: integer lines: type: array items: $ref: '#/components/schemas/DebugLineSchema' SearchMatchSchema: type: object properties: type: type: string color: type: integer text: type: string IptcTopicSchema: type: object properties: label: type: string description: IPTC Media Topic name, hierarchically structured with > separators. mediatopic_id: type: string description: IPTC Media Code. score: type: number format: double description: Confidence score for the topic. required: - label - mediatopic_id - score SearchResponseSchema: type: object description: Successful search response from searchd. properties: documents: type: integer description: Number of documents in the result. document: type: array items: $ref: '#/components/schemas/DocumentSchema' description: Articles matching the search. debug: $ref: '#/components/schemas/DebugSchema' first_timestamp: type: integer description: Unix timestamp of the newest matching document in the response. last_timestamp: type: integer description: Unix timestamp of the oldest matching document in the response. context: type: string description: Pagination cursor. Pass to the context parameter to fetch the next page. Empty string means no more results. search_start: type: integer description: Unix timestamp a new search can start from to get newer content. Can be passed as the oldest parameter. range_count: type: integer description: Estimate of total matching documents in the range. range_start: type: integer range_end: type: integer description: 0 means the end of the range is now. count: type: integer cacheage: type: integer cputime: type: integer host: type: string description: Server having processed the request. compiledate: type: string branch: type: string notimeout: type: boolean wikinames: type: object additionalProperties: {} description: Mapping of entity ids to entity names. wikidescriptions: type: object additionalProperties: {} description: Mapping of entity ids to entity descriptions. search_matches: type: array items: $ref: '#/components/schemas/SearchMatchSchema' matches_table: $ref: '#/components/schemas/MatchTableSchema' watch_id: type: integer description: Id of watch process. sort_groups: $ref: '#/components/schemas/SortGroupSchema' covered: type: integer next_from: type: integer required: - document - documents - first_timestamp - last_timestamp ArticleMediaSchema: type: object properties: url: type: string localurl: type: string thumbnail: type: string text: type: string Search: type: object properties: params: type: object additionalProperties: {} writeOnly: true searchterm: type: string expressions: type: array items: $ref: '#/components/schemas/ProfileItem' use_raw_query: type: boolean default_search: type: string ScreenshotSchema: type: object properties: id_type: type: integer width: type: integer height: type: integer text: type: string description: URL of the screenshot. required: - height - id_type - text - width TopicSchema: type: object properties: id: type: integer description: Subject id. text: type: string description: Subject name. linktype_max: type: integer linktype_now: type: integer metacat: type: integer description: Meta category, an integer representing the type of the subject. metacat_level: type: integer description: Meta category abstraction level, ordered from 0 and up. required: - id - text PdfPartSchema: type: object properties: pages: type: integer args: type: string text: type: string required: - args - pages - text TagReportSelection: type: object description: 'Ways of selecting content from tags for reports. Represented by a tagged union choosing between ways of selecting content, either from an old report or all the unused content, or only some of the unused articles.' properties: type: $ref: '#/components/schemas/TagReportSelectionTypeEnum' timestamp: type: integer from_timestamp: type: integer to_timestamp: type: integer required: - type TagSchema: type: object properties: id: type: integer is_owner: type: integer sent: type: integer set: type: integer equal_sent: type: integer required: - equal_sent - id - is_owner - sent - set UsageSearch: type: object properties: params: type: object additionalProperties: {} required: - params HeaderSchema: type: object properties: text: type: string matches: type: boolean description: Whether search matches are highlighted in this field. compare: type: integer description: Edit distance between compare_header parameter and the header text. required: - text ArticleImagesSchema: type: object properties: count: type: integer articleimage: type: array items: $ref: '#/components/schemas/ArticleImageSchema' required: - articleimage - count UserCommentsSchema: type: object properties: count: type: integer usercomment: type: array items: $ref: '#/components/schemas/UserCommentSchema' required: - count ArticleImageSchema: type: object properties: url: type: string caption: $ref: '#/components/schemas/TextFieldSchema' QuotesSchema: type: object properties: quote: $ref: '#/components/schemas/QuoteSchema' SourcesSchema: type: object properties: source: $ref: '#/components/schemas/SourceSchema' SearchLineFilter: type: object properties: type: type: string id: type: string required: - type securitySchemes: JWT: type: apiKey in: header name: Authorization description: Token-based authentication with required prefix "JWT" cookieAuth: type: apiKey in: cookie name: PHPSESSID ephmeralId: type: apiKey in: header name: Authorization description: Token-based authentication with required prefix "Ephemeral" staticToken: type: apiKey in: header name: Authorization description: Token-based authentication with required prefix "Token" x-refined-from: - opoint-openapi-original.yml - opoint-openapi.yml